agentleFS
yarikletoyarikleto/claude-teacher-plugin/.claude/CLAUDE.md

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.

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
  1. Very specific:

    Always bump .claude-plugin/plugin.json when changing the plugin.

    line 7
  2. Distinctive:

    Keep skill/hook counts in README badges and this guide in sync if components change.

    line 22
  3. Very specific:

    Every hook calls teach_is_learning_project before emitting context.

    line 26
  4. Very specific:

    Use structured hookSpecificOutput through teach_emit_context.

    line 27
  5. Very specific:

    Keep exec-form path placeholders in args.

    line 28
  6. Distinctive:

    Never replace unrelated project settings/hooks or the whole project CLAUDE.md during onboarding.

    line 31
  7. Very specific:

    All skills honor CLAUDE_TEACHER_DB using the shared contract.

    line 32
  8. Distinctive:

    Keep onboarding accessible to beginners: ask only for a missing topic and starting level, make personalization optional, and never require …

    line 35
  9. Distinctive:

    Keep event flow explicit: runtime check, project guard, event filters, output.

    line 39
  10. Distinctive:

    Use descriptive names and small functions.

    line 41
  11. Distinctive:

    Keep emitted teaching instructions readable in the event script or review formatter.

    line 42
  12. Very specific:

    Keep hooks/README.md accurate about file access, external commands, and effects.

    line 45
  13. Distinctive:

    Run from the repository root:

    line 49
  14. Distinctive:

    Check current official docs when changing integration behavior:

    line 64
  15. Very specific:

    Do not remove a currently documented feature based on older examples.

    line 71

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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 repository
  • skills/: 15 skills; supporting templates and Excalidraw references live beside their skill
  • references/education-data.md: shared database, assessment, persistence, and research contract
  • hooks/hooks.json: 5 hook registrations, using exec-form command + args
  • hooks/lib/teach-guard.sh: project opt-in, JSON input validation, DB path, context output
  • hooks/lib/review-context.jq: portable calendar dates and bounded review queues
  • hooks/lib/runtime.sh, hooks/lib/json.sh, hooks/lib/json_fallback.py: capability detection and equivalent jq/Python JSON operations; no runtime downloads
  • hooks/check-runtime.sh: optional read-only troubleshooting check, not an onboarding requirement
  • tests/: 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

  1. Every hook calls teach_is_learning_project before emitting context. Respect enabled: false, keep legacy memory/knowledge_gaps.md support, and skip subagent activity.
  2. Use structured hookSpecificOutput through teach_emit_context. Do not use bare stdout for context outside SessionStart/UserPromptSubmit.
  3. 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.
  4. PostToolUseFailure has a top-level error and is_interrupt; no successful tool_response. Claude's tool calls do not observe edits in the student's editor.
  5. Stop fires after each response. Its additionalContext continues the conversation under the documented loop protections. Check stop_hook_active, request only an idempotent checkpoint, and never manufacture session_end on every turn.
  6. Never replace unrelated project settings/hooks or the whole project CLAUDE.md during onboarding. Setup/reset are manual-only skills.
  7. All skills honor CLAUDE_TEACHER_DB using the shared contract. Quiz IDs are stable per attempt; passive engagement and repeated saves must not reschedule assessments.
  8. Reference bundled files with ${CLAUDE_PLUGIN_ROOT} or ${CLAUDE_SKILL_DIR}. Use namespaced /claude-teacher:<skill> commands to avoid collisions.
  9. 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.
  10. 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.md accurate 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 . --strict

The 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:

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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.