/ Directory / Playground / Codebase to Course
● Community zarazhangrui ⚡ Instant

Codebase to Course

by zarazhangrui · zarazhangrui/codebase-to-course

Point at a repo, get a single HTML 'course' that explains it like a tutorial — annotated code, diagrams, narrative — for non-engineers and onboarding hires.

codebase-to-course is a Claude Code skill that walks an entire repository and produces a single-file HTML course explaining how the codebase actually works. It's structured like a tutorial: high-level architecture, then per-module deep dives, then 'follow this request through the system' walkthroughs — with embedded annotated code snippets. Output is one HTML file, no build step.

Why use it

Key features

Live Demo

What it looks like in practice

ready

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "codebase-to-course-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/zarazhangrui/codebase-to-course",
        "~/.claude/skills/codebase-to-course"
      ],
      "_inferred": true
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "codebase-to-course-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/zarazhangrui/codebase-to-course",
        "~/.claude/skills/codebase-to-course"
      ],
      "_inferred": true
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "codebase-to-course-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/zarazhangrui/codebase-to-course",
        "~/.claude/skills/codebase-to-course"
      ],
      "_inferred": true
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "codebase-to-course-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/zarazhangrui/codebase-to-course",
        "~/.claude/skills/codebase-to-course"
      ],
      "_inferred": true
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "codebase-to-course-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/zarazhangrui/codebase-to-course",
        "~/.claude/skills/codebase-to-course"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "codebase-to-course-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/zarazhangrui/codebase-to-course",
          "~/.claude/skills/codebase-to-course"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add codebase-to-course-skill -- git clone https://github.com/zarazhangrui/codebase-to-course ~/.claude/skills/codebase-to-course

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use Codebase to Course

Generate a self-paced onboarding course for a new hire

👤 Engineering managers / tech leads ⏱ ~45 min beginner

When to use: Friday after offer accepted: you want a real onboarding artifact instead of 'go read the code'.

Prerequisites
  • Skill installed — git clone https://github.com/zarazhangrui/codebase-to-course ~/.claude/skills/codebase-to-course
  • Repo checked out — Standard git clone
Flow
  1. Scan repo
    codebase-to-course: scan ./our-app. Output the proposed course structure first — section list — before writing.✓ Copied
    → Concrete TOC: architecture, modules, request flows
  2. Generate course
    Looks good. Generate the full HTML to /onboarding/course.html. Target audience: new full-stack hire who knows React + Node but not our domain.✓ Copied
    → HTML file generated; opens in browser
  3. Verify accuracy
    Spot-check: does the 'auth flow' walkthrough match what's actually in src/auth/? Quote the real code.✓ Copied
    → Walkthrough cites real file paths and current code

Outcome: A real onboarding artifact that saves the team 2 weeks of explaining.

Pitfalls
  • Course is too long to actually read — Specify max sections; quality over completeness
  • Code excerpts go stale — Regenerate after major refactors; the skill is fast
Combine with: filesystem · git-mcp-idosal

Explain a complex feature to a non-technical PM

👤 Tech leads ⏱ ~20 min beginner

When to use: PM keeps asking 'why does this take 3 sprints' — you want a concrete artifact.

Flow
  1. Scope to feature
    codebase-to-course: scope to src/payments/. Audience: PM with no engineering background. Lean on diagrams + analogies, light on code.✓ Copied
    → Course is high-level; code blocks minimal

Outcome: PM walks away with mental model.

Pitfalls
  • Analogies oversimplify — Spot-check; the skill prefers accuracy if pushed

Generate a 'how it works' page for your open source project

👤 OSS maintainers ⏱ ~30 min intermediate

When to use: Your README has features but no architectural explainer.

Flow
  1. Generate as a docs page
    codebase-to-course: scan main branch. Output ARCHITECTURE.html for the docs site. Target: experienced devs evaluating the project.✓ Copied
    → Output reads like a thoughtful contributor's guide

Outcome: Better dev experience for evaluators and contributors.

Pitfalls
  • Course branded wrong (looks generic) — Pass project name + style cues in the prompt

Combinations

Pair with other MCPs for X10 leverage

codebase-to-course-skill + filesystem

Read the local repo and write the course

codebase-to-course: scan ./our-app, write /onboarding/course.html.✓ Copied
codebase-to-course-skill + git-mcp-idosal

Course up an external repo without cloning

Use GitMCP for owner/repo. Then codebase-to-course on top of that.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
scan_repo path Always first 0
propose_toc scan_result, audience After scan, before generation 0
generate_course scan_result, toc, target_html_path Final step 0
scope_to_subdir subdir_path Large monorepo or feature focus 0

Cost & Limits

What this costs to run

API quota
N/A
Tokens per call
Significant — the skill reads the whole repo (10k–50k tokens typical)
Monetary
Free; your model tokens apply
Tip
For monorepos, use scope_to_subdir; don't course up all of it at once

Security

Permissions, secrets, blast radius

Minimum scopes: filesystem-read filesystem-write
Credential storage: None
Data egress: None — purely local read/write

Troubleshooting

Common errors and fixes

Course is too generic / doesn't reference real code

Make the prompt more specific; ask for file:line citations

Repo too large; runs out of context

Use scope_to_subdir; do per-module courses and link them

HTML formatting broken

Ask the skill to validate the output; regenerate if needed

Alternatives

Codebase to Course vs others

AlternativeWhen to use it insteadTradeoff
Repomix + manual promptYou want full control of how the codebase is fed to ClaudeMore setup; no opinionated output format
DocsGPT / MintlifyYou want hosted docsDifferent product entirely; not single-file HTML
absolutely-skilled / autodocYou want auto-generated API docsAPI ref ≠ tutorial

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills