devhims/video2ctx / .agents/skills/youtube-ctx
youtube-ctx
UnverifiedPersonal, local-machine YouTube context for one-off, low-to-moderate usage. Use for public YouTube search, transcripts, metadata, comments, channels, playlists, storyboard inspection, and optional exact-frame verification without an account or hosted service. Also use to check suspected transcript misspellings, misheard names or terms, and inaccuracies against video context or on-screen evidence. Requires Node.js 18.17+; FFmpeg is optional and needed only for exact frames.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.4 KB |
| agents/openai.yaml | config | 260 B |
| references/direct.md | markdown | 3.2 KB |
| references/visual.md | markdown | 5.7 KB |
| scripts/watch.mjsexecutable | script | 1014.5 KB |
| scripts/youtube.mjsexecutable | script | 979.7 KB |
references/direct.md
View on GitHub# Direct context workflow
Run the bundled executable for stateless YouTube search and extraction. It sends requests from the user's machine directly to YouTube and requires no video2ctx account, API key, hosted service, or npm installation.
## Run an operation
Resolve `scripts/youtube.mjs` relative to the parent skill directory containing `SKILL.md`, then invoke it with Node.js. Use its absolute path when the user's working directory is elsewhere.
```bash
node <skill-directory>/scripts/youtube.mjs --help
```
Search before extraction when the user supplied a topic rather than a known resource ID:
```bash
node <skill-directory>/scripts/youtube.mjs search \
--query "agent skills" \
--type video \
--captions-only
```
Extract a transcript from a known video:
```bash
node <skill-directory>/scripts/youtube.mjs transcript \
--video-id dQw4w9WgXcQ \
--format text
```
Use `--format text` when the task needs transcript content or a summary rather than timestamps. Use `--format segments` for segment timing and `--format words` only for word-level timing. The legacy `--granularity segment|word` flag remains supported, but do not combine it with `--format`.
The executable writes one JSON value to stdout. Parse that value and use it to answer the request. Treat stderr as a JSON error payload and inspect `error.message` alongside `error.code` and `error.retryable`; preserve the classified failure instead of converting it to an empty result. For blocked network requests, follow the parent skill's network-failure guidance before switching to the hosted fallback.
## Choose the operation
- `search` — videos, channels, or playlists matching a query
- `tracks` — source caption tracks and translation targets
- `transcript` — compact text, timed segments, or timed words
- `comments` — one page, or a bounded multi-page collection with `--all --max-pages <n>`
- `details` — video metadata and availability
- `endscreen` — interactive end-screen elements
- `channel-info` — channel identity and public About information
- `channel-videos` — one Videos-tab page
- `channel-playlists` — one Playlists-tab page
- `playlist` — playlist metadata and one video page
Use `--help` as the source of truth for flags and accepted values.
## Bound and verify
- Give pagination an explicit request or page budget. Reuse a continuation only with the same operation and query that produced it.
- Inspect `meta.partial` and `meta.warnings` whenever the returned resource provides them and the answer implies completeness. `endscreen` returns an array without `meta`.
- Call `tracks` first when transcript success depends on a particular source or translation language.
- Use `OUTBOUND_PROXY_URL` for an HTTP(S) proxy when the user's network requires one. Prefer the environment variable over `--proxy` so credentials do not appear in the process list.
- Expect YouTube's undocumented response shapes and client profiles to change. Report classified upstream failures accurately.
## Completion criteria
The requested local operation completed within an explicit pagination budget; JSON output was parsed; partial-result warnings were reflected where relevant; and any failure retained its error code and retryability.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |