In-context coding tutor for Claude Code — explanations, quizzes, and belt-based progress from your real project
CodeSensei is a free, open-source Claude Code plugin by Dojo Coding that turns every coding session into a learning session.
It watches what you build locally, explains what just happened in plain language, quizzes you on concepts from your own project, and tracks your growth with a martial arts belt progression system.
Millions of people are building with AI before they fully understand the code.
That is not a failure — it is a new starting point.
The problem is what happens next:
- something breaks
- a new feature needs a custom change
- the AI explanation feels too abstract
- the user realizes they shipped something they cannot yet reason about
CodeSensei closes that gap.
Instead of forcing people to stop building and go study in a separate environment, it teaches inside the workflow they already use.
- 🧠 Contextual explanations — learn from your actual project, not fake toy examples
- 🧩 Micro-quizzes — quick checks that reinforce understanding instead of syntax memorization
- 🥋 Belt progression — White Belt to Black Belt, earned through XP + mastery gates
- 🔁 Persistent local profile — progress follows you across projects on the same machine
- 🎯 Adaptive teaching — explanations adjust to your belt level and professional background
- 🔒 Local-first design — no telemetry, no external calls, no code uploads from the plugin scripts
- Claude Code with plugin support
jqinstalled locally- macOS:
brew install jq - Ubuntu/Debian:
sudo apt install jq
- macOS:
jq is required for profile tracking, imports, quizzes, and diagnostics.
- ✅ macOS
- ✅ Linux
⚠️ Windows via WSL recommended
CodeSensei is a Unix-shell plugin today. Its runtime depends on bash, jq, and standard Unix tools, so WSL is the safest path on Windows.
Inside Claude Code:
/plugin marketplace add DojoCodingLabs/code-sensei
/plugin install code-sensei@code-senseiAfter install:
- Run
/code-sensei:progressto initialize your local profile - Optional: run
/code-sensei:level background marketing(or design, finance, medicine, etc.) - Build normally with Claude Code
- Use
/code-sensei:explainafter a code change you want to understand - Run
/code-sensei:doctorif you want to verify setup or inspect local storage paths
Inside Claude Code:
/plugin marketplace update DojoCodingLabs/code-sensei
/plugin update code-sensei@code-senseiRestart your Claude Code session after updating so hooks reload cleanly.
git clone https://github.com/DojoCodingLabs/code-sensei.git
cd code-sensei
/plugin marketplace add .
/plugin install code-senseiCodeSensei currently ships with 10 commands:
-
You build normally Prompt Claude to create files, edit code, install dependencies, and run commands.
-
Hooks watch local activity CodeSensei listens for file changes and shell commands, then queues lightweight teaching moments locally.
-
You ask when curious Use
/code-sensei:explain,/code-sensei:why, or/code-sensei:quizwhenever you want to understand something better. -
Teaching adapts to you White Belt gets analogy-first explanations. Advanced belts get more technical language, tradeoffs, and architecture discussion.
-
Progress persists locally Your profile lives in
~/.code-sensei/and carries across projects on that machine.
⬜ White Belt → 0 XP “You wrote your first prompt”
🟡 Yellow Belt → 500 XP “You understand files & folders”
🟠 Orange Belt → 1,500 XP “You get frontend vs backend”
🟢 Green Belt → 3,500 XP “You can read and modify code”
🔵 Blue Belt → 7,000 XP “You understand APIs & databases”
🟤 Brown Belt → 12,000 XP “You can architect a full app”
⚫ Black Belt → 20,000 XP “You think like an engineer”
Promotion is not XP-only.
Each new belt also requires:
- concept mastery gates
- quiz accuracy of at least 60%
That keeps progress tied to understanding, not just activity.
“Claude just added a translator to your server. Raw form data arrives as text, and this translator turns it into something your code can actually read.”
“Claude added middleware to parse JSON before requests hit your route handlers, so
req.bodyis already normalized when your business logic runs.”
Same project. Same concept. Different depth.
Set a background with /code-sensei:level background marketing and CodeSensei will adapt examples to your field.
Examples:
- Marketing — “An API is like a campaign brief: you send structured requirements and receive a structured result.”
- Design — “Components are like design system elements: reusable, composable, and consistent.”
- Finance — “A variable is like an account balance: a named value that changes over time.”
- Medicine — “Error handling is like triage: you check critical problems first.”
CodeSensei currently includes:
- 10 learning categories
- 45 concepts
- 124 quiz questions
Categories:
- 🧱 Fundamentals
- 🌐 Web Basics
- ⚡ JavaScript
- 💻 Terminal & Tools
- 🎨 Frontend
- ⚙️ Backend
- 🗄️ Databases
- 🚀 Deployment
- 🏗️ Architecture
- 🐞 Debugging
Everything lives under ~/.code-sensei/.
Primary files:
profile.json— belt, XP, streaks, quiz stats, preferences, mastered conceptsprofile.json.backup— last backup created during importsession-commands.jsonl— recent command log, truncated and redactedsession-changes.jsonl— recent file-change logsessions.log— compact session start/stop historypending-lessons/— queued teaching moments for the current sessionlessons-archive/— archived teaching momentserror.log— local script errors only
Retention:
session-commands.jsonlkeeps the most recent 1000 linessession-changes.jsonlkeeps the most recent 1000 linessessions.logkeeps the most recent 500 lineslessons-archive/keeps the last 30 daily archive filespending-lessons/is cleared at session end
Sensitive data handling:
- command logs are truncated
- common token/secret/password patterns are redacted before logging
- the plugin scripts do not upload your code or local profile anywhere
For a more detailed breakdown, see PRIVACY.md.
CodeSensei is designed to be local-first.
The shell scripts in this repo:
- do not send telemetry
- do not upload code
- do not call external APIs for tracking
- store learning data locally on your machine
Important precision:
- CodeSensei does record local metadata about your coding sessions so it can teach effectively
- That includes file paths, concept history, quiz history, and redacted command history
- If you want to inspect exactly what exists on disk, run
/code-sensei:doctor
If you ever want a clean reset, delete ~/.code-sensei/.
code-sensei/
├── .claude-plugin/
│ ├── plugin.json
│ └── marketplace.json
├── commands/ # 10 slash commands
├── agents/
│ └── sensei.md # teaching agent prompt
├── hooks/
│ └── hooks.json # SessionStart, SessionEnd, PostToolUse hooks
├── scripts/ # local runtime behavior (bash + jq)
├── skills/ # teaching modules
├── data/
│ ├── concept-tree.json # 45 concepts across 10 categories
│ └── quiz-bank.json # 124 quiz items
└── tests/
Contributions are welcome.
High-value areas:
- better analogies
- more quiz questions
- new learning modules
- better concept detection
- translations
- bug fixes and tests
See CONTRIBUTING.md.
Dojo Coding is a LATAM-first tech education ecosystem helping more people become builders.
CodeSensei is free forever, open source, and designed to help users go from “I shipped something with AI” to “I understand what I’m building.”
Learn more:
MIT License.
From vibecoder to engineer — one session at a time.
Free. Open source. By Dojo Coding.

