From claude-docs
Generates an interactive single-page HTML course on any Claude documentation topic, with scroll-based navigation, animated visualizations, quizzes, and code translations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-docs:claude-docs-courseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Transform any Claude documentation topic into a stunning, interactive single-page HTML course. The output is a single self-contained HTML file (no dependencies except Google Fonts) that teaches the topic through scroll-based modules, animated visualizations, embedded quizzes, and plain-English translations of real API examples and configuration snippets from the official docs.
Transform any Claude documentation topic into a stunning, interactive single-page HTML course. The output is a single self-contained HTML file (no dependencies except Google Fonts) that teaches the topic through scroll-based modules, animated visualizations, embedded quizzes, and plain-English translations of real API examples and configuration snippets from the official docs.
When the skill is first triggered and the user hasn't specified a topic yet, introduce yourself:
I can turn any Claude topic into an interactive course — visual explanations, animated diagrams, and hands-on quizzes, all in a single HTML file.
Tell me a topic:
- A Claude Code feature — e.g., "create a course on hooks"
- An API concept — e.g., "make a course about tool use"
- An SDK pattern — e.g., "interactive tutorial for Agent SDK sessions"
- A technique — e.g., "teach me about extended thinking interactively"
I'll read through the official documentation, design a learning arc, and generate a beautiful single-page HTML course with animated protocol diagrams, code explanations, and interactive quizzes. Opens right in your browser — no setup needed.
If the user just came from a /docs response, the topic is already known — skip the welcome and start building.
The target learner is a developer building with Claude — someone who has general technical literacy but wants to deeply understand a specific Claude feature, API concept, or SDK pattern before using it in their project.
Assume general technical literacy. The learner knows what APIs, functions, JSON, and HTTP requests are. They don't need basic programming concepts explained. But they DO need Claude-specific concepts, patterns, and terminology explained thoroughly — tokens, context windows, tool_use blocks, stop sequences, system prompts, streaming events, hook matchers, MCP servers, etc.
Their goals are practical:
They are NOT beginners at programming. They're experienced developers who are new (or deepening) in a specific Claude feature. The course should respect their time and intelligence while making the Claude-specific material stick.
Documentation is comprehensive but flat — it lists features, parameters, and examples without a learning arc. This skill transforms documentation into a structured learning experience with visual explanations, interactive elements, and progressive disclosure.
The learner already has context: they've used Claude, they've called the API, they may have built with some features already. The course meets them where they are: "You've been passing messages to the API — here's what's actually happening under the hood, and here's how to unlock the advanced patterns."
Every module answers "when and why would I use this?" before "how does it work?" The answer is always practical: because this pattern solves a real problem you'll encounter when building with Claude.
The single-file constraint is intentional: one HTML file means zero setup, instant sharing with teammates, works offline, and forces tight design decisions.
Before writing course HTML, deeply understand the topic by reading all relevant documentation. Thoroughness here pays off — the more you understand, the better the course.
How to find documentation files:
Search ~/.claude-code-docs/docs/ using this hierarchy (try simpler strategies first):
Direct Glob — for concrete topic names:
Glob: ~/.claude-code-docs/docs/*<topic>*.md
Scoped Glob — when the product context is known:
| Context | Glob pattern |
|---|---|
| Claude Code CLI | ~/.claude-code-docs/docs/claude-code__*<topic>*.md |
| Agent SDK | ~/.claude-code-docs/docs/docs__en__agent-sdk__*<topic>*.md |
| Claude API | ~/.claude-code-docs/docs/docs__en__api__*<topic>*.md |
| Build guides | ~/.claude-code-docs/docs/docs__en__build-with-claude__*<topic>*.md |
| Agents & tools | ~/.claude-code-docs/docs/docs__en__agents-and-tools__*<topic>*.md |
Content search — for questions or compound topics:
bash ~/.claude-code-docs/plugin/skills/claude-docs/scripts/content-search.sh "<keyword1>" "<keyword2>"
Fuzzy search — for approximate names:
bash ~/.claude-code-docs/plugin/skills/claude-docs/scripts/fuzzy-search.sh "<query>"
What to read:
What to extract:
Figure out the learning story yourself from the documentation. Don't ask the user to explain the topic — build the narrative from what the docs reveal. The course should open by explaining why this feature exists and what problem it solves, then progressively peel back layers.
Structure the course as 4-7 modules. Documentation topics are typically more focused than entire codebases, so fewer modules are usually appropriate. The arc starts from what the learner already knows (general Claude usage) and moves toward what they don't (deep feature knowledge).
| Module Position | Purpose | Example for "hooks" |
|---|---|---|
| 1 | "What is this and why should you care?" | What hooks are, what problems they solve, what you can automate |
| 2 | "The mental model" | Hook lifecycle diagram, event types, when each fires |
| 3 | "See it in action" | Real hook configs with code translations, walking through examples |
| 4 | "The details that matter" | Matcher patterns, JSON schemas, timeout handling, async behavior |
| 5 | "Patterns and recipes" | Common use cases — auto-formatting, CI/CD gates, security checks |
| 6 | "Connect the dots" | How hooks relate to skills, MCP, permissions — the bigger picture |
Not every topic needs all 6. A narrow feature (like "prompt caching") might only need 3-4 modules. A broad one (like "tool use") might need 6-7. Adapt the arc to the topic's depth.
The key principle: Every module should connect to a practical skill — building better, debugging faster, or making smarter architecture decisions. If a module doesn't help the learner DO something, cut it or reframe it until it does.
Each module should contain:
Mandatory interactive elements (every course must include ALL of these):
These five element types are the backbone of every course. Other interactive elements (architecture diagrams, layer toggles, pattern cards, etc.) are optional and should be added when they fit. But the five above must ALWAYS be present — no exceptions.
Do NOT present the curriculum for approval — just build it. The user wants a course, not a planning document. Design the curriculum internally, then go straight to generating the HTML. If they want changes, they'll tell you after seeing the result.
Generate a single HTML file with embedded CSS and JavaScript. Read references/design-system.md for the complete CSS design tokens, typography, and color system. Read references/interactive-elements.md for implementation patterns of every interactive element type.
Build order (task by task):
Foundation first — HTML shell with all module sections (empty), complete CSS design system, navigation bar with progress tracking, scroll-snap behavior, keyboard navigation, and scroll-triggered animations. After this step, you should have a working skeleton you can scroll through.
One module at a time — Fill in each module's content, code translations, and interactive elements. Don't try to write all modules in one pass — the quality drops. Build Module 1, verify it works, then Module 2, etc.
Polish pass — After all modules are built, do a final pass for transitions, mobile responsiveness, and visual consistency.
Critical implementation rules:
scroll-snap-type: y proximity (NOT mandatory — mandatory traps users in long modules)min-height: 100dvh with 100vh fallback for sectionstransform and opacity for GPU performancepassive: true on scroll listeners, throttle with requestAnimationFrameSave the course to the dedicated courses directory:
mkdir -p ~/.claude-code-docs/courses
Name the file based on the topic: ~/.claude-code-docs/courses/<topic-slug>.html
prompt-caching.html, "tool use" → tool-use.htmlhooks-2.htmlAfter saving, open the file in the browser for the user to review. Walk them through what was built — the module arc, the key interactive elements, and the learning progression. Tell them where the file is saved so they can share it or revisit it later. Ask for feedback on content, design, and interactivity.
These principles are what separate a great course from a generic tutorial. They should guide every content decision:
Developers' eyes glaze over text blocks too. The course should feel closer to an interactive reference than a wall of documentation. Follow these hard rules:
Text limits:
Convert text to visuals:
Visual breathing room:
--space-8 to --space-12 between sections)Every code example gets a side-by-side plain English translation. Left panel: real code from the documentation (API calls, JSON configs, CLI commands) with syntax highlighting. Right panel: line-by-line plain English explaining what each part does and why.
Critical: No horizontal scrollbars on code. All code must use white-space: pre-wrap so it wraps instead of scrolling. Readability beats preserving indentation structure.
Critical: Use documentation examples exactly as-is. Never modify, simplify, or trim code examples from the docs. The learner should be able to find the exact same example in the official documentation — that builds trust and makes the course a companion to the docs, not a replacement. Instead of editing code to make it shorter, choose naturally short, punchy examples (5-15 lines) from the docs that illustrate the concept well.
No walls of text. Each screen within a module teaches exactly one idea. If you need more space, add another screen — don't cram.
Introduce every new Claude concept with a metaphor from everyday life. Then immediately ground it: "In Claude's API, this looks like..." The metaphor builds intuition; the code grounds it in reality.
Critical: No recycled metaphors. Each concept deserves its own metaphor that feels natural to that specific idea. Context windows as "desk space", tokens as "word fragments in a shredder", system prompts as "stage directions for an actor", tool use as "a Swiss army knife", streaming as "a live ticker". Pick the metaphor that makes the concept click, not the one that's easiest to reach for.
Follow what actually happens when the developer makes a familiar API call — trace the request end-to-end. "You've been sending messages to Claude — here's the full lifecycle of that request, from your code to Claude's response, step by step." This works because the learner has already used the feature — now they're seeing the machinery behind it.
Use "aha!" callout boxes for practical insights. Use humor where natural (not forced). Give system actors personality in protocol conversations — Claude, the API gateway, the tool server are "characters" in the story, not abstract boxes.
Every Claude-specific term gets a dashed-underline tooltip on first use in each module. Hover on desktop or tap on mobile to see a 1-2 sentence definition grounded in practical usage.
Tooltip scope for developer audience: Don't tooltip basic programming terms (function, variable, JSON, API). DO tooltip:
The vocabulary IS the learning. Each tooltip should teach the term in a way that helps the learner USE it correctly — e.g., "stop_reason — tells you why Claude stopped generating. end_turn means Claude finished naturally. tool_use means Claude wants to call a tool. Check this to decide your next action."
Cursor: Use cursor: pointer on terms (not cursor: help). The question-mark cursor feels clinical — a pointer feels clickable and inviting.
Tooltip overflow fix: Translation blocks and other containers with overflow: hidden will clip tooltips. To fix this, the tooltip JS must use position: fixed and calculate coordinates from getBoundingClientRect() instead of relying on CSS position: absolute within the container. Append tooltips to document.body rather than inside the term element.
Quizzes should test whether the learner can use their knowledge to solve a real problem, not whether they can regurgitate parameter names.
What to quiz (in order of value):
What NOT to quiz:
Quiz tone:
How many quizzes: One per module, placed at the end. 3-5 questions per quiz. Each question should make the learner pause and think.
Documentation topics vary wildly in breadth. A clear scoping strategy prevents courses from becoming unfocused.
Narrow topics (hooks, prompt caching, streaming) — 3-5 modules, read all relevant docs. These make the best courses.
Medium topics (tool use, Agent SDK, MCP) — 5-7 modules. May need to prioritize which aspects to cover deeply vs. mention in passing.
Broad topics (Claude API, "everything about Claude Code") — Too broad for a single course. Narrow to a specific sub-topic and suggest related courses:
"The Claude API is too broad for one course. I'll focus on the Messages API and tool use — the core of building with Claude. For streaming, batch processing, and admin APIs, you can generate separate courses."
Rule of thumb: If you'd need to read more than 10 doc files to cover the topic, it's too broad. Narrow it.
The visual design should feel like discovering knowledge in a luxury developer observatory — deep, atmospheric, and unmistakable. Read references/design-system.md for the full token system, but here are the non-negotiable principles:
Check every one of these before considering a course complete.
Translation blocks use overflow: hidden for code wrapping. If tooltips use position: absolute inside the term element, they get clipped by the container. Fix: Tooltips must use position: fixed and be appended to document.body. Calculate position from getBoundingClientRect(). This is the #1 bug in every build.
The most common failure is under-tooltipping. Claude-specific terms like MCP, SSE, content blocks, stop_reason, tool_use, matchers, CLAUDE.md, sub-agents — all need tooltips on first use per module. Rule: if a term is specific to Claude/Anthropic and wouldn't be known to a developer who hasn't used Claude before, tooltip it.
The course looks like reformatted documentation instead of a visual learning experience. This happens when you write more than 2-3 sentences in a row without a visual break. Every screen must be at least 50% visual.
Using the same metaphor for different concepts. Every module needs its own metaphor that feels inevitable for that specific concept.
Trimming, simplifying, or "cleaning up" code examples from the docs. The learner should be able to find the exact same code in the official documentation. Choose naturally short examples rather than editing longer ones.
Trying to cover everything related to a topic instead of staying focused. If the topic is "hooks," don't also try to teach MCP, skills, and permissions in depth. Mention them in the "Connect the dots" module and suggest separate courses.
Asking "What's the default max_tokens?" or "Name the hook event types" — those test recall, not understanding. Every quiz question should present a scenario the learner hasn't seen and ask them to apply what they learned.
Using scroll-snap-type: y mandatory traps users inside long modules. Always use proximity.
Trying to write all modules in one pass causes later modules to be thin and rushed. Build one module at a time and verify each before moving on.
A module with only text and code blocks, no interactivity. Every module needs at least one of: quiz, data flow animation, protocol conversation, architecture diagram, drag-and-drop.
The references/ directory contains detailed implementation specs. Read them when you reach the relevant phase:
references/design-system.md — Complete CSS custom properties, color palette, typography scale, spacing system, shadows, animations, scrollbar styling. Read this before writing any CSS.references/interactive-elements.md — Implementation patterns for every interactive element: drag-and-drop quizzes, multiple-choice quizzes, code↔English translations, protocol conversations, message flow visualizations, architecture diagrams, pattern cards, callout boxes. Read this before building any interactive elements.npx claudepluginhub costiash/claude-code-docs --plugin claude-docsGenerates a standalone multi-lesson course artifact with navigation, objectives, flashcards, quizzes, and source links as a self-contained HTML/CSS/JS page.
Generates a structured markdown course with visual diagrams and evidence-based learning features for any topic the user wants to learn from scratch.
Generates a single-page interactive HTML course from any codebase, with code translations, animations, and quizzes for non-technical users.