# Claude Reflect — Self-Learning for Claude Code > 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. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use 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. --- ## Quick Use 1. Install the plugin: ``` claude plugin marketplace add bayramannakov/claude-reflect claude plugin install claude-reflect@claude-reflect-marketplace ``` 2. Restart Claude Code to activate the hooks. 3. Use Claude normally — corrections are captured automatically. 4. Run `/reflect` to review and approve what gets learned. --- ## Intro Claude Reflect is an open-source Claude Code plugin that lets Claude learn from your corrections and discover workflow patterns. With 870+ GitHub stars and an MIT license, it automatically detects when you correct Claude ("no, use X instead"), queues the correction for review, and syncs approved ones to `CLAUDE.md` — so Claude remembers your preferences across sessions. It also analyzes past sessions to identify recurring tasks and suggest reusable commands. Best for heavy Claude Code users who want the AI to remember corrections and adapt to their coding style. Supported platforms: Claude Code (macOS, Linux, Windows). Setup time: under 1 minute. --- ## How It Works ### Two-Phase Architecture **Phase 1: Automatic Capture (via hooks)** Monitors corrective phrases during sessions using a mix of regex matching and semantic AI verification — works in any language. **Phase 2: Review & Sync (via commands)** - `/reflect` — Review corrections; approved ones sync to CLAUDE.md - `/reflect-skills` — Analyze history to discover workflow patterns - `/reflect --dedupe` — Merge duplicate learnings - `/reflect --scan-history` — Recover corrections from past sessions ### Core Features - **Persistent memory**: syncs to CLAUDE.md at global, project, and skill levels - **Multi-language support**: semantic AI detector understands corrections in any language - **Dedup detection**: merge/replace/skip similar learnings - **Pattern discovery**: identify recurring tasks from usage history ### FAQ **Q: What is Claude Reflect?** A: A Claude Code plugin that captures your corrections and syncs them to CLAUDE.md so Claude remembers your preferences across sessions. **Q: Is it free?** A: MIT open source and free. --- ## Source & Thanks > Created by [Bayram Annakov](https://github.com/BayramAnnakov). Licensed under MIT. > > [claude-reflect](https://github.com/BayramAnnakov/claude-reflect) — ⭐ 870+ --- Source: https://tokrepo.com/en/workflows/claude-reflect-self-learning-claude-code-47d7c959 Author: Skill Factory