Orchestrates end-to-end podcast episode production for drug repurposing stories. Use this skill when the user requests creating a podcast episode for a specific drug-disease pair (e.g., "Create an episode for Aspirin and Cardiovascular Disease Prevention" or "Produce the Metformin PCOS episode"). Automatically runs the full production pipeline: archivist (research) → showrunner (structure) → podcast-writer (scripting) → editor (editorial pass) → speaker (audio generation) → git commit. Handles error recovery with TODO markers and partial work commits.
This skill orchestrates the complete production of a drug repurposing podcast episode through a sequential 5-agent pipeline. Each agent builds on the previous agent's output, creating a fully produced episode ready for publishing.
The pipeline runs agents in this order:
After completion, changes are automatically committed to git (but not pushed).
Extract the drug name and disease from user request. Common phrasings:
Normalize to format: pair-<drug>-<disease> (lowercase, hyphens for spaces)
Ensure the working directory structure exists:
stories/pair-<drug>-<disease>/
├── background/ (created by archivist)
├── shownotes/ (created by showrunner)
└── transcript/ (created by podcast-writer)
Execute agents sequentially using the Task tool. After each agent:
Execute agents in this order:
Task tool parameters:
- subagent_type: "archivist"
- description: "Research background for [drug]-[disease]"
- prompt: "Research and compile a comprehensive, evidence-first background dossier for
[Drug Name] repurposed for [Disease Name]. Use specialized sources first
(PubMed, ClinicalTrials.gov, bioRxiv/medRxiv, patents, FDA/EMA docs), then
general web search only to fill gaps. Generate detailed background files
with citations covering context, origin, evidence of discovery/trigger,
regulatory/adoption history, mechanism, and impact."
Output: stories/pair-<drug>-<disease>/background/*.md files
Verification: Check that at least 5 background files were created with substantial content
Task tool parameters:
- subagent_type: "showrunner"
- description: "Create episode structure for [drug]-[disease]"
- prompt: "Using the background dossier at stories/pair-<drug>-<disease>/background/,
choose the narrative structure that best fits the evidence, then create the episode
structure with cold open, chapter outline, thematic playbook, and grading criteria.
Output to stories/pair-<drug>-<disease>/shownotes/"
Output: stories/pair-<drug>-<disease>/shownotes/*.md files
Verification: Check that 00-episode-structure.md exists with narrative arc and timing
Task tool parameters:
- subagent_type: "podcast-writer"
- description: "Generate transcript for [drug]-[disease]"
- prompt: "Using the episode structure at stories/pair-<drug>-<disease>/shownotes/,
generate full podcast transcript with dual-host dialogue (Marcus & Elena),
following the showrunner's chosen structure. Ensure equal speaker distribution
and varied emotional tags. Format for ElevenLabs podcast API. Output to
stories/pair-<drug>-<disease>/transcript/"
Output: stories/pair-<drug>-<disease>/transcript/*.md files (one per chapter)
Verification: Check that multiple transcript sections exist with balanced speaker distribution
Task tool parameters:
- subagent_type: "editor"
- description: "Editorial pass for [drug]-[disease]"
- prompt: "Perform comprehensive editorial pass on transcript at
stories/pair-<drug>-<disease>/transcript/. Fix narrative flow, transitions,
duplication, pacing issues. Update transcript files directly and create
editorial summary."
Output: Updated transcript files + editorial notes
Verification: Check that editorial notes or summary file was created
Task tool parameters:
- subagent_type: "speaker"
- description: "Generate audio for [drug]-[disease]"
- prompt: "Generate podcast audio from completed transcript at
stories/pair-<drug>-<disease>/transcript/ using Google Gemini TTS API.
Output MP3 file to stories/pair-<drug>-<disease>/transcript/"
Output: stories/pair-<drug>-<disease>/transcript/*.mp3 file
Verification: Check that MP3 file exists and has non-zero size
After successful completion, commit all work:
git add stories/pair-<drug>-<disease>/
git commit -m "Complete episode production: <Drug> - <Disease>
- Research: Background dossier compiled by archivist
- Structure: Episode outline and show notes created
- Script: Dual-host transcript generated
- Editorial: Final narrative pass completed
- Audio: Full episode MP3 generated
Episode ready for review and publishing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>"
Important: Do NOT push to remote. Only commit locally.
Provide summary to user:
If any agent fails during the pipeline:
Write detailed error report to:
stories/pair-<drug>-<disease>/PRODUCTION_ERROR.md
Error file format:
# Production Error: [Drug] - [Disease]
**Date**: [ISO timestamp]
**Failed Agent**: [Agent name that failed]
**Pipeline Stage**: [Stage number and name]
## Error Description
[Detailed error message and stack trace if available]
## Work Completed
- [x] Archivist: Background dossier completed
- [x] Showrunner: Episode structure completed
- [ ] Podcast-writer: FAILED HERE
- [ ] Editor: Not started
- [ ] Speaker: Not started
## Files Created
[List of files successfully created before failure]
## Required Action
TODO: Human intervention required to resolve this error and continue production.
[Specific guidance on what needs to be fixed based on the error]
## Resuming Production
After fixing the error, resume from the failed agent:
[Command to resume, e.g., "Continue podcast production from podcast-writer step"]
Even on failure, commit what was completed:
git add stories/pair-<drug>-<disease>/
git commit -m "PARTIAL: Episode production incomplete: <Drug> - <Disease>
Pipeline failed at [Agent Name] stage.
See PRODUCTION_ERROR.md for details.
Work completed:
- [List completed stages]
TODO: Human intervention required to resolve production error.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>"
Clearly communicate:
grep -r "TODO" stories/pair-<drug>-<disease>/If user specifies stopping early:
Then run only the specified agents and stop. Still commit the partial work.
If directory already has completed work:
If user wants to re-run a single agent:
Then run only that agent, potentially overwriting previous output.
After each agent completes, perform verification and automatic cleanup:
Expected files (9 total):
README.md
background/00-dossier-overview.md
background/01-context.md
background/02-origin.md
background/03-struggle.md
background/04-pivot-point.md
background/05-renaissance.md
background/06-mechanism.md
background/07-impact.md
Common mistakes to auto-fix:
background/00-summary.md → rename to 00-dossier-overview.mdbackground/01-context-era.md → rename to 01-context.mdbackground/02-origin-intended-use.md → rename to 02-origin.mdbackground/03-struggle-failure.md → rename to 03-struggle.mdbackground/dossier-overview.md → rename to 00-dossier-overview.mdVerification:
Expected files (5 total in shownotes/):
shownotes/00-episode-structure.md
shownotes/01-cold-open.md
shownotes/02-narrative-arc.md
shownotes/03-playbook.md
shownotes/04-grading-criteria.md
Common mistakes to auto-fix:
episode-structure.md at root → move to shownotes/00-episode-structure.mdshownotes/EPISODE_STRUCTURE.md → rename to 00-episode-structure.mdshownotes/02-chapter-outline.md → rename to 02-narrative-arc.mdEPISODE_STRUCTURE.md and 01-episode-structure.md) → keep numbered one, delete duplicateVerification:
Expected files (9 total in transcript/):
transcript/01-cold-open.md
transcript/02-context.md
transcript/03-origin.md
transcript/04-struggle.md
transcript/05-pivot-point.md
transcript/06-renaissance.md
transcript/07-impact.md
transcript/08-playbook.md
transcript/09-grading.md
Common mistakes to auto-fix:
transcript/02-chapter1-wrong-target.md → rename to 02-context.mdtranscript/easter-island.md → rename based on position to appropriate chapterVerification:
Expected files (1 new file):
EDITORIAL_NOTES.md
Common mistakes to auto-fix:
00-EDITORIAL-NOTES.md → rename to EDITORIAL_NOTES.mdEDITORIAL_SUMMARY.md → rename to EDITORIAL_NOTES.mdeditorial-notes.md → rename to EDITORIAL_NOTES.md (uppercase)Verification:
Expected files (1 audio file):
transcript/<drug>-full-episode.mp3
Common mistakes to auto-fix:
transcript/full-episode.mp3 → rename to <drug>-full-episode.mp3transcript/episode.mp3 → rename to <drug>-full-episode.mp3transcript/<drug>-<disease>-full-episode.mp3 → rename to <drug>-full-episode.mp3Verification:
When issues are detected, automatically:
Rename files with wrong names:
mv "old-name.md" "correct-name.md"
Move files to correct locations:
mv "episode-structure.md" "shownotes/00-episode-structure.md"
Delete duplicate files:
rm "EPISODE_STRUCTURE.md" # Keep the numbered version
Report cleanup to user:
✓ Cleaned up file structure after [Agent] completed:
- Renamed: background/00-summary.md → 00-dossier-overview.md
- Moved: episode-structure.md → shownotes/00-episode-structure.md
- Deleted duplicate: EPISODE_STRUCTURE.md
If issues cannot be auto-fixed, use retry-with-feedback mechanism:
Detect problems that require agent re-work:
Give the agent ONE chance to fix issues by re-invoking with specific feedback:
Task tool parameters:
- subagent_type: "[agent-name]"
- description: "Fix issues in [agent] output"
- prompt: "You previously generated output for [drug]-[disease] but there were issues.
Problems found:
- [Specific issue 1]
- [Specific issue 2]
- [Specific issue 3]
Please fix these issues. Your output should include:
- [Expected file 1]
- [Expected file 2]
- [Expected file 3]
Do NOT repeat the mistakes. Follow the file structure exactly as specified
in your instructions."
Feedback should be specific:
After agent re-runs:
If agent fails twice (original + one retry), give up and follow error handling:
Example error report:
## Error Description
Archivist agent failed to create required files after two attempts.
First attempt issues:
- Missing file: background/04-pivot-point.md
- File background/02-origin.md was empty
Agent was re-invoked with specific feedback.
Second attempt issues:
- Still missing file: background/04-pivot-point.md
- File now has content but no citations
After two attempts, agent could not produce correct output.
## Required Action
TODO: Human needs to manually create background/04-pivot-point.md
Auto-fix (no retry needed):
Retry with feedback:
Fail immediately (no retry):
All agents are defined in .claude/agents/ directory:
archivist.mdshowrunner.mdpodcast-writer.mdeditor.mdspeaker.mdfeedback.md (used separately after episode completion)These files contain detailed instructions for each agent's specific responsibilities.
After episode completion and user review:
stories/pair-<drug>-<disease>/feedback.md.claude/agents/The podcast-producer skill does NOT automatically run the feedback agent. Feedback is a separate, periodic process run across multiple episodes.
User: "Create an episode for Aspirin and Cardiovascular Disease Prevention"
Skill Actions:
stories/pair-aspirin-cardiovascular-disease-prevention/Episode production succeeds when:
If an agent runs too long, it may timeout. Consider:
If agents fail due to missing tools:
If git commit fails due to conflicts: