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
Discussion
Related Assets
sqlc — Generate Type-Safe Go Code from SQL
sqlc generates fully type-safe Go code from your SQL queries. Write SQL, run sqlc generate, and get Go functions with proper types for parameters and results — no ORM, no reflection, just compile-time safe database access.
MapStruct — Compile-Time Java Bean Mapping Code Generator
MapStruct is a Java annotation processor that generates type-safe, fast bean mapping code at compile time, eliminating reflection-based mapping overhead and catching errors before runtime.
Difftastic — Structural Diff Tool That Understands Syntax
A structural diff tool that compares files based on their syntax tree rather than line-by-line text, producing diffs that reflect actual code changes instead of incidental whitespace or formatting shifts.
Wire — Compile-Time Dependency Injection for Go
A code generation tool by Google that automates wiring of dependencies at compile time, eliminating reflection-based DI containers and runtime errors.