A Claude Code plugin that captures corrections and preferences during development, then syncs learnings to CLAUDE.md automatically. Makes Claude remember across sessions. 870+ stars.
TO
TokRepo精选 · Community
Quick Use
Use it first, then decide how deep to go
This block should tell both the user and the agent what to copy, install, and apply first.
1. Install the plugin via Claude Code:
```
claude plugin marketplace add bayramannakov/claude-reflect
claude plugin install claude-reflect@claude-reflect-marketplace
```
2. Restart Claude Code to activate hooks.
3. Use normally — corrections are captured automatically.
4. Run `/reflect` to review and approve captured learnings.
5. Run `/reflect-skills` to discover workflow patterns.
---
Intro
Claude Reflect is an open-source Claude Code plugin that makes Claude learn from your corrections and discover your workflow patterns. With 870+ GitHub stars and MIT license, it automatically detects when you correct Claude ("no, use X instead"), queues the correction for review, and syncs approved learnings to `CLAUDE.md` — so Claude remembers your preferences across sessions. It also analyzes session history to identify repeating tasks and suggests reusable commands. Think of it as a persistent memory layer that gets smarter the more you use Claude Code.
Best for: Claude Code power users who want their AI to remember corrections and adapt to their coding style.
Works with: Claude Code (macOS, Linux, Windows).
Setup time: under 1 minute.
---
## Claude Reflect — How It Works
### Two-Stage Architecture
**Stage 1: Automatic Capture (via Hooks)**
Claude Reflect installs hooks that monitor your Claude Code sessions in real-time. When you make a correction — phrases like "no, use X instead", "actually, do Y", "don't do that" — the system detects it using a combination of:
- **Regex patterns** — Fast, real-time detection of common correction phrases
- **Semantic AI validation** — Accurate interpretation across any language
Corrections are queued silently without interrupting your workflow.
**Stage 2: Review & Sync (via Commands)**
| Command | Purpose |
|---------|---------|
| `/reflect` | Review queued corrections, approve/reject, sync to CLAUDE.md |
| `/reflect-skills` | Analyze session history for repeating patterns |
| `/reflect --dedupe` | Consolidate duplicate or similar learnings |
| `/reflect --scan-history` | Recover corrections from past sessions |
### Key Features
#### Permanent Memory
Approved corrections sync to `CLAUDE.md` at three levels:
- **Global** (`~/.claude/CLAUDE.md`) — Applies to all projects
- **Project** (`.claude/CLAUDE.md`) — Project-specific preferences
- **Skills** (`.claude/skills/`) — Domain-specific knowledge
#### Multi-Language Support
The semantic AI detector understands corrections in any language — English, Chinese, Japanese, etc. No configuration needed.
#### Duplicate Detection
When a new correction is similar to an existing one, Claude Reflect offers to:
- **Merge** — Combine related learnings
- **Replace** — Update with newer preference
- **Skip** — Keep existing, discard new
#### Workflow Pattern Discovery
`/reflect-skills` uses AI reasoning to find semantic similarities across different phrasings in your session history. It suggests new reusable commands and skill files based on your actual usage patterns.
### Example Workflow
```
You: Fix the login bug
Claude: [uses console.log for debugging]
You: No, always use the logger module, not console.log
→ Claude Reflect captures: "User prefers logger module over console.log"
→ You run /reflect, approve it
→ Added to CLAUDE.md: "Always use the logger module for debugging, never console.log"
→ Claude remembers this in all future sessions
```
### Requirements
- Claude Code
- Python 3.6+
- macOS, Linux, or Windows
### FAQ
**Q: What is Claude Reflect?**
A: A Claude Code plugin that captures your corrections during development and syncs them to CLAUDE.md, making Claude remember your preferences across sessions and projects.
**Q: Is Claude Reflect free?**
A: Yes, fully open-source under MIT license.
**Q: Does it slow down Claude Code?**
A: No. Corrections are captured asynchronously via lightweight hooks. The AI validation only runs when you invoke `/reflect`.
---
🙏
Source & Thanks
> Created by [Bayram Annakov](https://github.com/BayramAnnakov). Licensed under MIT.
>
> [claude-reflect](https://github.com/BayramAnnakov/claude-reflect) — ⭐ 870+
Thank you to Bayram Annakov for making Claude Code learn from its mistakes.
Discussion
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.