← Back to Skills Marketplace
charles-lpf

Douyin To Obsidian

by charles-lpf · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ⚠ suspicious
29
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install douyin-obsidian-notes
Description
将抖音视频内容保存到 Obsidian 笔记。自动转录视频、AI 摘要结构化、写入 Obsidian。 触发词:抖音保存到笔记、抖音存obsidian、douyin to obsidian、抖音笔记、保存抖音、 记录抖音、抖音内容存档、视频笔记、抖音转笔记。 当用户发送抖音链接(douyin.com 或 v.do...
README (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 已打开且仓库名正确
Usage Guidance
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.
Capability Analysis
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.
Capability Tags
requires-sensitive-credentials
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install douyin-obsidian-notes
  3. After installation, invoke the skill by name or use /douyin-obsidian-notes
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug douyin-obsidian-notes
Version 1.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 3
Frequently Asked Questions

What is Douyin To Obsidian?

将抖音视频内容保存到 Obsidian 笔记。自动转录视频、AI 摘要结构化、写入 Obsidian。 触发词:抖音保存到笔记、抖音存obsidian、douyin to obsidian、抖音笔记、保存抖音、 记录抖音、抖音内容存档、视频笔记、抖音转笔记。 当用户发送抖音链接(douyin.com 或 v.do... It is an AI Agent Skill for Claude Code / OpenClaw, with 29 downloads so far.

How do I install Douyin To Obsidian?

Run "/install douyin-obsidian-notes" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Douyin To Obsidian free?

Yes, Douyin To Obsidian is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Douyin To Obsidian support?

Douyin To Obsidian is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Douyin To Obsidian?

It is built and maintained by charles-lpf (@charles-lpf); the current version is v1.0.2.

💬 Comments