feat(pkm): add youtube-video-capture skill
Captures subtitles from a YouTube video via yt-dlp, produces a prose summary with key takeaways, and saves both as OKF-conformant notes into the Video/ bundle in the Obsidian vault.
This commit is contained in:
@@ -22,6 +22,7 @@ A collection of agent skills (slash commands and behaviors) loaded into Steve Be
|
|||||||
|
|
||||||
- [lsp-code-analysis](common/engineering/lsp-code-analysis/SKILL.md) — Semantic code analysis via LSP. Navigate code (definitions, references, implementations), search symbols, preview refactorings, and get file outlines. Use for exploring unfamiliar codebases or performing safe refactoring.
|
- [lsp-code-analysis](common/engineering/lsp-code-analysis/SKILL.md) — Semantic code analysis via LSP. Navigate code (definitions, references, implementations), search symbols, preview refactorings, and get file outlines. Use for exploring unfamiliar codebases or performing safe refactoring.
|
||||||
- [pkm-curation](common/pkm/pkm-curation/SKILL.md) — Curate an Obsidian vault — classify notes, normalize frontmatter, add wikilinks, extract atomic notes. Use when curating, batch-processing, reviewing, or doing a serendipity pick.
|
- [pkm-curation](common/pkm/pkm-curation/SKILL.md) — Curate an Obsidian vault — classify notes, normalize frontmatter, add wikilinks, extract atomic notes. Use when curating, batch-processing, reviewing, or doing a serendipity pick.
|
||||||
|
- [youtube-video-capture](common/pkm/youtube-video-capture/SKILL.md) — Fetch subtitles from a YouTube video, summarize the content, and save the summary and raw subtitles to the Video bundle.
|
||||||
- [forge-gitea](common/deprecated/forge-gitea/SKILL.md) — Use the Gitea CLI (`tea`) to interact with Gitea issues, pull requests, releases, CI, and repository state.
|
- [forge-gitea](common/deprecated/forge-gitea/SKILL.md) — Use the Gitea CLI (`tea`) to interact with Gitea issues, pull requests, releases, CI, and repository state.
|
||||||
- [forge-github](common/deprecated/forge-github/SKILL.md) — Use the GitHub CLI (`gh`) to interact with GitHub issues, pull requests, releases, CI, and repository state.
|
- [forge-github](common/deprecated/forge-github/SKILL.md) — Use the GitHub CLI (`gh`) to interact with GitHub issues, pull requests, releases, CI, and repository state.
|
||||||
- [forge-interaction](common/deprecated/forge-interaction/SKILL.md) — Use when the user wants forge work such as opening a PR, creating or listing issues, checking CI, looking at the repo, pushing a branch, publishing changes, or making a release on GitHub or Gitea. This skill now delegates to specialized skills for better predictability.
|
- [forge-interaction](common/deprecated/forge-interaction/SKILL.md) — Use when the user wants forge work such as opening a PR, creating or listing issues, checking CI, looking at the repo, pushing a branch, publishing changes, or making a release on GitHub or Gitea. This skill now delegates to specialized skills for better predictability.
|
||||||
|
|||||||
@@ -9,3 +9,4 @@
|
|||||||
## Model-invoked
|
## Model-invoked
|
||||||
|
|
||||||
- [pkm-curation](pkm-curation/SKILL.md) — Curate an Obsidian vault — classify notes, normalize frontmatter, add wikilinks, extract atomic notes. Use when curating, batch-processing, reviewing, or doing a serendipity pick.
|
- [pkm-curation](pkm-curation/SKILL.md) — Curate an Obsidian vault — classify notes, normalize frontmatter, add wikilinks, extract atomic notes. Use when curating, batch-processing, reviewing, or doing a serendipity pick.
|
||||||
|
- [youtube-video-capture](youtube-video-capture/SKILL.md) — Fetch subtitles from a YouTube video, summarize the content, and save the summary and raw subtitles to the Video bundle.
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
---
|
||||||
|
name: youtube-video-capture
|
||||||
|
description: Fetch subtitles from a YouTube video, summarize the content, and save both the summary and raw subtitles to the Video bundle in the Obsidian vault. Use when the user wants to capture a YouTube video, mentions "summarize this video", "capture this talk", or pastes a YouTube URL wanting it saved to vault.
|
||||||
|
disable-model-invocation: true
|
||||||
|
---
|
||||||
|
|
||||||
|
Capture a YouTube video into the Obsidian vault. Extract subtitles, produce a summary, and save both to the `Video/` bundle as OKF-conformant notes.
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
`yt-dlp` must be installed. Check with `which yt-dlp`. If missing, tell the user to install it (`pip install yt-dlp` or `brew install yt-dlp`) and stop.
|
||||||
|
|
||||||
|
## Extract subtitles
|
||||||
|
|
||||||
|
Run `yt-dlp` to download auto-generated English subtitles as SRT:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yt-dlp --write-auto-subs --sub-lang en-orig --convert-subs srt --skip-download -o "/tmp/yt-subs-%(id)s.%(ext)s" "<url>"
|
||||||
|
```
|
||||||
|
|
||||||
|
If no subtitles are available, tell the user and stop.
|
||||||
|
|
||||||
|
Read the SRT file. Strip timestamps and sequence numbers to produce clean, contiguous text for summarization.
|
||||||
|
|
||||||
|
## Summarize
|
||||||
|
|
||||||
|
Produce a prose summary from the full subtitle text. Synthesize the content — do not regurgitate the transcript. Then extract **key takeaways** as a bulleted list.
|
||||||
|
|
||||||
|
## Write to vault
|
||||||
|
|
||||||
|
The vault root is `/home/sjb/Documents/sjb-brain/`. The `Video/` bundle is an OKF bundle. Create the directory if it doesn't exist, with an `index.md` and `log.md` following the pattern of other bundles in the vault.
|
||||||
|
|
||||||
|
### Filenames
|
||||||
|
|
||||||
|
- Summary: `YYYY-MM-DD_HH-mm_<kebab-case-title>.md`
|
||||||
|
- Subtitle: `YYYY-MM-DD_HH-mm_<kebab-case-title>.srt`
|
||||||
|
|
||||||
|
Use the video title, kebab-cased.
|
||||||
|
|
||||||
|
### Summary note
|
||||||
|
|
||||||
|
Write a markdown note with OKF v0.1 frontmatter:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
id: <kebab-case-title>
|
||||||
|
type: Video Summary
|
||||||
|
aliases: []
|
||||||
|
tags: [video, youtube, <content-derived-tags>]
|
||||||
|
area: <derived-from-content-or-empty>
|
||||||
|
project: ''
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
Body:
|
||||||
|
|
||||||
|
- Video title as the note's `#` heading
|
||||||
|
- Link to the original YouTube URL
|
||||||
|
- The prose summary
|
||||||
|
- `## Key Takeaways` with bulleted list
|
||||||
|
- `## Subtitle` with a markdown link to the `.srt` file
|
||||||
|
|
||||||
|
Use standard markdown links, never `[[wikilinks]]`.
|
||||||
|
|
||||||
|
### Subtitle file
|
||||||
|
|
||||||
|
Copy the SRT file into `Video/` alongside the summary. No frontmatter.
|
||||||
|
|
||||||
|
### Bundle maintenance
|
||||||
|
|
||||||
|
After writing the pair:
|
||||||
|
|
||||||
|
1. Update `Video/index.md` — add the new summary under a `## Flat Notes` or appropriate heading, with a one-line description.
|
||||||
|
2. Append an entry to `Video/log.md` noting the addition with a timestamp.
|
||||||
|
|
||||||
|
### Safety
|
||||||
|
|
||||||
|
- If a filename collides, append a numeric suffix.
|
||||||
|
- Redact likely credentials, secrets, or tokens from any inline content.
|
||||||
|
- If the video has no subtitles, stop — do not attempt to transcribe.
|
||||||
Reference in New Issue
Block a user