social-capture
Skill2 starsChanged 4 months agoMITView on GitHub
Capture social media content (YouTube transcripts, X threads) and save to Obsidian. Use this skill when a URL is posted in the Social Telegram topic (530).
In this repository25 other files it gives its agents.
- cmux-agent-orchestratorSkill
- cmux-pr-qc-agentSkill
- cmuxSkill
- finchSkill
- peekSkill
- gmail-inbox-zero-triageSkill
- gmail-oib-zeroSkill
- whatsapp-triageSkill
- add-to-changelogSkill
- check-prSkill
- cli-reviewSkill
- coderabbit-requestSkill
- convex-domain-folderSkill
- e2e-remote-setupSkill
- greploopSkill
- update-docsSkill
- antigravity-cliSkill
- check-model-usageSkill
- code-structureSkill
- evidence-driven-testingSkill
- interviewSkill
- issue-breakdownSkill
- model-classifierSkill
- remotion-explainer-videoSkill
- skill-makerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 14 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 57
When a message in Social topic contains a YouTube URL:
- Very specific: line 61
Check for --watch flag (see Watch Mode below)
- Distinctive: line 62
Run the appropriate script
- Very specific: line 96
Read the transcript from result["file_path"]
- Very specific: line 97
Read each frame image using the Read tool — Claude sees them as images
- Distinctive: line 98
Write a rich visual summary to the channel folder (see Visual Summary Format below)
- Very specific: line 106
Delete result["frames_dir"] (temp dir) after copying the keepers
- Distinctive: line 162
Only embed a frame when it adds real context (diagram, code, data, UI demo, slide)
- Distinctive: line 168
Write a caption for every embedded frame that accurately describes what is actually visible in that specific frame
- Distinctive: line 172
When a message in Social topic contains an X/Twitter URL:
- Distinctive: line 176
Use Brave MCP to open the URL and extract full content (handles note tweets)
- Distinctive: line 180
IMPORTANT: Always auto-save X posts to Obsidian.
- Distinctive: line 220
NEVER use Apify, WebFetch, or any scraper for X posts: Always use Brave MCP. NEVER use Chrome MCP — X is only logged in on Brave.
- Distinctive: line 239
Use WebFetch to extract content
- Distinctive: line 240
Create markdown file with YAML frontmatter (see Article Template below)
- Distinctive: line 272
If code review needed, fetch specific files via raw.githubusercontent.com
- Distinctive: line 275
IMPORTANT: When an X post links to GitHub, include security review of the code in the Obsidian note.
- Very specific: line 321
Watch Mode images: All frames go in the Obsidian sources/ folder (never in the notes folder):
- Distinctive: line 443
After saving content, your terminal response IS the Telegram reply.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Social Content Capture
CRITICAL: Obsidian Path
ALWAYS use the iCloud Obsidian vault path:
/Users/greg/Library/Mobile Documents/iCloud~md~obsidian/Documents/Ideaverse/Social/DO NOT use /Users/greg/Ideaverse/ - that's a stale local copy.
Overview
Automatically captures content from social platforms and saves organized transcripts/content to Obsidian.
Purpose: Extract and archive social media content for later reference.
When to Use
- YouTube URL posted in Social topic (530)
- X/Twitter post URL posted in Social topic
- Any social platform URL in Social topic
Available Scripts
Located in scripts/:
| Script | Purpose | Usage |
extract-youtube.py | Extract YouTube transcript only | python scripts/extract-youtube.py <url> |
watch_youtube.py | Download video + extract frames + transcript | python scripts/watch_youtube.py <url> |
extract_frames.sh | Extract JPG frames from a video file | ./scripts/extract_frames.sh <video_path> --max-frames 30 |
save-x-post.py | Save X/Twitter post to Obsidian | python scripts/save-x-post.py <username> <title> (pipe content) |
CRITICAL: Acknowledge Immediately — Before Any Processing
The FIRST thing you do when any URL arrives is send an instant acknowledgment to Telegram. Do this before opening any browser, running any script, or doing anything else.
import sys
sys.path.insert(0, '/Users/greg/codebase/telegram-claude')
from telegram_sender import send_to_telegram
send_to_telegram(topic_id=530, text="Got it, processing...")This fires in under 1 second. Greg should never be left wondering if his message was received.
Workflow
YouTube URL Detection
When a message in Social topic contains a YouTube URL:
- Send immediate acknowledgment (see above)
- Detect YouTube URL pattern (
youtube.com/watchoryoutu.be/) - Check for
--watchflag (see Watch Mode below) - Run the appropriate script
- Read the saved transcript file
- Write a proper summary to the channel folder (not transcripts/) — with real content from the transcript, using the frontmatter template below
- Reply to Telegram with result — only AFTER both transcript AND summary are saved
CRITICAL: The task is NOT done until the summary is written. Do NOT reply to Telegram after step 2. The summary is mandatory, not optional. Never report done with only the transcript saved.
Standard Execution (transcript only — default)
from youtube_extractor import extract_youtube
result = extract_youtube(url)
if result["success"]:
reply = f"Saved: Social/YouTube/{result['channel']}/{result['file_path'].split('/')[-1]}"
else:
reply = f"Failed: {result['error']}"Watch Mode (frames + transcript — opt-in)
Trigger: Message contains --watch, or Greg says "watch this", "analyse the visuals", "frame by frame".
import sys
sys.path.insert(0, '/Users/greg/codebase/telegram-claude/.claude/skills/social-capture/scripts')
from watch_youtube import watch_youtube
result = watch_youtube(url) # returns all extract_youtube keys + frames list + frames_dirAfter calling watch_youtube:
- Read the transcript from
result["file_path"] - Read each frame image using the
Readtool — Claude sees them as images - Write a rich visual summary to the channel folder (see Visual Summary Format below)
- Copy the frames Claude actually uses into the Obsidian sources attachment folder:
- Path:
sources/Social/YouTube/<Channel>/<YYYY-MM-DD-slug>/<video-slug>-001.png - e.g.
sources/Social/YouTube/The Inner Circle Trader/2020-05-08-OTE-Vol-01/ote-vol01-001.png - Full path:
/Users/greg/Library/Mobile Documents/iCloud~md~obsidian/Documents/Ideaverse/sources/Social/YouTube/<Channel>/<date-slug>/ - Never put frames in the channel notes folder — they pollute the file browser and break the reading experience
- CRITICAL: Use a video-slug prefix on every frame filename — e.g.
judas-swing-001.png,ote-vol01-001.png. Generic names likeframe-001.pngcause Obsidian vault-wide embed collisions when multiple videos share the same filenames. - Obsidian resolves
![[filename]]vault-wide — unique prefixes ensure the right images always load
- Path:
- Delete
result["frames_dir"](temp dir) after copying the keepers - Reply to Telegram: "Saved with visual summary — X frames embedded"
CRITICAL: Do NOT save all frames. Only save the ones you embed in the summary. Discard the rest.
CRITICAL: Frames ALWAYS go in sources/Social/YouTube/<Channel>/<date-slug>/. Never in the notes folder.
CRITICAL: Frame filenames MUST use a video-slug prefix — <video-slug>-NNN.png. Never frame-NNN.png. Generic names collide across videos.
Visual Summary Format (Watch Mode only)
The summary file should read like a beautifully structured article with screenshots at the right moments:
---
title: "Video Title"
source: "https://youtu.be/xxxxx"
author: "Channel Name"
published: 2026-01-10
created: 2026-01-11
description: "Brief description"
tags:
- "youtube"
- "watch"
- "topic-tag"
---
# Video Title
**Channel:** Name | **Published:** date | **Duration:** Xm
## Overview
2-3 sentence intro of what the video covers.
## Key Section Heading
Paragraph summarising this section of the video.
![[judas-swing-003.png]]
*Caption: what this frame shows and why it matters*
## Next Section
Continue the pattern — text, then frame where the visual adds real context.
![[judas-swing-011.png]]
*Caption: description*
## Key Takeaways
- Bullet point summary
- Of the most important pointsRules for frame selection:
- Only embed a frame when it adds real context (diagram, code, data, UI demo, slide)
- Skip frames of talking heads with nothing on screen
- NEVER save intro slides, title cards, logo animations, legal disclaimers, or outro screens — these are always the first and last frames and are completely useless
- NEVER save near-duplicate frames — if the same chart appears across 4 consecutive frames with only the cursor position changing, pick one and discard the rest
- Always review every extracted frame before saving — do not blindly copy all frames to Obsidian
- 3-8 frames is the right range for most videos
- Write a caption for every embedded frame that accurately describes what is actually visible in that specific frame
X/Twitter URL Detection
When a message in Social topic contains an X/Twitter URL:
- Send immediate acknowledgment (see top of Workflow section)
- Detect X URL pattern (
x.com/*/status/ortwitter.com/*/status/) - Use Brave MCP to open the URL and extract full content (handles note tweets)
- Use the save script to ensure correct Obsidian path
- Reply to Telegram with saved path
IMPORTANT: Always auto-save X posts to Obsidian. Do not ask for confirmation.
CRITICAL: BRAVE ONLY — NEVER Chrome MCP for X posts. Greg's X account is only logged in on Brave. Chrome MCP will not have access to X content.
Extraction Method: Brave MCP (brave_get_text) + save script
CRITICAL: NEVER use brave_new_tab for X posts. New tabs can open in Profile 6 (youtube-history) where X is NOT logged in. Always use brave_navigate on an existing Profile 1 tab, then restore it when done.
# 1. Get current tabs — find a Profile 1 tab to reuse
tabs = mcp__brave-browser__brave_tabs()
# SKIP: studio.youtube.com, youtube.com/watch (Profile 6), grok.com (hangs on navigation)
# PREFER: gmail, airbnb, booking.com, cloudflare, about:blank, chrome://newtab
profile1_tab = next(t for t in tabs if
"studio.youtube" not in t["url"] and
"youtube.com/watch" not in t["url"] and
"grok.com" not in t["url"]
)
original_url = profile1_tab["url"]
# 2. Navigate that tab to the X URL
mcp__brave-browser__brave_navigate(tabId=profile1_tab["id"], url=x_url)
# Wait ~3 seconds for page to load
# 3. Extract text content
content = mcp__brave-browser__brave_get_text(tabId=profile1_tab["id"])
# 4. Restore the tab to its original URL
mcp__brave-browser__brave_navigate(tabId=profile1_tab["id"], url=original_url)
# 5. Parse content and save using the script (ensures correct iCloud path)Or via bash:
echo "$MARKDOWN_CONTENT" | python .claude/skills/social-capture/scripts/save-x-post.py "username" "Post title"Why browser over scraping: Scrapers truncate "note tweets" (long-form posts >280 chars). Browser renders the full content.
NEVER use Apify, WebFetch, or any scraper for X posts. Always use Brave MCP. NEVER use Chrome MCP — X is only logged in on Brave. If Brave MCP fails, report the error to the user — do NOT fall back to scrapers or Chrome.
Other URLs (Articles, Blog Posts, Unknown Sites)
CRITICAL: Do NOT use browser MCP for unknown/external sites. Browser requires user approval for new domains.
For any URL that is NOT YouTube or X/Twitter, use WebFetch:
# Use WebFetch tool - no browser approval needed
WebFetch(
url="https://example.com/article",
prompt="Extract the main content, key points, strategies, tips, and recommendations from this article. Provide a structured summary."
)ALWAYS auto-save article summaries to Obsidian under Social/Articles/ with proper frontmatter.
Article saving workflow:
- Use WebFetch to extract content
- Create markdown file with YAML frontmatter (see Article Template below)
- Save to:
/Users/greg/Library/Mobile Documents/iCloud~md~obsidian/Documents/Ideaverse/Social/Articles/YYYY-MM-DD-Article-Title.md - Reply to Telegram with saved path and brief summary
Do NOT ask for permission - just extract and save automatically like X posts and YouTube videos.
When to use what:
| URL Type | Tool | Reason |
youtube.com, youtu.be | extract-youtube.py script | Uses yt-dlp, no browser |
x.com, twitter.com | Brave MCP | X is logged in on Brave only, need JS for full content |
github.com | GitHub API via curl | No browser needed, see GitHub section below |
| Everything else | WebFetch | No browser approval needed |
GitHub URL Detection
For GitHub repos, use the GitHub API via curl (no browser needed):
# List repo contents
curl -s https://api.github.com/repos/OWNER/REPO/contents | jq -r '.[].name'
# Get raw file content
curl -s https://raw.githubusercontent.com/OWNER/REPO/main/PATH/TO/FILE
# Get repo metadata
curl -s https://api.github.com/repos/OWNER/REPO | jq '{name, description, stargazers_count, language}'GitHub extraction workflow:
- Parse owner/repo from URL:
github.com/OWNER/REPO - Fetch README:
curl -s https://raw.githubusercontent.com/OWNER/REPO/main/README.md - If code review needed, fetch specific files via raw.githubusercontent.com
- Save summary to
Social/GitHub/OWNER-REPO.mdorSocial/X/username/if linked from X post
IMPORTANT: When an X post links to GitHub, include security review of the code in the Obsidian note. Check for:
- Input sanitization
- Prompt injection vulnerabilities
- API key handling
- Dependencies
URL Detection Patterns
import re
YOUTUBE_PATTERN = r'(https?://)?(www\.)?(youtube\.com/watch\?v=|youtu\.be/)[\w-]+'
X_PATTERN = r'(https?://)?(www\.)?(x\.com|twitter\.com)/\w+/status/\d+'
# Everything else → WebFetchFile Structure
Content is saved to Obsidian:
Ideaverse/Social/
├── YouTube/
│ ├── <Channel Name>/
│ │ ├── <Topic>-Summary.md ← Summary file (created after extraction)
│ │ └── transcripts/
│ │ └── YYYY-MM-DD-Video-Title.md ← Raw transcript
│ └── <Other Channel>/
├── X/
│ ├── <Username>/
│ │ └── YYYY-MM-DD-Tweet-excerpt.md
│ └── <Other User>/
├── GitHub/
│ └── <repo-name>.md
└── Articles/
└── YYYY-MM-DD-Article-Title.mdYouTube Summary Location: Summaries go in the channel folder (e.g., YouTube/Ali Khan/SMT-Model-Summary.md), NOT in the transcripts folder.
YouTube Summary Naming: Topic-first, no date prefix. Use the video topic as the filename, not the publish date.
- Correct:
OTE-Pattern-Recognition-Vol-01-Summary.md - Wrong:
2020-05-08-OTE-Pattern-Recognition-Vol-01-Summary.md
The date belongs in the frontmatter (published: field), not the filename. This keeps the channel folder sorted by topic, not by date, which is far more useful when browsing.
Watch Mode images: All frames go in the Obsidian sources/ folder (never in the notes folder):
Ideaverse/sources/Social/YouTube/<Channel>/<YYYY-MM-DD-slug>/<video-slug>-001.pngThis is Obsidian's configured attachment root. The notes folder stays clean with only .md files.
CRITICAL: No Spaces in Filenames
ALL filenames MUST use hyphens instead of spaces. This makes paths copy-pasteable in terminals.
- Use:
2026-02-05-Outrank-Local-Business.md - NOT:
2026-02-05 - Outrank Local Business.md
The save-x-post.py script and youtube_extractor.py handle this automatically. When saving files directly (articles, GitHub), always replace spaces with hyphens in the filename.
CRITICAL: Frontmatter Template
ALL social captures MUST include YAML frontmatter at the top of the file.
X/Twitter Template
---
title: "Post Title"
source: "https://x.com/username/status/123456789"
author: "@username"
published: 2026-01-10
created: 2026-01-11
description: "Brief 1-line description of what the post covers"
tags:
- "x-post"
- "topic-tag"
---YouTube Template
---
title: "Video Title"
source: "https://youtube.com/watch?v=xxxxx"
author: "Channel Name"
published: 2026-01-10
created: 2026-01-11
description: "Brief description of video content"
tags:
- "youtube"
- "topic-tag"
---GitHub Template
---
title: "Repo Name"
source: "https://github.com/owner/repo"
author: "owner"
published:
created: 2026-01-11
description: "What the repo does"
tags:
- "github"
- "tool-type"
---Article Template
---
title: "Article Title"
source: "https://example.com/article"
author: "Author Name"
published: 2026-01-10
created: 2026-01-11
description: "Brief summary"
tags:
- "article"
- "topic-tag"
---Field Definitions
| Field | Required | Description |
title | Yes | Post/video/repo title |
source | Yes | Original URL |
author | Yes | Username/channel (with @ for X) |
published | No | Date content was originally published (if known) |
created | Yes | Date we captured it (today) |
description | Yes | Brief 1-line summary |
tags | Yes | Always include platform tag + topic tags |
Example Complete X Post
---
title: "How I Use Claude Code - Creator Setup"
source: "https://x.com/bcherny/status/2007179832300581177"
author: "@bcherny"
published: 2026-01-03
created: 2026-01-11
description: "Boris Cherny (Claude Code creator) shares his personal 13-tip setup"
tags:
- "x-post"
- "claude-code"
- "workflow"
- "tips"
---
# How I Use Claude Code - Boris Cherny's Personal Setup
[Rest of content...]References
Located in references/:
platforms.md- Supported platforms and extraction methods
Response Format
IMPORTANT: Always reply to Telegram when done. The user shouldn't have to ask if you're finished.
After saving content, your terminal response IS the Telegram reply. Keep it concise:
Success:
Saved: Social/X/username/2025-01-06-Post-title.md
Brief 1-line summary of what the post is about.With due diligence:
Saved: Social/X/username/2025-01-06-Post-title.md
Brief summary + added due diligence notes from [site].Failure:
Failed: No subtitles found for this videoDo NOT make the user ask "is that done?" - your response confirms completion.
CRITICAL: Telegram Update Required — DIRECT SEND, NOT RESPONSE WATCHER
After all processing is done, you MUST send the result directly to Telegram using telegram_sender. Do NOT rely on the response watcher picking up your text output — it may time out before you finish.
import sys
sys.path.insert(0, '/Users/greg/codebase/telegram-claude')
from telegram_sender import send_to_telegram
send_to_telegram(topic_id=530, text="Saved: Social/X/username/2026-04-28-Post-title.md\n\nBrief summary of what the post is about.")This is mandatory. The response watcher cannot be relied upon for on-demand sessions doing long tasks. Direct send ensures Greg always gets the reply.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

