Oct 30, 2026

Your Corrections Become Claude Code's Permanent Memory

claude-reflect watches for the corrections you make, reviews them with you, and writes durable rules into CLAUDE.md — then mines your session history for commands worth creating.

#tutorial#claude-code#context-engineering#workflow

Every developer corrects their coding agent dozens of times a week — "no, use pnpm", "run tests first" — and most of those corrections evaporate when the session ends. BayramAnnakov/claude-reflect, a 2k-star MIT plugin at v3.3.1, captures them instead: a hook queues the corrections it detects, you review each once, and the lesson lands permanently in CLAUDE.md.

Why This Skill Matters

CLAUDE.md memory usually depends on you remembering to edit it. claude-reflect closes that gap with a two-stage process. Stage one is automatic: a capture hook runs on every prompt and detects correction patterns like "no, use X" or "don't use Y", plus positive feedback and an explicit remember: marker with the highest confidence. Stage two is manual: you run /reflect, an AI-powered semantic filter validates the queue in any language, and nothing reaches your config without your approval.

The same loop works in reverse for habits you did not notice you had. The /reflect-skills command analyzes your session history, finds repeating task patterns, and drafts new slash commands from them.

Installation

# Add the marketplace
claude plugin marketplace add bayramannakov/claude-reflect

# Install the plugin
claude plugin install claude-reflect@claude-reflect-marketplace

# IMPORTANT: Restart Claude Code to activate the plugin

After restarting, hooks auto-configure and the commands are ready. Prerequisites are modest: Claude Code and Python 3.6 or newer. macOS, Linux, and Windows are all supported — Windows runs natively, no WSL required.

A second, newer install path exists: the reflect-mod variant (new in 3.3) checks each short prompt with a one-shot model as you type and surfaces rules in a band above the prompt for immediate save. It needs Claude Code 2.1.286 or newer with mods enabled. Install either the plugin or the mod, never both — with both, every correction gets captured twice.

Real Workflow: Stop Repeating Your Corrections

  1. Install the plugin and restart Claude Code.

  2. Work as usual. When Claude gets something wrong, correct it the way you naturally would:

记住:Python 项目一律使用 venv,不要用全局 pip

The capture hook queues it. Nothing is written yet.

  1. After a commit (the hook will remind you), review the queue:
/reflect

You get a summary table where each learning can be applied, edited before applying, or skipped. Approved learnings sync to ~/.claude/CLAUDE.md globally, to project CLAUDE.md files, to AGENTS.md if one exists — which is how Codex, Cursor, Aider, Jules, Zed, and Factory pick up the same rules — and into .claude/commands/*.md when the correction concerns a skill.

  1. Check where your rules landed anytime:
/reflect --targets

Real Workflow: Discover the Command You Keep Typing

The README's worked example: across 68 sessions you asked for a productivity review in four different phrasings. /reflect-skills groups them by intent and proposes /daily-review with the evidence — 15 similar requests — plus the corrections learned along the way ("use local timezone", "chat apps can be work"). Approve, and it writes a draft skill file into .claude/commands/ with context, steps, and guardrails.

Run it with a window and a dry run first:

/reflect-skills --days 30 --dry-run

By default it analyzes the last 14 days of the current project; --all-projects sweeps everything at the cost of a slower scan.

Tips

  • Use the explicit marker for rules that must not be lost: remember: always use venv for Python projects — the README gives it the highest confidence.
  • First run on a new machine? /reflect --scan-history --days 90 recovers learnings from sessions that predate the install.
  • CLAUDE.md collects near-duplicates over time; /reflect --dedupe finds semantically similar entries and proposes consolidated versions.
  • Model names and general patterns belong in global memory; project-specific conventions stay in the project CLAUDE.md — /reflect-skills asks you where each new skill should go.
  • Claude Code deletes local sessions after 30 days by default. Since scan-history and skill discovery read that history, the README suggests extending cleanupPeriodDays in ~/.claude/settings.json (the example sets 99999).

When Not to Use This

If you run the reflect-mod variant, every checked prompt is a small model call billed to your own Claude account, and it needs Claude Code 2.1.286 or newer — the Python plugin avoids both. The README keeps it as the choice for /reflect-skills, --scan-history, --dedupe, and --organize, and for Codex and Cursor users. And the queue review is deliberately manual: if you want corrections applied to your config without a human pass, this tool's approval step is the point, not an obstacle to disable.


See the leaderboard for more skills.