claude-reflect is a self-learning system for Claude Code that records corrections, positive feedback, preferences, and recurring workflows as persistent instructions or reusable skills. It helps Claude Code users retain lessons across sessions and improve repeated tasks, with catalogue add-ons providing its hooks, commands, instructions, plugin, and skill.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/bayramannakov/claude-reflect/reflectgit clone --depth 1 https://github.com/BayramAnnakov/claude-reflectWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/bayramannakov/claude-reflect/reflect)<a href="https://agentmods.dev/commands/bayramannakov/claude-reflect/reflect"><img src="https://agentmods.dev/badge/commands/bayramannakov/claude-reflect/reflect.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00015 | $0.13724 |
| Opus 5 | $0.00008 | $0.06862 |
| Sonnet 5 | $0.00003 | $0.02745 |
| Haiku 4.5 | $0.00002 | $0.01372 |
Grade B, and why
reflect scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
cat ~/.claude/learnings-queue.json | jq -r '.[] | "\(.timestamp) | conf:\(.confidence // 0.5) | decay:\(.decay_days // 90)d | \(.message | .[0:60])"' How it starts
The opening of the file, as written. The whole thing — 1,513 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Arguments
--dry-run: Preview all changes without prompting or writing.--scan-history: Scan ALL past sessions for corrections (useful for first-time setup or cold start).--days N: Limit history scan to last N days (default: 30). Only used with--scan-history.--targets: Show detected AI assistant config files and exit.--review: Show learnings with stale/decayed entries for review.--dedupe: Scan CLAUDE.md for similar entries and propose consolidations.--organize: Analyze memory hierarchy and suggest reorganization across tiers.--include-tool-errors: Include project-specific tool execution errors in scan (auto-enabled with--scan-history).--model MODEL: Model for semantic analysis (default:sonnet). Usehaikufor faster/cheaper runs oropusfor maximum accuracy.
Context
- Project CLAUDE.md: @CLAUDE.md
- Global CLAUDE.md: @~/.claude/CLAUDE.md
- Learnings queue (per-project): !
python3 "$(dirname "$(dirname "$(readlink -f "$0")")")/scripts/read_queue.py" 2>/dev/null || echo "[]" - Current project: !
pwd
Multi-Target Export
Claude-reflect syncs learnings to CLAUDE.md files (including subdirectories), skill files, and AGENTS.md.
Supported Targets:
| Target | File Path | Format | Notes |
|---|---|---|---|
| Global CLAUDE.md | ~/.claude/CLAUDE.md |
Markdown | Always enabled |
| Project CLAUDE.md | ./CLAUDE.md |
Markdown | If exists |
| CLAUDE.local.md | ./CLAUDE.local.md |
Markdown | Personal, gitignored |
| Subdirectory CLAUDE.md | ./**/CLAUDE.md |
Markdown | Auto-discovered |
| Project Rules | ./.claude/rules/*.md |
Markdown | Modular rules, optional path-scoping |
| User Rules | ~/.claude/rules/*.md |
Markdown | Global modular rules |
| Skill Files | ./commands/*.md |
Markdown | When correction relates to skill |
| Auto Memory | ~/.claude/projects/<project>/memory/*.md |
Markdown | Low-confidence, exploratory learnings |
| AGENTS.md | ./AGENTS.md |
Markdown | Industry standard (Codex, Cursor, Aider, Jules, Zed, Factory) |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 1,513 lines · 15 tokens per session scan B a7b585bba8e9
reflect is a command published in the GitHub repository BayramAnnakov/claude-reflect (1,427 stars, last pushed 5mo ago), licensed MIT. It adds 15 tokens to every session and 13,724 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
setup-context
Set up your Skill Memory — a pm-context.md every skill reads so outputs come back tailored to you.
brain
Set up or use your Professional Brain — init, ingest, recall, or review.
session-learn
Extract knowledge from the current session. Invoke with /session-learn or "extract this session".
memory-forget
Command "memory-forget" from waittim/MemoryCustodian, covering memory-forget and review the preview, then apply its plan id.
reflect
Capture learnings from the current conversation through guided reflection.
search
Search your second brain using semantic search.