code2course

A command that turns a codebase into a self-contained web course explaining how the code works. It includes interactive visuals, quizzes, and plain-English explanations beside the code.

In plain words
What is it for?
Use it with a local project, the current folder, or a GitHub repository to create a single-page HTML learning course.
Why use it?
It helps people learn an unfamiliar project without having to understand the code on their own first.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ruizrica/toolkit/code2course
Clone the repo
git clone --depth 1 https://github.com/ruizrica/toolkit
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 579 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00035 $0.00579
Opus 5 $0.00017 $0.00290
Sonnet 5 $0.00007 $0.00116
Haiku 4.5 $0.00003 $0.00058

Measured 2d ago against content hash 36222001ea2d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code2course scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/toolkit/commands/code2course.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/code2course — Codebase to Interactive Course

Transform any codebase into a stunning, self-contained HTML course with scroll-based navigation, animated visualizations, embedded quizzes, and code-with-plain-English side-by-side translations.

Target Codebase

Parse $ARGUMENTS to determine the target codebase:

  • GitHub URL (e.g., https://github.com/user/repo) → Clone it to /tmp/<repo-name> first
  • Local path (e.g., ./my-project or /path/to/project) → Use directly
  • "this" or empty → Use the current working directory

If no argument is provided, introduce yourself:

I can turn any codebase into an interactive course that teaches how it works — no coding knowledge required.

Just point me at a project:

  • A local folder — e.g., /code2course ./my-project
  • A GitHub link — e.g., /code2course https://github.com/user/repo
  • The current project/code2course this

Instructions

Invoke the bundled codebase-to-course skill and follow its 4-phase process.

The skill lives inside this plugin at:

plugins/toolkit/skills/codebase-to-course/SKILL.md
plugins/toolkit/skills/codebase-to-course/references/design-system.md
plugins/toolkit/skills/codebase-to-course/references/interactive-elements.md

Use the Skill tool (Skill name: codebase-to-course) so Claude Code's skill loader resolves it via the plugin's manifest. If the Skill tool is unavailable, fall back to reading the SKILL.md file directly from the plugin directory.

Process Summary

  1. Codebase Analysis — deeply understand the target codebase (read all key files, trace data flows, map components)
  2. Curriculum Design — structure 5–8 modules (do NOT ask for approval — just build it)
  3. Build the Course — generate a single self-contained HTML file, one module at a time
  4. Review and Open — open the HTML in the browser for review

Output

Save the generated course HTML file to the current working directory as <project-name>-course.html.

Read the full file on GitHub · 54 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 54 lines · 35 tokens per session scan A 36222001ea2d

Subscribe to this mod's changes

code2course is a command published in the GitHub repository ruizrica/toolkit (5 stars, last pushed 17d ago), licensed MIT. It adds 35 tokens to every session and 579 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.