From jiffy-toolkit
Generate interactive scrollytelling HTML pages that progressively explain any concept. Uses prerequisite reasoning to build understanding from foundational concepts, GSAP animations as the primary visualization engine, and Manim for mathematical content. Use when the user says "/teach-me [concept]", "teach me about [concept]", "explain [concept] visually", "create an interactive explanation of [concept]", or asks for a visual/animated walkthrough of any topic. Outputs self-contained HTML to ~/.claude/teach-me/[slug]/index.html and opens it in the browser.
How this skill is triggered — by the user, by Claude, or both
Slash command
/jiffy-toolkit:teach-meThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate interactive scrollytelling HTML pages that progressively explain any concept using prerequisite reasoning, GSAP animations, and optional Manim renders.
references/agent-team-prompts.mdreferences/animation-libraries.mdreferences/css-base-system.mdreferences/manim-patterns.mdreferences/prerequisite-reasoning.mdreferences/scrollytelling-patterns.mdreferences/style-presets.mdscripts/embed_media.pyscripts/install_deps.shscripts/render_manim.pyscripts/visual_qa.pytemplates/chapter-module.htmltemplates/interactive-widgets.htmltemplates/playback-controls.htmltemplates/scrollytelling-base.htmlGenerate interactive scrollytelling HTML pages that progressively explain any concept using prerequisite reasoning, GSAP animations, and optional Manim renders.
Follow these 8 phases in order. Read referenced files only when you reach the phase that needs them.
Parse the user's request to extract:
If audience is ambiguous, ask the user to clarify what background they have.
Before researching, display your research plan to the user:
List the specific questions that need answering to explain this concept accurately. Display these to the user:
## Research Questions
To explain "[target concept]" to [audience], I need to answer:
1. [Question about the core mechanism/definition]
2. [Question about common misconceptions]
3. [Question about good analogies for this audience]
4. [Question about prerequisites the audience may not have]
...
## Assumptions About Your Background
Based on "[audience context]", I'm assuming you:
- Know: [concept 1], [concept 2], ...
- Don't know: [concept 3], [concept 4], ...
If any of these are wrong, let me know and I'll adjust.
Important: These steps are informational — do NOT wait for user approval. Display them and immediately proceed to spawning agents. The user can interrupt if something looks wrong.
For each question from Step 1, determine:
Agent selection decision tree:
| Question Type | Default Agent | Override Conditions |
|---|---|---|
| General explanations, analogies, misconceptions | web-search-researcher | Default for most concepts |
| Codebase implementation details | codebase-explorer | Only when concept maps to actual code in the working directory |
| Mathematical foundations, proofs, formal notation | web-search-researcher with math-focused prompt | When concept involves equations, proofs, or formal definitions |
| Domain-specific (ML, data, search, etc.) | Domain expert agent from detected domain | When concept maps to a known domain |
Display the research plan:
## Research Plan
To research "[concept]", I will:
1. [Question] -> [agent-type] (reason)
2. [Question] -> [agent-type] (reason)
3. [Question] -> [agent-type] (reason)
...
**Dependency Analysis:**
| Question | Depends On | Rationale |
|----------|------------|-----------|
| Q1 | None | Independent starting point |
| Q2 | Q1 | Q1's terminology will focus Q2's search |
| Q3 | None | Independent |
**Execution Batches:**
Batch 1 (parallel): Q1, Q3
-> (wait, extract key context)
Batch 2 (parallel): Q2 (informed by Q1 findings)
**Agent Type Verification:**
Based on the questions above, I will spawn:
- [agent-type-1] (questions 1, 3)
- [agent-type-2] (question 2)
Total agents to spawn: [N]
This list is my CONTRACT.
Important: This plan is informational — do NOT wait for user approval. Display and proceed immediately. The user can interrupt if the direction is wrong.
Execute batches per the plan:
Default to parallelism when uncertain: If the dependency between questions is weak or speculative, put them in the same batch. Over-parallelizing is acceptable; missing dependencies will surface during Phase 3 (Prerequisite Chain).
Collect enough material to write accurate explanations and design meaningful animations. Do not proceed to Phase 3 until all agents have returned results.
Read references/prerequisite-reasoning.md for the full prompt template and algorithm.
Steps:
Output a linearized list of concepts from most foundational to target concept.
Select the visual theme for the generated page. Read references/style-presets.md for the 10 available presets.
If the user specified a theme in their request (detected in Phase 1), confirm it:
Using the **[Theme Name]** theme. Proceeding to design.
Skip to Phase 5.
If no theme was specified:
Generate a single-file theme explorer at ~/.claude/teach-me/.theme-explorer/index.html:
<section> with preset variables)Open in browser:
open ~/.claude/teach-me/.theme-explorer/index.html
Ask the user:
AskUserQuestion: "Which theme would you like? (type a name or number, or 'default' for Warm Scholar)"
Map response to a preset from style-presets.md. Default to Warm Scholar if unclear.
This phase uses a creative agent team to debate visualization choices and generate the HTML. The team has deep knowledge of all available animation libraries (GSAP, D3, p5, Three.js, Rough.js, Manim) and creative freedom to go beyond the existing widget templates.
Check if agent teams are available:
echo $CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS
If set to 1 or true, use the Agent Team Path (Step 2A).
Otherwise, use the Sub-Agent Fallback Path (Step 2B).
Requires
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1This path uses agent teams for DEBATE and PLANNING only, then switches to parallel sub-agents for HTML generation. Agent teams excel at inter-agent creative debate; sub-agents excel at independent parallel generation.
Read these references first:
references/agent-team-prompts.md — role personas, team lifecyclereferences/animation-libraries.md — capabilities, CDN links, library patternsreferences/scrollytelling-patterns.md — structural patternsreferences/css-base-system.md — structural CSSreferences/style-presets.md — the selected presettemplates/ — HTML templatesStep 2A.1: Create the team using TeamCreate
Use the TeamCreate tool to create the team. You (the main session) are the
Creative Director and team lead.
TeamCreate(team_name="teach-me-[concept-slug]", description="Planning visual explanation for [concept]")
Step 2A.2: Spawn teammates for debate
Spawn each teammate using the Agent tool with team_name and name parameters.
These are real agent team teammates for the debate phase only:
Agent(
team_name="teach-me-[concept-slug]",
name="animation-specialist",
subagent_type="general-purpose",
prompt="[Full Animation Specialist persona from references/agent-team-prompts.md].
You have the prerequisite chain: [chain]. Audience: [audience].
Reference files: [list]. Templates: [list].
Your role is to DEBATE and PROPOSE — you will NOT generate HTML.
Communicate with teammates via SendMessage to debate choices."
)
Agent(
team_name="teach-me-[concept-slug]",
name="pedagogy-advocate",
subagent_type="general-purpose",
prompt="[Full Pedagogy Advocate persona from references/agent-team-prompts.md].
[Same context as above].
Your role is to DEBATE and EVALUATE — you will NOT generate HTML.
Communicate with teammates via SendMessage."
)
Agent(
team_name="teach-me-[concept-slug]",
name="ux-designer",
subagent_type="general-purpose",
prompt="[Full UX/Interaction Designer persona from references/agent-team-prompts.md].
[Same context as above].
Your role is to DEBATE and PROPOSE — you will NOT generate HTML.
Communicate with teammates via SendMessage."
)
Agent(
team_name="teach-me-[concept-slug]",
name="visual-critic",
subagent_type="general-purpose",
prompt="[Full Visual Critic persona from references/agent-team-prompts.md].
[Same context as above].
Your role is to CHALLENGE choices — you will NOT generate HTML.
Communicate with teammates via SendMessage."
)
Provide all teammates with:
references/agent-team-prompts.mdSendMessage to communicate with other teammates by nameStep 2A.3: Debate phase (divergent)
Teammates propose and debate via SendMessage. Creative Director moderates. Max 3 debate rounds per concept.
Step 2A.4: Plan lock (convergent)
Creative Director synthesizes debate into a visual experience plan:
For each concept in the prerequisite chain:
Also includes:
Write the plan to: ~/.claude/teach-me/[slug]/plan.md
Share plan with all teammates for final confirmation via SendMessage. All teammates confirm or raise final objections (max 1 round).
Step 2A.5: Team shutdown
Shut down teammates via SendMessage(type="shutdown_request") and clean up
team resources.
If ANY concept needs Manim, flag it for Phase 6 (Install Dependencies).
Step 2A.6: Parallel sub-agent generation
IMPORTANT: Use standalone background sub-agents here, NOT agent team members. The debate team was shut down in Step 2A.5. Generation sub-agents must be spawned as independent background agents using
Agent(run_in_background: true)— do NOT passteam_nameornameparameters. Agent teams are for debate (Steps 2A.1-2A.5); sub-agents are for parallel generation (this step). Mixing these patterns causes coordination overhead and delivery problems.
Read templates for generation:
templates/scrollytelling-base.html — full HTML skeleton (copy and customize)templates/chapter-module.html — chapter snippet (repeat for each concept)templates/interactive-widgets.html — reusable GSAP animation patternstemplates/playback-controls.html — playback control bar (always include for GSAP)Determine sub-agent count based on concept count:
Spawn parallel sub-agents using a single message with multiple Agent tool calls,
each with run_in_background: true and subagent_type: "general-purpose".
Instruct each sub-agent to write its output to a file (e.g., /tmp/teach-me-chapters-N.html)
so the output is reliably retrievable after completion.
Each sub-agent receives:
references/style-presets.md)Each sub-agent returns: the HTML content for their assigned chapters.
CRITICAL: Wait for ALL sub-agents to complete before proceeding. Do NOT generate HTML yourself while sub-agents are running — even if they appear slow. Sub-agents with detailed prompts produce specialized, high-quality output (procedural animations, interactive sliders, physics simulations) that ad-hoc generation cannot match. Generating HTML yourself while sub-agents run wastes their output, creates integration problems, and produces an inferior result. If a sub-agent crashes or fails (not just "takes a while"), only then should you generate its assigned chapters yourself.
Step 2A.7: Creative Director assembles
<!-- TOC_ITEMS --> with sidebar links for each concept<!-- CHAPTERS --><!-- ANIMATIONS -->:root PRESET template slot<link> tags into the PRESET font loading slotdata-theme attribute on <html> to the preset's default theme value~/.claude/teach-me/[slug]/index.htmlProceed to Phase 6 (if Manim needed) or Phase 7 (Quality Check).
Used when agent teams are not enabled (current default)
Display notice:
Agent teams not enabled. Using sub-agent fallback — agents will not debate
directly. To enable agent teams, set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
Read these references first:
references/animation-libraries.md — capabilities, CDN links, library patternsreferences/scrollytelling-patterns.md — structural patternsreferences/css-base-system.md — structural CSSreferences/style-presets.md — the selected presettemplates/ — HTML templatesSpawn 3 parallel sub-agents (Agent tool, subagent_type: general-purpose, model: sonnet):
Animation Specialist: "Given this prerequisite chain and audience, propose the most engaging visualization for each concept. You have access to GSAP, D3, p5, Three.js, Rough.js, and Manim. Go beyond the standard decision matrix. Be creative. Include: animation type, library choice, interactive elements, and a brief description of what the animation shows."
Pedagogy Advocate: "Given this prerequisite chain and audience, evaluate which concepts need the most visual support and what types of visualizations would best serve understanding. Flag any concepts where a simple text explanation is better than an animation. Identify where the teaching flow needs visual reinforcement."
UX/Interaction Designer: "Given this prerequisite chain, propose scroll pacing, interactive elements, and accessibility considerations. Include: how many scroll steps per concept, where to place interactive controls, transition strategies between concepts, and motion-preference media queries."
After all sub-agents return:
The main session acts as Creative Director + Visual Critic:
Read templates for generation:
templates/scrollytelling-base.html — full HTML skeleton (copy and customize)templates/chapter-module.html — chapter snippet (repeat for each concept)templates/interactive-widgets.html — reusable GSAP animation patternstemplates/playback-controls.html — playback control bar (always include for GSAP)Generation steps:
<!-- TOC_ITEMS --> with sidebar links for each concept<!-- CHAPTERS --><!-- ANIMATIONS -->If ANY concept needs Manim, flag it for Phase 6 (Install Dependencies).
Skip this phase entirely if no Manim is needed.
Run the dependency installer:
bash ${CLAUDE_PLUGIN_ROOT}/skills/teach-me/scripts/install_deps.sh --check-only
If Manim is not installed, inform the user that Manim installation is needed (~2-5 min), then run:
bash ${CLAUDE_PLUGIN_ROOT}/skills/teach-me/scripts/install_deps.sh
The creative team (or main session in fallback mode) already reviewed the HTML for teaching effectiveness and interaction quality. This step is a sanity check for:
Fix any issues found before proceeding to Step 2.
After structural checks pass, render the page and review it visually:
Run the visual QA script to capture screenshots:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/teach-me/scripts/visual_qa.py ~/.claude/teach-me/<slug>/index.html
Review screenshots using the Read tool (which supports image files). Read at minimum:
/tmp/teach-me-qa/full-page.png — check overall layout and spacing/tmp/teach-me-qa/visual-*.png — check individual visualizationsFor each screenshot, check for these defect categories:
If defects are found:
Common fixes reference:
font-size, increase circle r, split into <tspan> lines, or abbreviate labelopacity: 1 on at least the base elementsCreate output directory:
mkdir -p ~/.claude/teach-me/<slug>
Where <slug> is the concept name in kebab-case (e.g., "adam-optimizer", "binary-search")
Write the HTML to ~/.claude/teach-me/<slug>/index.html
If Manim media exists, ensure media/ directory is alongside index.html
Optionally run the media embedder for small files:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/teach-me/scripts/embed_media.py ~/.claude/teach-me/<slug>/index.html --max-size 500000
Open in browser:
open ~/.claude/teach-me/<slug>/index.html
Report the output path to the user.
| File | When to Read |
|---|---|
references/prerequisite-reasoning.md | Phase 3 (Build Prerequisite Chain) |
references/agent-team-prompts.md | Phase 5 (Design & Generate Visual Experience) |
references/animation-libraries.md | Phase 5 (Design & Generate Visual Experience) |
references/scrollytelling-patterns.md | Phase 5 (Design & Generate Visual Experience) |
references/css-base-system.md | Phase 5 (Design & Generate — structural CSS) |
references/style-presets.md | Phase 4 (Theme Selection) and Phase 5 (Design & Generate — selected preset) |
references/manim-patterns.md | Phase 6 (only when Manim is needed) |
| File | Purpose |
|---|---|
templates/scrollytelling-base.html | Full HTML skeleton — copy and customize |
templates/chapter-module.html | Single chapter snippet — repeat per concept |
templates/interactive-widgets.html | Reusable GSAP animation patterns |
templates/playback-controls.html | Playback control bar — always include for GSAP |
| File | Usage |
|---|---|
scripts/install_deps.sh | bash scripts/install_deps.sh [--check-only] |
scripts/render_manim.py | python3 scripts/render_manim.py <file> <class> --format gif --output-dir <dir> |
scripts/embed_media.py | python3 scripts/embed_media.py <html_file> --max-size 500000 |
scripts/visual_qa.py | python3 scripts/visual_qa.py <html_file> [--output-dir DIR] [--width WIDTH] |
npx claudepluginhub jonnycbb/claude-code-config --plugin jiffy-toolkitGenerates a structured markdown course with visual diagrams and evidence-based learning features for any topic the user wants to learn from scratch.
Creates reveal.js presentations with themes, multi-column layouts, code highlighting, animations, speaker notes, and custom styling. Generates HTML + CSS with no build step. Use for slides, decks, or slideshows.
Builds animated, professional web pages that visualize software architecture, system design, data models, or product ideas using Three.js 3D scenes, GSAP scroll-driven animations, and SVG interactive diagrams.