claude-reflect
A Claude Code plugin that catches your corrections in chat and, after review, writes them into CLAUDE.md and AGENTS.md
Install
claude plugin marketplace add bayramannakov/claude-reflect
claude plugin install claude-reflect@claude-reflect-marketplaceRestart Claude Code after install; hooks configure themselves.
This is third-party code. Review the repository files before installing.
What it does
The plugin works in two stages. Hooks on every prompt detect corrections like "no, use X" and positive feedback and queue them. The /reflect command shows the queue and, after you approve, moves rules into global or project CLAUDE.md, CLAUDE.local.md, rule files or the skills themselves. /reflect-skills analyzes session history, finds repeating tasks and proposes turning them into commands. You can scan past sessions, dedupe CLAUDE.md and preview changes without applying them.
Who it is for. For heavy Claude Code users tired of repeating the same corrections to the agent.
Good fit when
- The agent keeps repeating the same mistake
- You want to maintain CLAUDE.md without manual editing
- You want to find repeating tasks worth turning into commands
Not a fit when
- You do not use Claude Code
- Your team strictly controls CLAUDE.md through repository review
Example request
/reflect --dry-runLimitations
Works only in Claude Code, needs Python 3.6+ and a restart after install. Pattern-based detection can miss or misread messages, which is why applying changes requires manual approval. History analysis consumes model tokens.
How to disable. Uninstall with claude plugin uninstall claude-reflect and optionally remove the queue file ~/.claude/learnings-queue.json.
Security check
- Python hooks run on every prompt and read session history
- The plugin edits the agent's instruction files
README in short
The README describes two features: memory from corrections and discovery of repeating workflows in history. Install via the Claude Code plugin marketplace and restart afterward. It lists all commands and flags, the hooks and their triggers, hybrid detection via regex and the model, and the files where rules are written. macOS, Linux and Windows are supported. MIT licensed.
SKILL.md
---
name: claude-reflect
description: Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md. Use when discussing learnings, corrections, or when the user mentions remembering something for future sessions.
---
# Claude Reflect - Self-Learning System
A two-stage system that helps Claude Code learn from user corrections.
## How It Works
**Stage 1: Capture (Automatic)**
Hooks detect correction patterns ("no, use X", "actually...", "use X not Y") and queue them to `~/.claude/learnings-queue.json`.
**Stage 2: Process (Manual)**
User runs `/reflect` to review and apply queued learnings to CLAUDE.md files.
## Available Commands
| Command | Purpose |
|---------|---------|
| `/reflect` | Process queued learnings with human review |
| `/reflect --scan-history` | Scan past sessions for missed learnings |
| `/reflect --dry-run` | Preview changes without applying |
| `/reflect-skills` | Discover skill candidates from repeating patterns |
| `/skip-reflect` | Discard all queued learnings |
| `/view-queue` | View pending learnings without processing |
## When to Remind Users
Remind users about `/reflect` when:
- They complete a feature or meaningful work unit
- They make corrections you should remember for future sessions
- They explicitly say "remember this" or similar
- Context is about to compact and queue has items
## Correction Detection Patterns
High-confidence corrections:
- Tool rejections (user stops an action with guidance)
- "no, use X" / "don't use Y"
- "actually..." / "I meant..."
- "use X not Y" / "X instead of Y"
- "remember:" (explicit marker)FAQ
Does it edit CLAUDE.md automatically?
No. Hooks only fill a queue; writing happens after /reflect and your approval.
Does it understand non-English corrections?
The README says the model understands corrections in any language during processing.
Related
A CLI for every Google Workspace API with JSON output and agent skills: Drive, Gmail, Calendar, Sheets and more
Local search over Markdown notes, docs and meeting transcripts: keywords, semantic search and reranking, with an MCP server
A task manager for AI-driven development: breaks a PRD into dependent tasks and guides the agent through them via MCP or CLI
Anthropic's official plugins for knowledge work roles: sales, support, product, marketing, legal, finance, data and enterprise search