claude-tutor
CLAUDE.md121 starsChanged 8 months agoMITView on GitHub
A Claude Code plugin that turns Claude into a personal tutor with spaced repetition. Users install it via the plugin marketplace and interact through slash commands (/learn, /quiz, /review, /resources, /dashboard) or natural language. Run hook tests after any change to hooks/enforce-paths.js or data schemas. The plugin has three layers that work independently: Skills (skills/*/SKILL.md) — Markdown instructions that Claude follows. Not code. Each skill defines a multi-phase workflow (e.g., learn: clarify scope → research → generate plan → save).…
- Installs packages
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Run hook tests after any change to hooks/enforce-paths.js or data schemas.
- Very specific: line 34
All user data lives in ~/.claude/learning/ (absolute path, never relative):
- Very specific: line 54
When modifying a skill, check the matching command's allowed-tools — the skill can't use tools the command doesn't allow.
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What This Is
A Claude Code plugin that turns Claude into a personal tutor with spaced repetition. Users install it via the plugin marketplace and interact through slash commands (/learn, /quiz, /review, /resources, /dashboard) or natural language.
Testing
node tests/test-hooks.js # Hook unit tests (27 tests, instant)
./evals/run-trigger-eval.sh # Natural language trigger routing (17 prompts)
./evals/run-functional-eval.sh # End-to-end workflows (21 checks)
node skills/dashboard/server/tests/dashboard.test.js # Dashboard tests (30 scenarios)Run hook tests after any change to hooks/enforce-paths.js or data schemas.
Architecture
The plugin has three layers that work independently:
Skills (skills/*/SKILL.md) — Markdown instructions that Claude follows. Not code. Each skill defines a multi-phase workflow (e.g., learn: clarify scope → research → generate plan → save). Skills reference data paths and schemas but don't enforce them.
Hooks (hooks/) — Node.js scripts that enforce data integrity at write time:
enforce-paths.js— PreToolUse hook on Write/Edit. Blocks wrong paths, schema leakage between plan/progress files, unknown fields, and score format errors. This is the safety net for when Claude invents field names.session-start.js— SessionStart hook. Reads spaced repetition data and prints overdue review reminders.
Dashboard (skills/dashboard/server/) — Express server at localhost:3847. Reads/writes the same JSON files as the CLI. Has its own validation (validate.js) that mirrors the hook logic plus SM-2 algorithm implementation.
Data Layout
All user data lives in ~/.claude/learning/ (absolute path, never relative):
| Path | Purpose | Allowed top-level fields |
~/.claude/learning/index.json | Topic registry | topics (map of slug → metadata) |
~/.claude/learning/profile.json | Learner preferences | learningStyle, background, createdTopics |
~/.claude/learning/plans/<slug>-<date>.json | Learning plans | topic, slug, created, level, goal, depth, timeCommitment, modules, totalEstimatedTime, diagnostic |
~/.claude/learning/progress/<slug>.json | Quiz progress | topic, quizzes, weakAreas, strongAreas, overallScore, spacedRepetition |
The critical rule: Plan fields and progress fields must never cross directories. The hook blocks this, but skills must also get the paths right. overallScore is a percentage (0-100), not a fraction (0-1).
Command → Skill → Tool Chain
Each command (commands/*.md) defines allowed-tools that restrict what Claude can do:
/learn— AskUserQuestion, WebSearch, WebFetch, Read, Write, Bash(mkdir)/quiz— AskUserQuestion, Read, Write, Bash(mkdir)/review— Read only/resources— WebSearch, WebFetch, Read/dashboard— Bash(node/npm/cd)
When modifying a skill, check the matching command's allowed-tools — the skill can't use tools the command doesn't allow.
Dashboard Server
The server (skills/dashboard/server/) shares data with the CLI via the same JSON files. Key modules:
api.js— REST routes (/api/stats,/api/topics,/api/plans/:slug,/api/progress/:slug, etc.)validate.js— Schema validation + SM-2 algorithm (updateSM2,computeWeakStrong,getModuleScores)sse.js— Server-sent events for streaming Claude responses to the browserpublic/app.js— Vanilla JS SPA (no framework, hash-based routing)
Dashboard runs on port 3847. To run manually: cd skills/dashboard/server && npm install && node index.js
Common Pitfalls
- Claude invents field names like
quiz_history,results,historyinstead ofquizzes— the hook catches this but skills should use correct names - Writing to
./learning/(relative) instead of~/.claude/learning/(absolute) — hook blocks this - Putting quiz data in plan files or vice versa — hook blocks this
overallScore: 0.85instead ofoverallScore: 85— hook blocks this- Skills reference
AskUserQuestiontool — each skill has a line enforcing its use, but the model may still fall back to plain text in some Claude Code versions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

