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 npx skillpacks install <pack> instead of the target skill. Only the currently running skill and skills verified available in the active session or project-local install state are directly recommendable. For unavailable pack skills, recommend npx skillpacks install <pack-or-skill>; for unavailable base skills, recommend npx skillpacks init before the skill.
YouTube Format Research
Invoke as $youtube-format-research.
Report-First Approval Gate
Default to scope-first approval: before synthesized research, inspect only enough repository, user, and source context to propose research scope, source plan, assumptions, output paths, and approval questions in a review alignment page plus a concise conversation summary.
Do not perform synthesized research, rank candidates, make recommendations, or write working packets or canonical deliverables until final compiled YAML approves the research scope. Minimal pre-approval discovery may identify available files, source categories, and open questions; label it as scope evidence, not findings.
After approved research-scope YAML, perform the research and write only the non-canonical working packet defined in the staged workflow. Then update the review alignment page with findings and stop again for feedback-only YAML or final compiled YAML artifact approval before creating or updating canonical research, spec, or task files.
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.
Staged Research Workflow
Use this staged workflow for synthesized research or report outputs that would create or update canonical research, spec, or task files.
- Stage 1 - Scope discovery and approval. Inspect only enough repository, user, and source context to propose research scope, source plan, assumptions, output paths, and approval questions. Build the
review HTML alignment page before synthesized research. The page must render the proposed scope, available source categories, known context, assumptions/confidence, proposed working-packet and canonical output paths, and research-scope approval gates. Stop for final compiled YAML approval of the research scope. Do not perform synthesized research, rank candidates, make recommendations, or write working packets, canonical research, spec, or task files in Stage 1.
- Stage 2 - Research and artifact review. Only after approved research-scope YAML with no unresolved
needs-clarification, unresolved down feedback, or other unresolved negative feedback, perform the synthesized research, run required source/code checks, and write only a non-canonical working packet: flat mode uses research/_working/preliminary-<skill>-research.md; product-path mode uses research/{slug}/_working/preliminary-<skill>-research.md. Replace <skill> with this skill's name value. Raw evidence or search logs may remain as supporting evidence where this skill already requires them, but synthesized deliverables stay in the working packet. Update the review HTML alignment page so it renders the complete working-packet substance as structured HTML review UI: purpose-built sections, tables, matrices, gates, cards, and tier-appropriate charts or diagrams that preserve every packet section, finding, caveat, and decision detail without summary loss. Raw Markdown packet text may appear only as a supplemental source view after the rendered review UI; do not make a Full Preliminary Packet or Full Working Packet raw Markdown dump, giant <pre><code> block, link-only view, or source-only view the primary review surface. Include the evidence matrix, assumptions/confidence register, source coverage gaps, proposed canonical file changes, and artifact approval gates. Stop for either feedback-only YAML or final compiled YAML. Feedback-only YAML revises the working packet and page, then remains in Stage 2.
- Stage 3 - Finalize approved artifacts. Consume final compiled YAML for artifact approval only when it has no unresolved
needs-clarification, unresolved down feedback, or other unresolved negative feedback. Apply approved edits first, archive the working packet to docs/history/archive/YYYY-MM-DD/HHMMSS/<original-working-path>, remove the active working packet, write the approved canonical artifacts to the unchanged output paths below, and convert the alignment page to confirmed with the approval record preserved.
Canonical output paths remain unchanged. Search logs and other supporting evidence remain allowed only where this skill's output contract already requires them.
Evidence And Feedback Handling
Treat user feedback as input to evaluate, not as automatic ground truth.
- For factual, evidentiary, technical, or source-backed claims: verify against available evidence. If the user appears to misunderstand the evidence or states something factually incorrect, push back clearly and cite the evidence. Do not rewrite findings merely to agree.
- For taste, brand, positioning preference, risk appetite, prioritization, or other subjective judgment calls: weigh user feedback heavily and adapt the recommendation unless it conflicts with verified evidence.
- When feedback mixes facts and preference, separate them explicitly: correct the factual part, then incorporate the preference where it is a legitimate judgment call.
- When uncertain, say what is known, what is inferred, and what would change the conclusion.
Inputs
- Required: one YouTube video URL or video ID.
- Optional
--target remotion|script|style-guide: default remotion.
- Optional
--compare <video URL or ID...>: additional references to distinguish repeatable format rules from one-off choices.
Process
Resolve all video targets into video IDs 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 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.
Inspect available metadata, transcript, chapters, thumbnail URLs, description, and any user-provided screenshots or notes. If visual details cannot be verified from available evidence, mark them as gaps instead of guessing.
Analyze:
- Scene grammar: opener, recurring segments, transitions, title cards, examples, proof moments, CTA, outro.
- Timing and pacing: section durations, speaking density, cut rhythm, beats, visual resets, and retention support.
- Visual system: typography, color, layout, framing, captions, lower thirds, callouts, charts, browser frames, code blocks, or product shots.
- Motion language: camera moves, zooms, wipes, kinetic text, object movement, reveal timing, and transition rules.
- Audio language: music bed, silence, sound effects, emphasis beats, voiceover style, and mix notes when evidence supports them.
- Production assets: required footage, screenshots, diagrams, logos, fonts, icons, stock, B-roll, music, SFX, and licensing checks.
Translate the reference into reusable format rules without copying copyrighted assets or pretending the exact source project is available.
Output
Create the research/youtube/ directory if it does not exist.
Write:
research/youtube/format-research-<video-id>-YYYY-MM-DD.md
Use this structure:
# YouTube Format Research - [Title]
> Video: [URL]
> Target: remotion / script / style-guide
> Date captured: YYYY-MM-DD
> Evidence: [raw paths used]
## Evidence Coverage
| Evidence | Status | Path or gap |
|---|---|---|
| Public metadata | Available / Missing | ... |
| Transcript | Available / Missing | ... |
| Chapters | Available / Missing | ... |
| Visual references | Available / Missing | ... |
| Audio references | Available / Missing | ... |
## Format Summary
[The repeatable format in one concise brief.]
## Scene And Timing Map
| Segment | Approx time | Purpose | Visual treatment | Audio / motion notes |
|---|---:|---|---|---|
| ... | ... | ... | ... | ... |
## Visual And Motion System
- **Typography**: ...
- **Color and layout**: ...
- **Captions / callouts**: ...
- **Transitions**: ...
- **Recurring components**: ...
## Production Grammar
[Rules for pacing, proof, examples, visual resets, CTA placement, and when to change scenes.]
## Remotion Handoff
| Component / asset | Role | Inputs | Notes |
|---|---|---|---|
| ... | ... | ... | ... |
## Adaptation Guidance
[What to copy as a pattern, what to avoid copying directly, and what to change for the user's brand or series.]
## Evidence Gaps And Human Checks
[Missing screenshots, unavailable fonts, uncertain audio details, licensing checks, or manual review needs.]
Constraints
- Do not copy or embed copyrighted assets, music, fonts, footage, or thumbnails unless the user confirms licensing.
- Do not invent visual details that are not evident from metadata, transcript, screenshots, or user-provided notes.
- Distinguish repeatable format rules from one-off creative choices.
- Keep Remotion handoff at the component/spec level; actual scaffold and render planning belongs to
$video-build.
- 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
Follow the shared alignment-page convention via the packaged convention resolver; output path is alignment/youtube-format-research-{topic}.html.
Default Shipping Contract
Follow the shared shipping contract convention in CLAUDE.md.
1---2name: youtube-format-research3description: Break down a YouTube video's format, visual system, pacing, editing grammar, motion, audio, and Remotion-ready production patterns4---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 `npx skillpacks install <pack>` instead of the target skill. Only the currently running skill and skills verified available in the active session or project-local install state are directly recommendable. For unavailable pack skills, recommend `npx skillpacks install <pack-or-skill>`; for unavailable base skills, recommend `npx skillpacks init` before the skill.
9
10# YouTube Format Research
11
12Invoke as `$youtube-format-research`.
13
14## Report-First Approval Gate
15
16Default to scope-first approval: before synthesized research, inspect only enough repository, user, and source context to propose research scope, source plan, assumptions, output paths, and approval questions in a `review` alignment page plus a concise conversation summary.
17
18Do not perform synthesized research, rank candidates, make recommendations, or write working packets or canonical deliverables until final compiled YAML approves the research scope. Minimal pre-approval discovery may identify available files, source categories, and open questions; label it as scope evidence, not findings.
19
20After approved research-scope YAML, perform the research and write only the non-canonical working packet defined in the staged workflow. Then update the `review` alignment page with findings and stop again for feedback-only YAML or final compiled YAML artifact approval before creating or updating canonical research, spec, or task files.
21
22Do 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.
23
24## Staged Research Workflow
25
26Use this staged workflow for synthesized research or report outputs that would create or update canonical research, spec, or task files.
27
281. **Stage 1 - Scope discovery and approval.** Inspect only enough repository, user, and source context to propose research scope, source plan, assumptions, output paths, and approval questions. Build the `review` HTML alignment page before synthesized research. The page must render the proposed scope, available source categories, known context, assumptions/confidence, proposed working-packet and canonical output paths, and research-scope approval gates. Stop for final compiled YAML approval of the research scope. Do not perform synthesized research, rank candidates, make recommendations, or write working packets, canonical research, spec, or task files in Stage 1.
292. **Stage 2 - Research and artifact review.** Only after approved research-scope YAML with no unresolved `needs-clarification`, unresolved `down` feedback, or other unresolved negative feedback, perform the synthesized research, run required source/code checks, and write only a non-canonical working packet: flat mode uses `research/_working/preliminary-<skill>-research.md`; product-path mode uses `research/{slug}/_working/preliminary-<skill>-research.md`. Replace `<skill>` with this skill's `name` value. Raw evidence or search logs may remain as supporting evidence where this skill already requires them, but synthesized deliverables stay in the working packet. Update the `review` HTML alignment page so it renders the complete working-packet substance as structured HTML review UI: purpose-built sections, tables, matrices, gates, cards, and tier-appropriate charts or diagrams that preserve every packet section, finding, caveat, and decision detail without summary loss. Raw Markdown packet text may appear only as a supplemental source view after the rendered review UI; do not make a `Full Preliminary Packet` or `Full Working Packet` raw Markdown dump, giant `<pre><code>` block, link-only view, or source-only view the primary review surface. Include the evidence matrix, assumptions/confidence register, source coverage gaps, proposed canonical file changes, and artifact approval gates. Stop for either feedback-only YAML or final compiled YAML. Feedback-only YAML revises the working packet and page, then remains in Stage 2.
303. **Stage 3 - Finalize approved artifacts.** Consume final compiled YAML for artifact approval only when it has no unresolved `needs-clarification`, unresolved `down` feedback, or other unresolved negative feedback. Apply approved edits first, archive the working packet to `docs/history/archive/YYYY-MM-DD/HHMMSS/<original-working-path>`, remove the active working packet, write the approved canonical artifacts to the unchanged output paths below, and convert the alignment page to `confirmed` with the approval record preserved.
31
32Canonical output paths remain unchanged. Search logs and other supporting evidence remain allowed only where this skill's output contract already requires them.
33
34## Evidence And Feedback Handling
35
36Treat user feedback as input to evaluate, not as automatic ground truth.
37
38- For factual, evidentiary, technical, or source-backed claims: verify against available evidence. If the user appears to misunderstand the evidence or states something factually incorrect, push back clearly and cite the evidence. Do not rewrite findings merely to agree.
39- For taste, brand, positioning preference, risk appetite, prioritization, or other subjective judgment calls: weigh user feedback heavily and adapt the recommendation unless it conflicts with verified evidence.
40- When feedback mixes facts and preference, separate them explicitly: correct the factual part, then incorporate the preference where it is a legitimate judgment call.
41- When uncertain, say what is known, what is inferred, and what would change the conclusion.
42
43## Inputs
44
45- Required: one YouTube video URL or video ID.
46- Optional `--target remotion|script|style-guide`: default `remotion`.
47- Optional `--compare <video URL or ID...>`: additional references to distinguish repeatable format rules from one-off choices.
48
49## Process
50
511. Resolve all video targets into video IDs from watch URLs, Shorts URLs, youtu.be URLs, embed URLs, or raw 11-character IDs.
522. Require `yt-dlp` for public metadata:
53
54 ```bash
55 command -v yt-dlp
56 ```
57
583. 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.
594. Persist raw evidence under `research/youtube/data/<video-id>/`:
60 - `metadata-YYYY-MM-DD.json`: raw `yt-dlp --dump-json "VIDEO_URL"` output.
61 - `transcript/<video-id>.json`: raw transcript JSON when available.
62 - `transcript/transcript-summary.json`: transcript text or failure reason.
635. Inspect available metadata, transcript, chapters, thumbnail URLs, description, and any user-provided screenshots or notes. If visual details cannot be verified from available evidence, mark them as gaps instead of guessing.
646. Analyze:
65 - Scene grammar: opener, recurring segments, transitions, title cards, examples, proof moments, CTA, outro.
66 - Timing and pacing: section durations, speaking density, cut rhythm, beats, visual resets, and retention support.
67 - Visual system: typography, color, layout, framing, captions, lower thirds, callouts, charts, browser frames, code blocks, or product shots.
68 - Motion language: camera moves, zooms, wipes, kinetic text, object movement, reveal timing, and transition rules.
69 - Audio language: music bed, silence, sound effects, emphasis beats, voiceover style, and mix notes when evidence supports them.
70 - Production assets: required footage, screenshots, diagrams, logos, fonts, icons, stock, B-roll, music, SFX, and licensing checks.
717. Translate the reference into reusable format rules without copying copyrighted assets or pretending the exact source project is available.
72
73## Output
74
75Create the `research/youtube/` directory if it does not exist.
76
77Write:
78
79```text
80research/youtube/format-research-<video-id>-YYYY-MM-DD.md
81```
82
83Use this structure:
84
85```markdown
86# YouTube Format Research - [Title]
87
88> Video: [URL]
89> Target: remotion / script / style-guide
90> Date captured: YYYY-MM-DD
91> Evidence: [raw paths used]
92
93## Evidence Coverage
94
95| Evidence | Status | Path or gap |
96|---|---|---|
97| Public metadata | Available / Missing | ... |
98| Transcript | Available / Missing | ... |
99| Chapters | Available / Missing | ... |
100| Visual references | Available / Missing | ... |
101| Audio references | Available / Missing | ... |
102
103## Format Summary
104
105[The repeatable format in one concise brief.]
106
107## Scene And Timing Map
108
109| Segment | Approx time | Purpose | Visual treatment | Audio / motion notes |
110|---|---:|---|---|---|
111| ... | ... | ... | ... | ... |
112
113## Visual And Motion System
114
115- **Typography**: ...
116- **Color and layout**: ...
117- **Captions / callouts**: ...
118- **Transitions**: ...
119- **Recurring components**: ...
120
121## Production Grammar
122
123[Rules for pacing, proof, examples, visual resets, CTA placement, and when to change scenes.]
124
125## Remotion Handoff
126
127| Component / asset | Role | Inputs | Notes |
128|---|---|---|---|
129| ... | ... | ... | ... |
130
131## Adaptation Guidance
132
133[What to copy as a pattern, what to avoid copying directly, and what to change for the user's brand or series.]
134
135## Evidence Gaps And Human Checks
136
137[Missing screenshots, unavailable fonts, uncertain audio details, licensing checks, or manual review needs.]
138```
139
140## Constraints
141
142- Do not copy or embed copyrighted assets, music, fonts, footage, or thumbnails unless the user confirms licensing.
143- Do not invent visual details that are not evident from metadata, transcript, screenshots, or user-provided notes.
144- Distinguish repeatable format rules from one-off creative choices.
145- Keep Remotion handoff at the component/spec level; actual scaffold and render planning belongs to `$video-build`.
146- Do not bypass login walls, bot protections, access controls, or private YouTube Studio data.
147- Archive existing canonical artifacts before replacing them under `docs/history/archive/YYYY-MM-DD/HHMMSS/<original-relative-path>`.
148
149## Approved Artifact Handoff
150
151After an approved synthesized write, explicit write/update mode, or any direct artifact mutation:
152
153- List every created or updated synthesized artifact path in the final response.
154- State the verification performed, such as readback, schema/check command, or why no executable verification applies for a Markdown-only strategy artifact.
155- 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.
156- Do not imply the research workflow is complete while approved artifacts remain untracked or uncommitted unless the user explicitly asked not to ship.
157- If stopping for approval before writing, the approval request remains the next action; do not include downstream routing.
158
159## Intent-Aware Routing
160
161Before applying the default `## Next-Skill Routing` sequence, classify the user's immediate intent and route to the missing action that best serves that intent:
162
163- Strategy refresh: recommend the missing or stale positioning, programming, portfolio, metrics, or product-media artifact.
164- Recording prep: recommend the missing series spec, script, build proof, walkthrough guide, or validation artifact needed before recording.
165- Upload prep: recommend packaging, title/thumbnail, description, chapters, or final metadata work before broader strategy work.
166- Performance review: recommend metrics, cadence, portfolio, peer benchmark, or owner-analytics export work before new content planning.
167- Owner analytics or private/manual platform evidence: route to an explicit manual/guide handoff instead of inventing unavailable metrics.
168- Dirty intended artifacts: route to shipping/commit/handoff first, not another creator strategy skill.
169
170Use the default next-skill sequence only when no stronger user intent, missing artifact, manual blocker, or dirty-artifact handoff applies.
171
172## Alignment Page
173
174Follow the shared alignment-page convention via the packaged convention resolver; output path is `alignment/youtube-format-research-{topic}.html`.
175
176## Default Shipping Contract
177
178Follow the shared shipping contract convention in CLAUDE.md.
179