Turn any AI-assisted working session into a textbook-quality lesson. Tracks the problem-solving arc via hooks or manual logging, builds a session knowledge graph, and emits a grounded markdown+PDF lesson with diagrams, a quiz, and cross-session learner memory. Works on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, OpenClaw, Factory Droid, Trae, and Google Antigravity.
The user has invoked `/lesson-map`. Your job is to read a set of lessons, extract their concepts and relationships, and write a single `map.html` that visualizes how concepts across those lessons connect.
Display your learner profile — misconceptions, concepts learned, and token usage
Resume tracking on the most recent /lesson session
Start a tracked /lesson learning session
Regenerate the most recent /lesson with optional new notes
Matches all tools
Hooks run on every tool call, not just specific ones
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
An AI coding plugin that turns real working sessions into grounded, reusable lessons.
lesson watches tool activity inside a live AI session, keeps a compact record of the important turns, and turns the final arc into a lesson built from your actual files, commands, errors, and wrong assumptions.
Instead of generating a generic tutorial from scratch, it produces a lesson about what really happened:
/lesson react useEffect infinite loop when depending on an object
# work normally
/lesson-done
.claude/lessons/
├── sessions/<slug>/
│ ├── meta.json
│ ├── arc.jsonl
│ ├── session_graph.json # created after the first compression cycle
│ └── arc.jsonl.archive.N
└── output/
├── <slug>.md
├── <slug>.pdf # optional
├── index.html
└── map.html
Most learning tools start with a topic and invent an explanation.
lesson starts with a real failure path.
That difference matters. A working session contains high-quality teaching signal: the commands you ran, the outputs you misread, the hypotheses you formed, the file edits you tried, and the observation that finally changed your mind. That is the raw material a serious lesson should be built from.
| Generic tutorial | lesson |
|---|---|
| Starts from an abstract topic | Starts from your actual session |
| Uses canned examples | Uses your files, errors, and commands |
| Explains the concept in general | Explains why you got stuck |
| Often guesses at relevance | Has a concrete arc to teach from |
Works across 10 AI coding platforms. One install script, one core format.
| Platform | Hook support | Config location | Command prefix |
|---|---|---|---|
| Claude Code | PostToolUse + Stop (automatic) | ~/.claude/hooks.json | /lesson |
| Codex | None (manual logging) | ~/.codex/CODEX.md | $lesson |
| Cursor | None (manual logging) | <project>/.cursor/rules/lesson.mdc | /lesson |
| Gemini CLI | BeforeTool (optional) | ~/.gemini/GEMINI.md | /lesson |
| GitHub Copilot CLI | None (manual logging) | ~/.github/copilot-instructions.md | /lesson |
| OpenCode | None (manual logging) | ~/.opencode/OPENCODE.md | /lesson |
| OpenClaw | None (manual logging) | ~/.claw/CLAW.md | /lesson |
| Factory Droid | None (manual logging) | ~/.droid/DROID.md | /lesson |
| Trae | None (manual logging) | ~/.trae/TRAE.md | /lesson |
| Google Antigravity | None (manual logging) | <project>/.agent/lesson.md | /lesson |
On platforms with hooks (Claude Code, Gemini), event logging is automatic. On all others, the AI logs significant events manually to arc.jsonl during the session.
/lesson starts, the plugin never speaks to the main conversation until you call it back. No reminders, no exit blocks, no model nags.lesson compress CLI runs EventGraphBuilder in ~50 ms with zero LLM tokens. The PostToolUse hook spawns it in a detached subprocess at the 25-event threshold.session_graph.json) — structured causal record of the session~/.claude/lessons/profile.json — tracks recurring misconceptions and concepts across all projects and platforms/regenerate [notes] to rewrite the latest lesson with new guidance/lesson resume to continue a paused session/lesson-profile to display your learning history and token usage/lesson-index to build a browsable lesson list/lesson-map to build a concept map across generated lessonslesson CLI — use the compression and graph tooling standalone, outside of any AI assistantnpx with @mermaid-js/mermaid-clipandoc plus weasyprint, wkhtmltopdf, xelatex, or pdflatexnpx claudepluginhub oussemabenameur/lesson --plugin lessonEN: Reflect on the current conversation and save reusable learnings (memories, anti-patterns / Reflexion-style lessons, skill stubs, project-doc updates) with explicit confirmation. ES: Reflexiona sobre la conversación actual y guarda aprendizajes reusables (memorias, anti-patrones estilo Reflexion, stubs de skills, actualizaciones de project-docs) con confirmación explícita.
Agent skills that package evidence-backed pedagogical methodologies (explain-and-check, quiz-me, connect-to-what-you-know, ask-me-questions, learn-by-doing, linked-notes, flashcards) as workflows applied to code. The anti-cognitive-surrender layer: closes the comprehension gap that opens when an LLM has done the work on the human's behalf.
A personal AI tutor based on Bloom's 2-sigma research: it generates a structured syllabus, teaches one adaptive lesson at a time, and tailors each next lesson to the learner's highlights and feedback. Bundles the bloom-tutor tutoring skill plus six learn-* learning-method skills.
Generate personalized, annotated code-reading tutorials from your own codebase. Three surfaces (tutorial generation, vocabulary management, learning-state inspection), six writing-to-learn entry points, and five audience-facing entry points. Tracks vocabulary with a status state machine.
Claude skill for configuring and initializing tutoring sessions and curriculum. Sets up structured learning pathways and educational frameworks.
In-context coding tutor for Claude Code. Learn from your real project with explanations, quizzes, diagnostics, and belt-based progression — locally and privately.