Pack Availability Guard
Before telling the user to run a skill from another project-local pack, check .agents/project.json.enabled_packs. If the target pack is not enabled, recommend /pack install <pack> instead of the target skill. Global skills are always valid. Skills from this same pack are valid because the current skill is already running from that pack.
YouTube Video Research
Invoke as /youtube-vid-research.
Report-First Approval Gate
Default to report-only: present findings, evidence coverage, assumptions, recommended artifact path, and proposed file changes in a pre-approval alignment page plus a concise conversation summary for user approval before creating or updating canonical research, spec, or task files.
Do not write or overwrite synthesized deliverables until the user explicitly approves, unless the user invoked an explicit write/update/fix mode or clearly asked to write files upfront. Raw evidence capture may be persisted before analysis when reproducibility requires it; report those raw paths separately and still gate synthesized research/report writes.
When stopping for approval, build and attempt to open the alignment preview page first, then ask the user to review it and approve, question, or request adjustments. Do not include Recommended next skill, Recommended next command, or downstream routing language. The approval request itself is the next action. Only emit next-skill routing after the approved artifact has been written or updated.
Research external YouTube videos so the agent can understand what the user is referring to and reuse that context in specs, strategy, writing, product work, or implementation. This is the general comprehension lane; use /youtube-video-audit for performance diagnosis, /youtube-competitive-research for why a competitor video worked, and the remotion pack's /youtube-format-research for production/style breakdowns.
Inputs
- Required: one or more YouTube video URLs or video IDs.
- Optional
--focus context|claims|summary|references: default context.
- Optional
--compare-channel <slug>: reuse channel evidence under research/youtube/data/<slug>/ when the user asks how the reference relates to a known channel.
Workflow
Resolve every target into a video ID from watch URLs, Shorts URLs, youtu.be URLs, embed URLs, or raw 11-character IDs.
Require yt-dlp for public metadata:
command -v yt-dlp
Select a transcript Python interpreter. Prefer a workspace-local .venv; create it if missing. Install youtube-transcript-api into .venv only when the import check fails and network access is available.
Persist raw evidence before analysis under research/youtube/data/<video-id>/:
metadata-YYYY-MM-DD.json: raw yt-dlp --dump-json "VIDEO_URL" output.
transcript/<video-id>.json: raw transcript JSON when available.
transcript/transcript-summary.json: transcript text or failure reason.
Extract public metadata fields when present: title, URL, channel, upload date, duration, description, chapters, tags, categories, thumbnails, view count, like count, and comment count.
Analyze the video for:
- Main thesis, audience, context, and assumed prior knowledge.
- Key claims, examples, frameworks, named entities, tools, sources, and references.
- Narrative structure: hook, setup, sections, payoff, and CTA.
- User-relevant takeaways: what matters for the current project, idea, spec, or decision.
- Uncertainties and evidence gaps.
If multiple videos were supplied, synthesize common themes, contradictions, and how each video contributes distinct context.
Output
Create the research/youtube/ and research/youtube/data/<video-id>/ directories if they do not exist.
Write:
research/youtube/video-research-<video-id-or-slug>-YYYY-MM-DD.md
Use this structure:
# YouTube Video Research - [Title or Video Set]
> Videos: [URLs]
> Date captured: YYYY-MM-DD
> Evidence: [raw paths used]
> Focus: context / claims / summary / references
## Evidence Coverage
| Video | Public metadata | Transcript | Notes |
|---|---|---|---|
| [Title](URL) | Available / Missing | Available / Missing | ... |
## Context Brief
[What this video is about, who it is for, and why it matters to the user's request.]
## Key Claims And Examples
| Claim / Idea | Evidence | Confidence | Relevance |
|---|---|---|---|
| ... | metadata/transcript/chapter reference | High / Medium / Low | ... |
## Structure Notes
- **Hook**: ...
- **Sections**: ...
- **Payoff**: ...
- **CTA / next action**: ...
## Terms, References, And Source Leads
[Named people, companies, tools, papers, links, topics, or source leads surfaced by the video.]
## Transferable Takeaways
[What the user or downstream agent should carry forward.]
## Open Questions And Evidence Gaps
[Missing transcript, unclear claims, unavailable references, or claims needing independent verification.]
Constraints
- Do not invent transcript quotes, links, references, comments, metrics, or visual details.
- Mark missing transcript or metadata explicitly.
- Do not treat a single external video as proof of a market, trend, or channel pattern.
- When a claim affects factual, legal, medical, financial, or current-event accuracy, recommend independent source verification instead of relying only on the video.
- Do not bypass login walls, bot protections, access controls, or private YouTube Studio data.
- Archive existing canonical artifacts before replacing them under
docs/history/archive/YYYY-MM-DD/HHMMSS/<original-relative-path>.
Approved Artifact Handoff
After an approved synthesized write, explicit write/update mode, or any direct artifact mutation:
- List every created or updated synthesized artifact path in the final response.
- State the verification performed, such as readback, schema/check command, or why no executable verification applies for a Markdown-only strategy artifact.
- Check and report the relevant git status for intended artifacts when the project is a git repository. If intended artifacts are modified or untracked, make the next action shipping, committing, or an explicit dirty-artifact handoff before recommending downstream strategy work.
- Do not imply the research workflow is complete while approved artifacts remain untracked or uncommitted unless the user explicitly asked not to ship.
- If stopping for approval before writing, the approval request remains the next action; do not include downstream routing.
Intent-Aware Routing
Before applying the default ## Next-Skill Routing sequence, classify the user's immediate intent and route to the missing action that best serves that intent:
- Strategy refresh: recommend the missing or stale positioning, programming, portfolio, metrics, or product-media artifact.
- Recording prep: recommend the missing series spec, script, build proof, walkthrough guide, or validation artifact needed before recording.
- Upload prep: recommend packaging, title/thumbnail, description, chapters, or final metadata work before broader strategy work.
- Performance review: recommend metrics, cadence, portfolio, peer benchmark, or owner-analytics export work before new content planning.
- Owner analytics or private/manual platform evidence: route to an explicit manual/guide handoff instead of inventing unavailable metrics.
- Dirty intended artifacts: route to shipping/commit/handoff first, not another creator strategy skill.
Use the default next-skill sequence only when no stronger user intent, missing artifact, manual blocker, or dirty-artifact handoff applies.
Alignment Page
When this skill produces durable deliverables (research, specs, plans, reports, prototypes, or any document output), build a full-depth HTML alignment page following ALIGNMENT-PAGE.md in this skill's directory. Output: alignment/youtube-vid-research-{topic}.html.
1---2name: youtube-vid-research-53description: Research one or more external YouTube videos for context, claims, structure, examples, terminology, and transferable takeaways4---5
6## Pack Availability Guard
7
8Before telling the user to run a skill from another project-local pack, check `.agents/project.json.enabled_packs`. If the target pack is not enabled, recommend `/pack install <pack>` instead of the target skill. Global skills are always valid. Skills from this same pack are valid because the current skill is already running from that pack.
9
10# YouTube Video Research
11
12Invoke as `/youtube-vid-research`.
13
14## Report-First Approval Gate
15
16Default to report-only: present findings, evidence coverage, assumptions, recommended artifact path, and proposed file changes in a pre-approval alignment page plus a concise conversation summary for user approval before creating or updating canonical research, spec, or task files.
17
18Do not write or overwrite synthesized deliverables until the user explicitly approves, unless the user invoked an explicit write/update/fix mode or clearly asked to write files upfront. Raw evidence capture may be persisted before analysis when reproducibility requires it; report those raw paths separately and still gate synthesized research/report writes.
19
20When stopping for approval, build and attempt to open the alignment preview page first, then ask the user to review it and approve, question, or request adjustments. Do not include `Recommended next skill`, `Recommended next command`, or downstream routing language. The approval request itself is the next action. Only emit next-skill routing after the approved artifact has been written or updated.
21
22Research external YouTube videos so the agent can understand what the user is referring to and reuse that context in specs, strategy, writing, product work, or implementation. This is the general comprehension lane; use `/youtube-video-audit` for performance diagnosis, `/youtube-competitive-research` for why a competitor video worked, and the `remotion` pack's `/youtube-format-research` for production/style breakdowns.
23
24## Inputs
25
26- Required: one or more YouTube video URLs or video IDs.
27- Optional `--focus context|claims|summary|references`: default `context`.
28- Optional `--compare-channel <slug>`: reuse channel evidence under `research/youtube/data/<slug>/` when the user asks how the reference relates to a known channel.
29
30## Workflow
31
321. Resolve every target into a video ID from watch URLs, Shorts URLs, youtu.be URLs, embed URLs, or raw 11-character IDs.
332. Require `yt-dlp` for public metadata:
34
35 ```bash
36 command -v yt-dlp
37 ```
38
393. Select a transcript Python interpreter. Prefer a workspace-local `.venv`; create it if missing. Install `youtube-transcript-api` into `.venv` only when the import check fails and network access is available.
404. Persist raw evidence before analysis under `research/youtube/data/<video-id>/`:
41 - `metadata-YYYY-MM-DD.json`: raw `yt-dlp --dump-json "VIDEO_URL"` output.
42 - `transcript/<video-id>.json`: raw transcript JSON when available.
43 - `transcript/transcript-summary.json`: transcript text or failure reason.
445. Extract public metadata fields when present: title, URL, channel, upload date, duration, description, chapters, tags, categories, thumbnails, view count, like count, and comment count.
456. Analyze the video for:
46 - Main thesis, audience, context, and assumed prior knowledge.
47 - Key claims, examples, frameworks, named entities, tools, sources, and references.
48 - Narrative structure: hook, setup, sections, payoff, and CTA.
49 - User-relevant takeaways: what matters for the current project, idea, spec, or decision.
50 - Uncertainties and evidence gaps.
517. If multiple videos were supplied, synthesize common themes, contradictions, and how each video contributes distinct context.
52
53## Output
54
55Create the `research/youtube/` and `research/youtube/data/<video-id>/` directories if they do not exist.
56
57Write:
58
59```text
60research/youtube/video-research-<video-id-or-slug>-YYYY-MM-DD.md
61```
62
63Use this structure:
64
65```markdown
66# YouTube Video Research - [Title or Video Set]
67
68> Videos: [URLs]
69> Date captured: YYYY-MM-DD
70> Evidence: [raw paths used]
71> Focus: context / claims / summary / references
72
73## Evidence Coverage
74
75| Video | Public metadata | Transcript | Notes |
76|---|---|---|---|
77| [Title](URL) | Available / Missing | Available / Missing | ... |
78
79## Context Brief
80
81[What this video is about, who it is for, and why it matters to the user's request.]
82
83## Key Claims And Examples
84
85| Claim / Idea | Evidence | Confidence | Relevance |
86|---|---|---|---|
87| ... | metadata/transcript/chapter reference | High / Medium / Low | ... |
88
89## Structure Notes
90
91- **Hook**: ...
92- **Sections**: ...
93- **Payoff**: ...
94- **CTA / next action**: ...
95
96## Terms, References, And Source Leads
97
98[Named people, companies, tools, papers, links, topics, or source leads surfaced by the video.]
99
100## Transferable Takeaways
101
102[What the user or downstream agent should carry forward.]
103
104## Open Questions And Evidence Gaps
105
106[Missing transcript, unclear claims, unavailable references, or claims needing independent verification.]
107```
108
109## Constraints
110
111- Do not invent transcript quotes, links, references, comments, metrics, or visual details.
112- Mark missing transcript or metadata explicitly.
113- Do not treat a single external video as proof of a market, trend, or channel pattern.
114- When a claim affects factual, legal, medical, financial, or current-event accuracy, recommend independent source verification instead of relying only on the video.
115- Do not bypass login walls, bot protections, access controls, or private YouTube Studio data.
116- Archive existing canonical artifacts before replacing them under `docs/history/archive/YYYY-MM-DD/HHMMSS/<original-relative-path>`.
117
118## Approved Artifact Handoff
119
120After an approved synthesized write, explicit write/update mode, or any direct artifact mutation:
121
122- List every created or updated synthesized artifact path in the final response.
123- State the verification performed, such as readback, schema/check command, or why no executable verification applies for a Markdown-only strategy artifact.
124- Check and report the relevant git status for intended artifacts when the project is a git repository. If intended artifacts are modified or untracked, make the next action shipping, committing, or an explicit dirty-artifact handoff before recommending downstream strategy work.
125- Do not imply the research workflow is complete while approved artifacts remain untracked or uncommitted unless the user explicitly asked not to ship.
126- If stopping for approval before writing, the approval request remains the next action; do not include downstream routing.
127
128## Intent-Aware Routing
129
130Before applying the default `## Next-Skill Routing` sequence, classify the user's immediate intent and route to the missing action that best serves that intent:
131
132- Strategy refresh: recommend the missing or stale positioning, programming, portfolio, metrics, or product-media artifact.
133- Recording prep: recommend the missing series spec, script, build proof, walkthrough guide, or validation artifact needed before recording.
134- Upload prep: recommend packaging, title/thumbnail, description, chapters, or final metadata work before broader strategy work.
135- Performance review: recommend metrics, cadence, portfolio, peer benchmark, or owner-analytics export work before new content planning.
136- Owner analytics or private/manual platform evidence: route to an explicit manual/guide handoff instead of inventing unavailable metrics.
137- Dirty intended artifacts: route to shipping/commit/handoff first, not another creator strategy skill.
138
139Use the default next-skill sequence only when no stronger user intent, missing artifact, manual blocker, or dirty-artifact handoff applies.
140
141## Alignment Page
142
143When this skill produces durable deliverables (research, specs, plans, reports, prototypes, or any document output), build a full-depth HTML alignment page following `ALIGNMENT-PAGE.md` in this skill's directory. Output: `alignment/youtube-vid-research-{topic}.html`.