Agentic coding lets you ship work without reading it. This hook counters that: every 40 to 45 actions it pauses your Claude Code chat and makes you answer five questions about the session, in your...
翻訳待ち
プラグインPython · ShellGitHub @jay739オンライン所有者未確認
Have you tried it? One tap is enough. No sign-in needed.
Mandatory, automatic pop-quiz hook for Claude Code. It quizzes you on your own sessions every 40 to 45 actions to counter agentic context loss.
翻訳待ち
Loading the full README.
Read the full README ↗A mandatory, automatic learning-check hook for Claude Code.
Stay fluent in the code your agent wrote: get pop-quizzed on your own sessions, on a cadence you can't skip.
Install · How it works · Configuration · Updates · Changelog
Agentic coding lets you ship work without reading what the agent wrote. The risk: you end up unable to explain code, decisions, and tooling that are nominally "yours", whether in an interview, a review, or just when the agent isn't around. This hook counters that by pop-quizzing you on your own sessions, on a cadence you can't skip.
Every ~40 to 45 actions in a chat (your messages plus every tool/file/agent call Claude makes), it pauses and makes you answer 5 questions about the technical substance of that session: the jargon used, the code written and why, and the files touched. You answer in your own words; Claude grades you and flags gaps.
After grading, Claude appends the results to a learning journal, a markdown revision log of every quiz: each question, your answer, the correct answer, a verdict, a one-line context note (the file or concept the question came from, so the entry stands alone months later), and links to study. Re-read it later, or point it at a git repo to version your progress. See JOURNAL.example.md for the format.
That journal's layout is a contract, not decoration: the hook parses it back to drive everything below, keyed on each entry's ### <verdict emoji> Q<n> · <topic title> header and its topic title. If the grader drifts off that shape, or renames a topic, the affected history goes quiet. doctor reports the parse coverage so drift shows up as a number instead of rotting unnoticed.
That journal is also read back in to make each round smarter:
status to keep you going.review drill. python3 ~/.claude/hooks/pop_quiz.py review [N] prints flashcards for the topics that are due. Pure read of the journal, no model and no network.[!NOTE] Your real journal holds your actual answers, so it's personal and gitignored by default. The repo ships
JOURNAL.example.mdas a format sample only; yourJOURNAL.mdnever gets committed.
It's two hooks pointing at one script, wired in your Claude Code settings.json:
| Event | Mode | What it does |
|---|---|---|
PreToolUse (all tools) | tool | Increments the per-chat counter silently, records the tool name and files touched for targeted questions, never interrupts |
UserPromptSubmit | prompt | Increments, and if the chat crossed its threshold, injects the quiz and resets |
Design choices worth knowing:
UserPromptSubmit alone would never fire there.)session_id, so concurrent chats each track their own count.<claude-dir>/state/; copy ~/.claude/ to another machine and it just works.git clone https://github.com/jay739/claude-pop-quiz.git
cd claude-pop-quiz
./install.sh
install.sh copies hooks/pop_quiz.py into ~/.claude/hooks/ and merges the hook
config into ~/.claude/settings.json without touching your existing settings
(idempotent, safe to re-run). Then open /hooks in Claude Code once, or restart,
to load it. New chats pick it up automatically.
Prefer to wire it by hand? Copy the hooks block from
examples/settings.json into your settings.
[!TIP] The hook loads automatically in new chats. To activate it in an already-open session, run
/hooksonce. Requires only Python 3.6+, no pip installs, no dependencies. macOS, Linux, and WSL use a real file lock; native Windows runs in a degraded lock-free mode (nofcntl) rather than failing silently.
./uninstall.sh
This is the beginning of the README. Read the rest at the original. Read the full README ↗