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.
Review-first install path
This asset needs a review step. The copied prompt tells the agent to dry-run, show the writes, then proceed only after confirmation.
npx -y tokrepo@latest install 47d7c959-8340-4390-a163-39cf2e41f7b3 --target codexDry-run first, confirm the writes, then run this command.
What it is
Claude Reflect is a Claude Code plugin that captures corrections and preferences you make during development sessions. When you fix something Claude got wrong or express a preference for a certain approach, Claude Reflect records that learning and syncs it to your project's CLAUDE.md file. This means Claude remembers your preferences across sessions without you repeating yourself.
Claude Reflect is designed for developers who use Claude Code regularly and want to reduce repeated corrections over time.
How it saves time or tokens
Every time you correct Claude Code and it forgets by the next session, you spend tokens re-explaining the same preference. Claude Reflect breaks that cycle by persisting corrections as structured learnings. Over weeks of use, the accumulated learnings in CLAUDE.md mean Claude starts each session already knowing your coding style, architectural preferences, and project conventions. This reduces back-and-forth corrections and the token cost of re-explaining context.
How to use
- Install the plugin via Claude Code:
claude plugin marketplace add bayramannakov/claude-reflect
claude plugin install claude-reflect@claude-reflect-marketplace
- Restart Claude Code to activate the hooks.
- Use Claude Code normally. When you correct Claude or express a preference, Claude Reflect captures it automatically.
- Review accumulated learnings by checking your CLAUDE.md file. Edit or remove any learnings that are no longer relevant.
Example
After a few sessions, your CLAUDE.md might accumulate learnings like:
Learnings from Claude Reflect
- Always use single quotes for TypeScript string literals in this project
- Prefer named exports over default exports
- Use pnpm, not npm, for package management
- API error responses should use the ErrorResponse type from src/types.ts
- Never use console.log in production code; use the logger from src/lib/logger.ts
These learnings are automatically referenced by Claude Code at the start of each session, reducing corrections from the first interaction.
Related on TokRepo
- AI memory tools — Explore tools that give AI agents persistent memory
- Coding tools — Browse developer productivity tools for AI-assisted coding
Common pitfalls
- Not reviewing accumulated learnings periodically. Over time, some learnings become outdated or contradictory. Review your CLAUDE.md monthly and prune stale entries.
- Installing the plugin but not restarting Claude Code. The hooks only activate after a restart, so corrections made before restarting are not captured.
- Expecting immediate perfection. Claude Reflect improves over time as it accumulates more learnings. The first few sessions will still require corrections as usual.
Frequently Asked Questions
Claude Reflect writes learnings to your project's CLAUDE.md file, which Claude Code reads at the start of each session. The learnings are stored as structured markdown entries that Claude can reference during conversations.
Yes. The learnings are stored in plain markdown in CLAUDE.md. You can open the file and edit, reorder, or delete any entry. Claude Reflect will not overwrite your manual edits.
Yes. Since learnings are stored in CLAUDE.md, they can be committed to version control and shared with your team. This means the entire team benefits from accumulated project-specific preferences.
There is no hard limit, but CLAUDE.md is read as context by Claude Code, so very large files consume context window tokens. Keep learnings concise and prune outdated entries to maintain efficiency.
Claude Reflect is specifically built as a Claude Code plugin. It uses Claude Code's plugin hooks to capture corrections. Other AI coding tools would need their own similar mechanism.
Citations (3)
- Claude Reflect GitHub— Claude Reflect is a Claude Code plugin for self-learning
- Anthropic Claude Code Documentation— CLAUDE.md is Claude Code's project context file
- Claude Code Plugins— Claude Code plugin marketplace for extensions
Related on TokRepo
Source & Thanks
Created by Bayram Annakov. Licensed under MIT.
claude-reflect — ⭐ 870+
Thank you to Bayram Annakov for making Claude Code learn from its mistakes.
Discussion
Related Assets
Awesome Claude Code — Chinese Learning Hub (2026)
Awesome Claude Code is a Chinese learning hub for Claude Code: it links installation, pricing, workflows, subagents, MCP tools, and real project examples.
Claude Forge — Plugin Framework for Claude Code
Supercharge Claude Code with 11 AI agents, 36 commands, and 15 skills. The oh-my-zsh-inspired plugin framework with 6-layer security hooks. 5-minute install. 640+ GitHub stars.
Claude Code CLAUDE.md — Best Practices Template
Production-tested CLAUDE.md template for Claude Code projects. Covers coding conventions, test requirements, git workflow, and project-specific AI instructions.
Claude Code Hooks — Automate Pre/Post Task Actions
Complete guide to Claude Code hooks for automating actions before and after tool calls. Set up linting, testing, notifications, and custom validation with shell commands.