@bayramannakov/claude-reflect
ASelf-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md. Use when discussing learnings, corrections, or when the user mentions remembering something for future sessions.
Install
agr install @bayramannakov/claude-reflect --target claudeWrites 8 files into .claude/skills/, pinned to git-7d035c84.
- .claude/skills/claude-reflect/.gitignore
- .claude/skills/claude-reflect/CHANGELOG.md
- .claude/skills/claude-reflect/CLAUDE.md
- .claude/skills/claude-reflect/DISTRIBUTION.md
- .claude/skills/claude-reflect/LICENSE
- .claude/skills/claude-reflect/README.md
- .claude/skills/claude-reflect/RELEASING.md
- .claude/skills/claude-reflect/SKILL.md
Document
name: claude-reflect description: Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md. Use when discussing learnings, corrections, or when the user mentions remembering something for future sessions.
Claude Reflect - Self-Learning System
A two-stage system that helps Claude Code learn from user corrections.
How It Works
Stage 1: Capture (Automatic)
Hooks detect correction patterns ("no, use X", "actually...", "use X not Y") and queue them to ~/.claude/learnings-queue.json.
Stage 2: Process (Manual)
User runs /reflect to review and apply queued learnings to CLAUDE.md files.
Available Commands
| Command | Purpose |
|---|---|
/reflect | Process queued learnings with human review |
/reflect --scan-history | Scan past sessions for missed learnings |
/reflect --dry-run | Preview changes without applying |
/reflect-skills | Discover skill candidates from repeating patterns |
/skip-reflect | Discard all queued learnings |
/view-queue | View pending learnings without processing |
When to Remind Users
Remind users about /reflect when:
- They complete a feature or meaningful work unit
- They make corrections you should remember for future sessions
- They explicitly say "remember this" or similar
- Context is about to compact and queue has items
Correction Detection Patterns
High-confidence corrections:
- Tool rejections (user stops an action with guidance)
- "no, use X" / "don't use Y"
- "actually..." / "I meant..."
- "use X not Y" / "X instead of Y"
- "remember:" (explicit marker)
Learning Destinations
~/.claude/CLAUDE.md- Global learnings (model names, general patterns)./CLAUDE.md- Project-specific learnings (conventions, tools, structure)./CLAUDE.local.md- Personal learnings (machine-specific, gitignored)./.claude/rules/*.md- Modular rules with optional path-scoping~/.claude/rules/*.md- Global modular rules~/.claude/projects/<project>/memory/*.md- Auto memory (low-confidence, exploratory)commands/*.md- Skill improvements (corrections during skill execution)
Example Interaction
User: no, use gpt-5.1 not gpt-5 for reasoning tasks
Claude: Got it, I'll use gpt-5.1 for reasoning tasks.
[Hook captures this correction to queue]
User: /reflect
Claude: Found 1 learning queued. "Use gpt-5.1 for reasoning tasks"
Scope: global
Apply to ~/.claude/CLAUDE.md? [y/n]
Trustgrade A
- passBody integrity
Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.
- passType matchnot applicable to this artifact type
Whether the artifact is really the kind of thing its metadata claims it is.
- passFreshness
How long since the source repository was last pushed to.
- passPrompt injection
Scans the artifact's own text for instructions aimed at your agent rather than at you.
- passLicense
Whether the source repository declares an SPDX license permissive enough to redistribute.
How the grade is calculated
Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:
- Aevery check passed
- Bone warning
- Ctwo warnings
- Dprompt injection or body integrity failed, or three warnings
- Fone of those failed, and something else is wrong
These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.
Versions
git-7d035c84ea962026-07-31