BayramAnnakov writes about claude-reflect, a self-learning plugin for Claude Code that captures user corrections during sessions and queues them for human-reviewed application to CLAUDE.md memory files.
- Uses hooks to automatically detect correction patterns ("no, use X", "actually...", "use X not Y") and writes them to a JSON queue file
- Learnings are routed through a hierarchy of destinations: global, project-specific, personal (gitignored), modular rules with path-scoping, and low-confidence auto-memory
- Includes a `--scan-history` flag to retroactively surface missed learnings from past sessions
- Distinguishes high-confidence corrections (tool rejections, explicit "remember:" markers) from lower-confidence ones
Anurag Singh writes about using a Stop hook in Claude Code to force the agent to review its work against a checklist of previously made mistakes before finishing, solving the problem of the model repeating the same errors across sessions despite CLAUDE.md instructions and prompt-level guidance.
- The hook is a Bash script that uses jq to read a mistakes.md file and inject a "block" decision, sending Claude back for a second review pass.
- The script checks the stop_hook_active flag to avoid an infinite review loop.
- A TaskCompleted event hook is a more token-efficient alternative if you only want review on task completion rather than every response.
- Hooks execute deterministically on trigger events, unlike textual instructions in CLAUDE.md which Claude may treat as optional.