multimodal-explainer
Skill5 starsChanged 3 months agoApache-2.0View on GitHub
Generate a comprehensive multimodal HTML explainer document with embedded Gemini TTS voice narration segments, structured sections, callouts, diagrams, and tables. Optimized for explaining complex technical topics (PoC briefs, new domain concepts, architecture deep-dives) to first-time learners who need both written reference AND spoken walkthrough. Use when the user says "做个讲解文档"、"多模态讲解"、"配语音讲解的文档"、"科普文档加语音"、"explain this with voice"、"technical walkthrough"、"语音讲解 HTML"、"多模态科普", OR when a topic is complex enough that an audio walkthrough materially helps comprehension (50+ concepts, multi-stakeholder, first-time exposure).
In this repository54 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-teamsSkill
- bilibili-channelSkill
- bot-configSkill
- browser-cliSkill
- bwrap-bypassSkill
- cc-pages-backupSkill
- chat-styleSkill
- chinese-dictationSkill
- code-wiki-reconSkill
- deck-builderSkill
- docx-form-fillerSkill
- evolutionSkill
- explainer-distillSkill
- feishu-bitableSkill
- feishu-docSkill
- feishu-mailSkill
- feishu-sheetSkill
- feishu-user-msgSkill
- fireworks-tech-graphSkill
- frontend-slidesSkill
- gemini-ui-reviewerSkill
- hk-busSkill
- hk-share-award-tax-dipn38Skill
- imagen-generatorSkill
- issue-handlerSkill
- lecture-videoSkill
- lecture-voiceSkill
- lesson-read-aloudSkill
- live-canvasSkill
- lustre-mounterSkill
- manim-teaching-figuresSkill
- math-video-tutorSkill
- memory-gcSkill
- memory-lintSkill
- music-generatorSkill
- notifySkill
- page-styleSkill
- paper-explainerSkill
- session-handoffSkill
- skill-creatorSkill
- smoke-testSkill
- study-materialSkill
- tmux-installerSkill
- tmux-orchestratorSkill
- tpuguruSkill
- tts-generatorSkill
- veo-generatorSkill
- vscode-referenceSkill
- weather-forecastSkill
- wechat-readerSkill
- wikiSkill
- youtube-channelSkill
- zsh-installerSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Follow these steps in order.
- Distinctive: line 23
Ask the user (concise, max 4 questions):
- Very specific: line 40
Start from assets/html-template.html (Material Design, Google Sans, Roboto Mono, sidenav, voice-player CSS).
- Very specific: line 66
Default voice: orus (sober male).
- Distinctive: line 111
Always test one segment first: Before parallel-generating 8+ segments, test 1 to confirm voice, pace, and emotion tags work as intended.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Multimodal Technical Explainer Documentation
Purpose
Generate a single-page HTML document combining:
- Written reference — Material Design sections, term definitions, tables, callouts, ASCII flow diagrams
- Audio walkthrough — Per-section Gemini TTS narration (Chinese default, voice-mode口语化 style with emotion tags)
- Global navigation — Sticky sidenav, voice-overview index with durations, scroll anchors
The combination lets first-time learners (a) listen on the go, (b) refer back in text, (c) jump to specific concepts via nav.
Workflow
Follow these steps in order. Always confirm scope with user before starting if topic, audience, depth, or deployment visibility is ambiguous.
Step 1: Clarify Inputs
Ask the user (concise, max 4 questions):
- Source material — Doc URL / pasted text / topic name? Read it fully before drafting.
- Audience — First-time learner? Expert refresher? Decision-maker (exec brief)?
- Voice language + style — Chinese (default, follows
references/script-style-guide.mdvoice-mode rules) or English? - Deployment visibility — Internal sensitive (IAP-only
/pages/) or public OK (/assets/)? Default to IAP if any internal name, customer name, or unreleased product is mentioned.
Step 2: Plan Section Structure
Design 5–9 sections covering:
- §0: A "全景图" / "Overview" with an ASCII flow diagram showing the topic's lifecycle
- §1..N-1: Individual concept clusters, each cohesive enough for a 2–4 minute audio segment
- §N (final): A "客户场景串讲" / "Worked Example" that uses every prior concept in a concrete scenario, plus 3–5 self-test questions
Each section gets its own <audio> segment. Sections that exceed ~2000 Chinese characters of narration should be split into 2 sub-segments (see references/audio-segmentation-guide.md).
Step 3: Draft the HTML
Start from assets/html-template.html (Material Design, Google Sans, Roboto Mono, sidenav, voice-player CSS).
Each section card uses this pattern:
<h2>section title<div class="card-desc">one-line summary<div class="voice-player">audio player (added in Step 6)- Content:
<h3>subsections,<div class="term">for term-name + term-en + term-def + term-example,<div class="callout tip|warn|fact">,<div class="analogy">for purple类比,<div class="flow-diagram">for ASCII art, tables for comparisons
Component reference: references/html-template-design.md.
Step 4: Write Voice Narration Scripts
For each section, write a separate .txt file with the spoken script. Follow references/script-style-guide.md:
- Lead with
[casually]or similar Gemini emotion tag - Switch tag every 1–3 paragraphs to match content emotion
- Short sentences (25–50 chars), no markdown, no emojis
- Spell out symbols (
/→ "斜杠",=→ "等于"); hyphens in model names break TTS — replace with spaces (Qwen3.5-397B→Qwen3.5 397B) - Maximum ~2000 Chinese characters per segment (Gemini TTS silently fails above this, outputs ~1s silence)
- End each segment with a one-sentence recap: "听完这段你应该能..."
Step 5: Generate Voice Files
Run scripts/generate-voice-segments.sh <input_dir> <output_dir> [--voice orus]. It:
- Reads all
.txtfiles in input dir - Parallel-invokes
~/CloseCrab/skills/tts-generator/scripts/tts-generate.py - Auto-detects failed segments (file < 50KB) and lists them
- Default voice:
orus(sober male). Override per user preference.
For failed segments: split the script in half at a natural breakpoint, regenerate as 01a-foo.txt + 01b-foo.txt.
Step 6: Embed Audio in HTML
For each section's <h2> + <div class="card-desc">, insert immediately after:
<div class="voice-player">
<div class="voice-label">
<span class="voice-icon">🎧</span>
<span class="voice-title">语音讲解 · {section name}</span>
<span class="voice-duration">{duration}</span>
</div>
<audio controls preload="none">
<source src="voice/{filename}.ogg" type="audio/ogg">
</audio>
</div>Get accurate durations:
ffprobe -v error -show_entries format=duration -of csv=p=0 file.oggIn the hero section, add a global <div class="voice-overview"> listing all segments + total duration so users can scan and pick. Pattern shown in assets/html-template.html.
Step 7: Deploy
Run scripts/deploy-multimodal-doc.sh <html_path> <voice_dir> [--public]. It:
- Defaults to IAP-only (
gs://chris-pgp-host-asia/cc-pages/pages/andpages/voice/) - With
--public: uploads toassets/instead - Uses google-cloud-storage Python SDK (bypasses gcloud's CAA wall on cc-tw)
- Verifies URLs after upload
URL pattern:
- IAP:
https://cc.higcp.com/pages/{filename}.html+https://cc.higcp.com/pages/voice/{seg}.ogg - Public:
https://cc.higcp.com/assets/{filename}.html+https://cc.higcp.com/assets/voice/{seg}.ogg
See references/deployment-guide.md for the IAP-vs-public decision tree.
Critical Rules
- Always confirm visibility before deploy. Documents mentioning internal Google teammates, customer names, or unreleased products MUST go IAP-only. Default to IAP if unsure.
- Always estimate before committing. Per section: ~150 chars/minute of audio. 9 segments × 2.5 min avg ≈ 22 min total. Tell the user expected total runtime upfront.
- Always test one segment first. Before parallel-generating 8+ segments, test 1 to confirm voice, pace, and emotion tags work as intended.
- Always include the worked-example final section. The section that re-uses every prior term is what makes the document stick — it's the comprehension test.
- Never skip the global voice overview. Even with sidenav, users need to see total duration + segment breakdown upfront to decide listening strategy ("if time-pressed listen X+Y").
Reference Files
- references/script-style-guide.md — Voice-mode口语化 rules, Gemini emotion tag catalog, character normalization, length limits, failure modes
- references/html-template-design.md — Material Design CSS components (term box, callout, voice-player, sidenav, flow-diagram, color variables)
- references/audio-segmentation-guide.md — How to split long sections, what to do when TTS silently fails, duration estimation formula
- references/deployment-guide.md — IAP vs public decision tree, GCS upload via Python SDK (CAA workaround), URL verification commands
Assets
- assets/html-template.html — Complete starter template with sidenav, hero, voice-overview, sample section cards, all CSS components ready to clone
Scripts
- scripts/generate-voice-segments.sh — Parallel TTS generation with failure detection
- scripts/deploy-multimodal-doc.sh — GCS upload + URL verification (uses Python SDK to bypass CAA)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

