claude-teacher-plugin
CLAUDE.md9 starsChanged 2 months agoMITView on GitHub
This file is repository guidance, not shipped tutoring context. Runtime instructions come from skills and hooks; setup uses skills/init-edu/references/project-context.md. Always bump .claude-plugin/plugin.json when changing the plugin. Use semver: patch for fixes/wording, minor for new skills/hooks/features, major for breaking changes. Keep one version source in plugin.json. Keep skill/hook counts in README badges and this guide in sync if components change. Plugin files are read-only inputs at runtime; student data lives outside the cache.
In this repository15 other files it gives its agents.
- asciiSkill
- challengeSkill
- compareSkill
- demoSkill
- excalidrawSkill
- flashcardsSkill
- init-eduSkill
- motivateSkill
- progressSkill
- quiz-meSkill
- researchSkill
- reset-eduSkill
- roadmapSkill
- save-progressSkill
- summarySkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
15 rules. About 0 are common, 8 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Always bump .claude-plugin/plugin.json when changing the plugin.
- Distinctive: line 22
Keep skill/hook counts in README badges and this guide in sync if components change.
- Very specific: line 26
Every hook calls teach_is_learning_project before emitting context.
- Very specific: line 27
Use structured hookSpecificOutput through teach_emit_context.
- Very specific: line 28
Keep exec-form path placeholders in args.
- Distinctive: line 31
Never replace unrelated project settings/hooks or the whole project CLAUDE.md during onboarding.
- Very specific: line 32
All skills honor CLAUDE_TEACHER_DB using the shared contract.
- Distinctive: line 35
Keep onboarding accessible to beginners: ask only for a missing topic and starting level, make personalization optional, and never require …
- Distinctive: line 39
Keep event flow explicit: runtime check, project guard, event filters, output.
- Distinctive: line 41
Use descriptive names and small functions.
- Distinctive: line 42
Keep emitted teaching instructions readable in the event script or review formatter.
- Very specific: line 45
Keep hooks/README.md accurate about file access, external commands, and effects.
- Distinctive: line 49
Run from the repository root:
- Distinctive: line 64
Check current official docs when changing integration behavior:
- Very specific: line 71
Do not remove a currently documented feature based on older examples.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 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 Teacher Plugin — Developer Guide
This file is repository guidance, not shipped tutoring context. Runtime instructions come from skills and hooks; setup uses skills/init-edu/references/project-context.md.
Versioning
Always bump .claude-plugin/plugin.json when changing the plugin. Use semver: patch for fixes/wording, minor for new skills/hooks/features, major for breaking changes. Keep one version source in plugin.json.
Structure
.claude-plugin/plugin.json: plugin manifest.claude-plugin/marketplace.json: marketplace for this repositoryskills/: 15 skills; supporting templates and Excalidraw references live beside their skillreferences/education-data.md: shared database, assessment, persistence, and research contracthooks/hooks.json: 5 hook registrations, using exec-formcommand+argshooks/lib/teach-guard.sh: project opt-in, JSON input validation, DB path, context outputhooks/lib/review-context.jq: portable calendar dates and bounded review queueshooks/lib/runtime.sh,hooks/lib/json.sh,hooks/lib/json_fallback.py: capability detection and equivalent jq/Python JSON operations; no runtime downloadshooks/check-runtime.sh: optional read-only troubleshooting check, not an onboarding requirementtests/: focused hook and demo regression checks
Keep skill/hook counts in README badges and this guide in sync if components change. Plugin files are read-only inputs at runtime; student data lives outside the cache.
Invariants
- Every hook calls
teach_is_learning_projectbefore emitting context. Respectenabled: false, keep legacymemory/knowledge_gaps.mdsupport, and skip subagent activity. - Use structured
hookSpecificOutputthroughteach_emit_context. Do not use bare stdout for context outside SessionStart/UserPromptSubmit. - Keep exec-form path placeholders in
args; no shell interpolation or unquoted plugin paths. The plugin must load from cache paths containing spaces and apostrophes. PostToolUseFailurehas a top-levelerrorandis_interrupt; no successfultool_response. Claude's tool calls do not observe edits in the student's editor.Stopfires after each response. ItsadditionalContextcontinues the conversation under the documented loop protections. Checkstop_hook_active, request only an idempotent checkpoint, and never manufacturesession_endon every turn.- Never replace unrelated project settings/hooks or the whole project CLAUDE.md during onboarding. Setup/reset are manual-only skills.
- All skills honor
CLAUDE_TEACHER_DBusing the shared contract. Quiz IDs are stable per attempt; passive engagement and repeated saves must not reschedule assessments. - Reference bundled files with
${CLAUDE_PLUGIN_ROOT}or${CLAUDE_SKILL_DIR}. Use namespaced/claude-teacher:<skill>commands to avoid collisions. - Exercise the hook suite with each JSON backend in isolation. When neither backend is available, hooks must remain quiet. The project lesson instructions still direct Claude to load progress and save new learning. Run Python in isolated mode without writing cache files.
- Keep onboarding accessible to beginners: ask only for a missing topic and starting level, make personalization optional, and never require students to install helper tools or manage a technical mode. Explain real save/access failures and never claim unverified success.
Hook readability
- Keep event flow explicit: runtime check, project guard, event filters, output.
- Loading a helper must not run checks or exit the caller.
- Use descriptive names and small functions; expand dense conditions and nested formatting.
- Keep emitted teaching instructions readable in the event script or review formatter.
- Parse input as data. Do not add eval, encoded code, dynamic code generation, or runtime downloads.
- Explain expected silent failures; do not hide programming errors behind broad exception handlers.
- Keep
hooks/README.mdaccurate about file access, external commands, and effects.
Validation
Run from the repository root:
python3 -m unittest discover -s tests -v
node --test tests/demo.test.cjs
claude plugin validate .claude-plugin/plugin.json --strict
claude plugin validate . --strictThe explicit plugin manifest validation checks plugin contents. Validating . alone chooses the marketplace and does not establish that its plugin passed validation.
For interactive smoke testing, use claude --plugin-dir /absolute/path/to/claude-teacher-plugin from a disposable project. Check /help, /hooks, setup, an assessment, and a checkpoint. Keep real student data out of tests. /reload-plugins refreshes installed components; restart if an old session retains teaching context.
Documentation references
Check current official docs when changing integration behavior:
- https://code.claude.com/docs/en/plugins-reference
- https://code.claude.com/docs/en/hooks
- https://code.claude.com/docs/en/skills
- https://code.claude.com/docs/en/plugin-marketplaces
Do not remove a currently documented feature based on older examples. In particular, exec-form args and Stop additionalContext are supported by current Claude Code.
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.

