Skip to content

About

Claude Code skill that builds single-file narrated, diagram-first HTML explainers and study guides with inline SVGs and Speechify or local Kokoro TTS.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

guide — a Claude Code skill for narrated, diagram-first explainers

A Claude Code skill that builds single-file HTML pages in one shared format:

  • three altitudes of the same mechanism (ELI5 / ELI14 / ELII), switchable with pure CSS so they work even where JavaScript is off (iPhone/iPad file previews)
  • one inline SVG diagram per mechanism, with labels sitting on the things they name, and a headless-browser check that every label fits its box
  • per-section narration audio that explains the diagram rather than reading the page
  • a sources table with one row per checkable claim, so every fact carries its evidence

It has two modes:

Guide mode Explainer mode
For a curriculum unit you are studying anything else, for any reader
Ends with a competency gate and the list of what the quiz will cover Limits and Sources. No quiz
Spec SKILL.md references/explainer-mode.md

Install

git clone https://github.com/cxrobx/guide-skill ~/.claude/skills/guide

Then ask Claude Code for "an explainer like the guides" (explainer mode) or /guide <unit> (guide mode).

Requirements: Python 3, ffmpeg. Optional: Node + Playwright for render-check.mjs / svg-fit-check.mjs, and uv for the local TTS engine.

Narration: API or local model

Narration is synthesized per section by scripts/synth-narration.py, through a pluggable engine in scripts/engines/. Two ship:

Engine What it is Needs
simba (default) Speechify Simba 3.2 over its API SPEECHIFY_API_KEY in the environment
kokoro Kokoro, an open-weight TTS model that runs on your CPU nothing: no key, no network, $0

No TTS API available? The skill falls back to a local model. If you have no Speechify key, you're offline, or you'd rather not pay for an API, narrate with Kokoro instead. One command sets it up (a Python 3.12 venv plus ~325 MB of weights), and --engine kokoro uses it from then on:

bash scripts/setup-tts.sh --engine kokoro
python3 scripts/synth-narration.py <guide-dir> --engine kokoro

To make it the default for a page, put engine: kokoro in its narration.md front matter. A missing key never switches engines on its own. The run stops, and the error message gives you the --engine kokoro command. That way a page never ends up with clips in two different voices.

Any other local or hosted TTS can be added the same way: drop a module in scripts/engines/ that exposes synth(paragraphs, cfg) -> (wav_bytes, marks_or_None) and add its name to the --engine choices.

Env var Default Purpose
SPEECHIFY_API_KEY — Speechify key (export it from a secret manager; never commit it)
SPEECHIFY_VOICE / SPEECHIFY_MODEL wyatt_32 / simba-3.2 Speechify voice and model
KOKORO_MODEL / KOKORO_VOICES ~/.cache/kokoro/… Kokoro weights
KOKORO_PYTHON ~/.venvs/kokoro/bin/python the Python 3.12 venv Kokoro runs under
LEARNINGS_ROOT ~/learnings guide mode's workspace

Guide mode's workspace

Guide mode expects a learnings repo laid out like this, and was built to sit behind a spaced-repetition tutor skill (not included) that owns scheduling:

$LEARNINGS_ROOT/
  metaphors_base.md                 metaphors the learner has actually lived, by domain
  STATE.md                          the tutor's running state
  topics/<topic>/curriculum.md      one line per unit — the line IS the guide's scope
  topics/<topic>/progress.md        learner state (box, due, notes)
  topics/<topic>/retrieval-bank.md  quiz items (the linter checks a guide never leaks them)
  topics/<topic>/guides/            what this skill writes

Explainer mode needs none of that: it writes to docs/<slug>/ in whatever repo you're in, starting from assets/explainer/.

Layout

SKILL.md                     the skill: mode choice, guide-mode gate, sequence, narration
references/                  authoring checklist, narration style, explainer-mode spec
assets/                      page template, CSS, narration template, explainer build kit
scripts/                     scaffold, lint (F01–F20), status, TTS setup + synth, render checks

About

Claude Code skill that builds single-file narrated, diagram-first HTML explainers and study guides with inline SVGs and Speechify or local Kokoro TTS.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages