-
Require a single YouTube URL argument. If it is missing, ask for it.
-
Launch exactly one general subagent and give it the URL. In the task prompt, explicitly say: Subagent limit: 1. Do not spawn additional subagents.
-
In the subagent, run:
python3 ~/.config/opencode/skills/youtube-transcript/youtube_transcript.py gather "<url>"
-
Read the JSON printed by gather and capture manifest_path plus output_markdown.
-
In the subagent, run:
python3 ~/.config/opencode/skills/youtube-transcript/youtube_transcript.py merge "<manifest_path>" "<output_markdown>"
-
Read the generated manifest and normalized source files. Spot-check the merged markdown against:
- manual subtitles, if present
- automatic captions, if present
- Whisper output
-
If the merged markdown still has obvious errors, missing phrases, or bad formatting, edit the markdown file directly before finishing.
-
Return the final markdown path, video title, source mix, and any caveats to the main agent.