npx skills add ...
npx skills add marswaveai/skills --skill explainer
Create explainer videos with narration and AI-generated visuals. Triggers on: "解说视频", "explainer video", "explain this as a video", "tutorial video", "introduce X (video)", "解释一下XX(视频形式)".
npx skills add marswaveai/skills --skill explainer
/speech or /podcast)/podcast)/image-gen)/speech)Generate explainer videos that combine a single narrator's voiceover with AI-generated visuals. Ideal for product introductions, concept explanations, and tutorials. Supports text-only script generation or full text + video output.
shared/config-pattern.md before any interactionshared/cli-patterns.md for execution modes, error handling, and interaction patternsshared/cli-authentication.md for auth checks~/Downloads/ or .listenhub/ — save artifacts to the current working directory with friendly topic-based names (see shared/config-pattern.md § Artifact Naming)info (for Info style) or story (for Story style) — never slides (use /slides skill instead)Follow shared/cli-authentication.md § Auth Check. If the CLI is not installed or the user is not logged in, auto-install and auto-login — never ask the user to run commands manually.
Then follow shared/cli-authentication.md § Auth Mode Detection to determine AUTH_MODE and set:
All subsequent CLI calls use $CMD_PREFIX instead of hardcoded listenhub explainer.
Note: The OpenAPI command is storybook (not explainer) — same backend, different naming.
Follow shared/config-pattern.md Step 0 (Zero-Question Boot).
If file doesn't exist — silently create with defaults and proceed:
Do NOT ask any setup questions. Proceed directly to the Interaction Flow.
If file exists — read config silently and proceed:
Only run when the user explicitly asks to reconfigure. Display current settings:
Then ask:
outputMode: Follow shared/output-mode.md § Setup Flow Question.
Language (optional): "默认语言?"
nullStyle (optional): "默认风格?"
nullAfter collecting answers, save immediately:
Free text input. Ask the user:
What would you like to explain or introduce?
Accept: topic description, text content, or concept to explain.
If config.language is set, pre-fill and show in summary — skip this question.
Otherwise ask:
If config.defaultStyle is set, pre-fill and show in summary — skip this question.
Otherwise ask:
Follow shared/speaker-selection.md:
config.defaultSpeakers.{language} is set → use saved speaker silentlyshared/speaker-selection.md for the languageSpeaker query: see shared/cli-speakers.md for listing and filtering speakers.
Only 1 speaker is supported for explainer videos.
Summarize all choices:
Wait for explicit confirmation before running any CLI command.
Run the CLI command with run_in_background: true and timeout: 660000. The CLI blocks until generation completes and returns the final result as JSON:
If the command fails (non-zero exit), check stderr for error details. See shared/cli-patterns.md § Error Handling for exit codes and common errors.
Optional flags (add when applicable):
--source-url "{url}" — if the user provided a reference URL--skip-audio — if text-only output (no video)--image-size {2K|4K} — image resolution (default: 2K)--aspect-ratio {16:9|9:16|1:1} — video aspect ratio (default: 16:9)--style "{style}" — visual style for AI-generated imagesTell the user the task is submitted. When notified of completion, parse and present result:
Parse the CLI JSON output for key fields:
Read OUTPUT_MODE from config. Follow shared/output-mode.md for behavior.
If text-only output:
inline or both: Present the script inline.
Present:
download or both: Also save the script file. Generate a topic slug following shared/config-pattern.md § Artifact Naming.
{slug}-explainer.md in cwd (dedup if exists)If text + video output:
inline or both: Display video URL and audio URL as clickable links.
Present:
download or both: Also save files. Generate a topic slug following shared/config-pattern.md § Artifact Naming.
{slug}-explainer/ folder (dedup if exists)script.md insideUpdate config with the choices made this session:
Estimated times:
shared/cli-authentication.mdshared/cli-patterns.mdshared/cli-speakers.mdshared/speaker-selection.mdshared/config-pattern.mdshared/output-mode.md/speech for voiceoverUser: "Create an explainer video introducing Claude Code"
Agent workflow:
Parse result for episodeId, audioUrl, videoUrl, credits, and present to user.
mkdir -p ".listenhub/explainer"
echo '{"outputMode":"inline","language":null,"defaultStyle":null,"defaultSpeakers":{}}' > ".listenhub/explainer/config.json"
CONFIG_PATH=".listenhub/explainer/config.json"
CONFIG=$(cat "$CONFIG_PATH")CONFIG_PATH=".listenhub/explainer/config.json"
[ ! -f "$CONFIG_PATH" ] && CONFIG_PATH="$HOME/.listenhub/explainer/config.json"
CONFIG=$(cat "$CONFIG_PATH")当前配置 (explainer):
输出方式:{inline / download / both}
语言偏好:{zh / en / 未设置}
默认风格:{info / story / 未设置}
默认主播:{speakerName / 使用内置默认}NEW_CONFIG=$(echo "$CONFIG" | jq --arg m "$OUTPUT_MODE" '. + {"outputMode": $m}')
echo "$NEW_CONFIG" > "$CONFIG_PATH"
CONFIG=$(cat "$CONFIG_PATH")Question: "What language?"
Options:
- "Chinese (zh)" — Content in Mandarin Chinese
- "English (en)" — Content in English
- "Japanese (ja)" — Content in JapaneseQuestion: "What style of explainer?"
Options:
- "Info" — Informational, factual presentation style
- "Story" — Narrative, storytelling approachQuestion: "What output do you want?"
Options:
- "Text script only" — Generate narration script, no video
- "Text + Video" — Generate full explainer video with AI visualsReady to generate explainer:
Topic: {topic}
Language: {language}
Style: {info/story}
Speaker: {speaker name}
Output: {text only / text + video}
Proceed?$CMD_PREFIX create \
--query "{topic}" \
--mode {info|story} \
--lang {en|zh|ja} \
--speaker "{name}" \
--speaker-id "{id}" \
--timeout 600 \
--json