← 返回 Skills 市场
charles-lpf

Douyin To Obsidian

作者 charles-lpf · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
29
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install douyin-obsidian-notes
功能描述
将抖音视频内容保存到 Obsidian 笔记。自动转录视频、AI 摘要结构化、写入 Obsidian。 触发词:抖音保存到笔记、抖音存obsidian、douyin to obsidian、抖音笔记、保存抖音、 记录抖音、抖音内容存档、视频笔记、抖音转笔记。 当用户发送抖音链接(douyin.com 或 v.do...
使用说明 (SKILL.md)

抖音 → Obsidian 笔记

将抖音视频/图文内容自动转录、摘要、结构化后存入 Obsidian。


配置

配置文件:\x3Cskill目录>/config.json

{
  "vault": "你的Obsidian仓库名",
  "folder": "抖音笔记",
  "groqApiKey": "gsk_xxx"
}

groqApiKey — Groq API Key(免费,用于 Whisper 语音转文字)。获取:https://console.groq.com

首次使用检查

读取 \x3Cskill目录>/config.json。如果不存在或字段为空,询问用户:

  1. Obsidian 仓库名(vault name)— 打开 Obsidian 后在左上角看到的名字
  2. 目标文件夹 — 笔记存放的文件夹名(如 抖音笔记Clippings 等)

拿到后写入 config.json,后续不再询问。


依赖

  • Groq API Key — 配置在本 skill 的 config.json 中(Whisper 转录)
  • agent-browser — 浏览器自动化(提取抖音页面音频流)
  • ffmpeg — 音频格式转换
  • Obsidian CLI — 写入笔记

首次使用前检查上述依赖是否就绪。


工作流程

收到抖音链接后

步骤 1:提取音频并转录

1a. 打开页面

agent-browser open "\x3C用户发的抖音链接>"

1b. 提取音频 URL 和标题

agent-browser eval 'performance.getEntriesByType("resource").find(e => e.name.includes("media-audio-und-mp4a"))?.name'
agent-browser eval 'document.querySelector("h1")?.textContent?.trim()'

1c. 下载音频流

抖音使用 DASH 分流,视频和音频分开。用 curl 下载(不能用 ffmpeg 直接抓流):

curl -L -H "Referer: https://www.douyin.com/" -o /tmp/douyin_audio_raw.m4a "\x3CaudioUrl>"

1d. 转换格式并转录

ffmpeg -y -i /tmp/douyin_audio_raw.m4a -vn -ar 16000 -ac 1 -c:a libmp3lame -q:a 2 /tmp/douyin_audio.mp3

直接调用 Groq Whisper API(不走 transcribe.js,避免脚本内部路径冲突):

GROQ_API_KEY=$(python3 -c "import json; print(json.load(open('\x3Cskill目录>/config.json'))['groqApiKey'])")
curl -s https://api.groq.com/openai/v1/audio/transcriptions \
  -H "Authorization: Bearer $GROQ_API_KEY" \
  -F file="@/tmp/douyin_audio.mp3" \
  -F model="whisper-large-v3" \
  -F language="zh" \
  -F response_format="verbose_json"

1e. 清理

rm -f /tmp/douyin_audio_raw.m4a /tmp/douyin_audio.mp3
agent-browser close

图文帖:无视频/音频时,用 agent-browser get text 提取页面文案作为"转录内容"。

步骤 2:AI 摘要 + 结构化

拿到转录文本后,生成:

  1. 一句话总结(30 字以内,用作 blockquote)
  2. 核心要点(3-7 个要点,每个 1-2 句)
  3. 关键金句(如有)
  4. 实操建议(可选,3-5 条)

步骤 3:组装笔记

---
tags:
  - 抖音
  - 视频笔记
created: YYYY-MM-DD HH:MM
source: douyin
---

# {视频标题}

> {一句话总结}

## 核心要点

- 要点 1
- 要点 2

## 关键金句

> "金句内容"

## 原始转录

{完整转录文本}

---

**来源**: [{视频标题}]({原始链接})

步骤 4:写入 Obsidian

读取 config.json 获取 vault 和 folder:

  1. 创建笔记
obsidian vault="\x3Cvault名>" create path="\x3Cfolder>/抖音-{标题简称}-{YYYYMMDD}.md" content="\x3C组装好的markdown>" silent

文件名规则:标题取前 20 字符,去掉 / \ : * ? " \x3C > |,日期 YYYYMMDD。

  1. 设置属性
obsidian vault="\x3Cvault名>" property:set name="tags" value="[抖音,视频笔记]" file="\x3C路径>"
obsidian vault="\x3Cvault名>" property:set name="created" value="YYYY-MM-DD HH:MM" file="\x3C路径>"
obsidian vault="\x3Cvault名>" property:set name="source" value="douyin" file="\x3C路径>"

步骤 5:确认

✅ 已保存到 Obsidian 📁 位置:{folder}/{文件名} 📝 包含:AI 摘要 + 原始转录 + 来源链接


故障排查

问题 解决
config.json 不存在 首次使用会自动询问并创建
Groq API Key 未配置 提示用户在 douyin-transcribe/.env 中配置
agent-browser 未安装 npm install -g agent-browser
音频 URL 为 null 等几秒重试;或用户需登录抖音网页版
curl 下载的音频无法播放 检查 Referer header 是否带上
Obsidian 命令失败 确认 Obsidian 已打开且仓库名正确
安全使用建议
Before installing, delete the bundled config.json secret, use your own Groq API key, confirm the Obsidian vault/folder are yours, and install the required browser/ffmpeg/Obsidian tools only from trusted sources.
功能分析
Type: OpenClaw Skill Name: douyin-obsidian-notes Version: 1.0.2 The skill bundle contains a hardcoded Groq API key in `config.json`, which is a significant security oversight. Furthermore, the `SKILL.md` instructions present a high risk of shell injection; they direct the agent to fetch a URL and a title from a third-party website (Douyin) and pass them directly into shell commands (`curl` and `obsidian` CLI) without sanitization. This could allow a malicious webpage to execute arbitrary commands on the host system if the agent processes a crafted URL or title.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose matches the main capabilities: open a Douyin link, extract/transcribe audio, summarize it, and create an Obsidian note.
Instruction Scope
The skill gives explicit shell/browser commands for opening user-provided links, downloading/transcoding media, calling Groq, and writing to Obsidian. These are purpose-aligned but should be user-approved.
Install Mechanism
The registry says there is no install spec and no required binaries, while SKILL.md depends on agent-browser, ffmpeg, and Obsidian CLI, including an unpinned global npm install suggestion.
Credentials
The included config.json contains a concrete Groq API key and vault/folder values even though metadata declares no credential requirements; this is under-disclosed credential handling.
Persistence & Privilege
The skill stores and reuses config.json across runs, and the shipped config is already populated, so first-use prompts may be skipped and the bundled credential/config may be used.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install douyin-obsidian-notes
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /douyin-obsidian-notes 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
Groq API Key 改为从 config.json 读取,不再依赖 douyin-transcribe 的 .env
v1.0.1
改用 agent-browser + curl 直接下载 DASH 音频流,绕过 transcribe.js 的路径冲突问题;直接调用 Groq Whisper API
v1.0.0
Initial release for saving Douyin video content to Obsidian notes. - Automatically transcribes Douyin video or extracts text from image/text posts. - Uses AI to generate structured summary: one-line summary, key points, golden quotes, and insights. - Assembles and saves content as a markdown note in user-specified Obsidian vault and folder. - Prompts user to provide Obsidian vault and folder name on first use; saves configuration for later. - Checks for dependency on douyin-transcribe and prompts for installation if missing. - Detailed user feedback after successful note creation, including location and included content.
元数据
Slug douyin-obsidian-notes
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Douyin To Obsidian 是什么?

将抖音视频内容保存到 Obsidian 笔记。自动转录视频、AI 摘要结构化、写入 Obsidian。 触发词:抖音保存到笔记、抖音存obsidian、douyin to obsidian、抖音笔记、保存抖音、 记录抖音、抖音内容存档、视频笔记、抖音转笔记。 当用户发送抖音链接(douyin.com 或 v.do... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 29 次。

如何安装 Douyin To Obsidian?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install douyin-obsidian-notes」即可一键安装,无需额外配置。

Douyin To Obsidian 是免费的吗?

是的,Douyin To Obsidian 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Douyin To Obsidian 支持哪些平台?

Douyin To Obsidian 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Douyin To Obsidian?

由 charles-lpf(@charles-lpf)开发并维护,当前版本 v1.0.2。

💬 留言讨论