TikTok → Obsidian (Claude Code)
The Obsidian TikToker plugin only runs inside Obsidian. This skill uses the same scripts the plugin ships with (whisper-scripts/) so Claude Code can produce notes on disk that Obsidian will show as soon as the vault refreshes.
What you cannot do from Claude Code
- Call Obsidian plugin APIs, modals, or “Save via TikToker” inside the app.
- Get the exact same rich metadata/embed as the plugin unless you duplicate its oEmbed + template logic.
What this skill does
- Run local transcription (audio via
yt-dlp, text viafaster-whisperin the plugin venv). - Write a
.mdfile into the vault with YAML frontmatter +## Transcription.
Configuration (edit if your paths differ)
| Variable | Default |
|---|---|
| Vault root | /Users/martinp/clawd/SecondBrain |
| Notes folder | Tiktoks (matches common TikToker outputFolder) |
| Script | $VAULT/.obsidian/plugins/tiktoker/whisper-scripts/tiktok2text.sh |
| Browser for cookies | safari (use -b chrome if TikTok login is only in Chrome) |
Procedure (run in terminal)
- Transcribe (stdout is the transcript; stderr has
Saved: …txt):
WHISPER="/Users/martinp/clawd/SecondBrain/.obsidian/plugins/tiktoker/whisper-scripts/tiktok2text.sh"
URL="PASTE_TIKTOK_URL_HERE"
"$WHISPER" -o /tmp "$URL"
(Default is Safari cookies; same as tiktok2text.sh. For Chrome: add -b chrome.)
Use -o /tmp so the .txt lands in /tmp and is easy to find, or omit -o and read the path from stderr (Saved: …).
Video id from the URL: the numeric segment after
/video/(e.g.7591638352298855694).Build the note at
$VAULT/Tiktoks/YYYY-MM-DD tiktok <video_id>.md
(or any naming the user prefers) with:
---
url: "CANONICAL_TIKTOK_URL"
date: YYYY-MM-DD
---
## Transcription
PASTE_TRANSCRIPT_FROM_STDOUT_OR_TXT_FILE
- Strip tracking junk from
urlin frontmatter if you want cleaner links (optional): keep up to/video/<id>.
Reliability
- Cookies: Default is Safari. If download fails, try
-b chromeor ensure the user is logged into TikTok in that browser (Terminal may need Full Disk Access to read Safari cookies). - PATH: If
python3/yt-dlpfail when not in Obsidian, run from a normal Terminal (or use the same PATH fix as intiktok2text.sh— Homebrew +~/.pyenv/shims). - Timeouts: Long videos take longer; Whisper model is controlled with
-m tiny|base|small|…(default in script isbase).
Optional: match TikToker embed
To mirror the plugin’s iframe note body, fetch oEmbed (https://www.tiktok.com/oembed?url=...) and add the returned html in a ## Video section above ## Transcription. The plugin does more (author, hashtags); oEmbed gives title/author/thumbnail/embed HTML only.