From claude-reflect
Reflect on session corrections and update CLAUDE.md (with human review)
How this command is triggered — by the user, by Claude, or both
Slash command
/claude-reflect:reflectFiles this command reads when invoked
This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
## 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). - `--all-projects`: **Global harvest.** Sweep session history across EVERY project, dedupe corrections cross-project, and surface the ones worth promoting to global `~/.claude/CLAUDE.md` (ranked by how many projects each recurred in). Implies `--scan-history`, forces `global` scope, only ever writes global. Composes with `--days` and `--dry-run`. - `--days N`: Limit history scan to last N days (default: 30 for `...
--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).--all-projects: Global harvest. Sweep session history across EVERY project, dedupe corrections cross-project, and surface the ones worth promoting to global ~/.claude/CLAUDE.md (ranked by how many projects each recurred in). Implies --scan-history, forces global scope, only ever writes global. Composes with --days and --dry-run.--days N: Limit history scan to last N days (default: 30 for --scan-history; 90 for --all-projects). Only used with history scans.--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). Use haiku for faster/cheaper runs or opus for maximum accuracy.python3 "${CLAUDE_PLUGIN_ROOT}/scripts/read_queue.py" 2>/dev/null || echo "[]"pwdClaude-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 | ./.claude/commands/*.md (project), ~/.claude/commands/*.md (user) | 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) |
Target Discovery:
Use the Python utility to find all memory tier files:
from scripts.lib.reflect_utils import find_claude_files
files = find_claude_files()
# Returns list of {path, relative_path, type, frontmatter}
# Types: 'global', 'root', 'local', 'subdirectory', 'rule', 'user-rule'
Or discover manually:
# Find all CLAUDE.md files (excluding node_modules, .git, venv, etc.)
find . -name "CLAUDE.md" -type f \
-not -path "*/node_modules/*" \
-not -path "*/.git/*" \
-not -path "*/venv/*" \
-not -path "*/.venv/*"
# Also check rule files and local
ls .claude/rules/*.md 2>/dev/null
ls CLAUDE.local.md 2>/dev/null
ls ~/.claude/rules/*.md 2>/dev/null
Target Selection (Hierarchy-Aware Routing):
.claude/rules/guardrails.md~/.claude/CLAUDE.md~/.claude/CLAUDE.mdpaths:) → that rule file./CLAUDE.local.md./CLAUDE.md or subdirectory fileNote on Confidence & Decay:
/reflect reviewOne rule governs every filtering decision in this workflow: surface, don't suppress. Capture is a wide recall net (ADR-0001); precision is your job here, in front of the user, never a silent drop. Concretely:
remember: items and queue items are never filtered out — the user already
chose to capture them.Later steps reference this principle rather than restating it.
Before starting, use TaskCreate to register the workflow phases so none is
skipped, and TaskUpdate each to in_progress/completed as you go (adjust
to the arguments passed):
--scan-history)Some flags short-circuit the normal workflow. If the user passed one, read the matching reference file, follow it, then exit without processing the queue:
| Flag | Reference file (read on demand) |
|---|---|
--targets | ${CLAUDE_PLUGIN_ROOT}/commands/reflect/targets.md |
--review | ${CLAUDE_PLUGIN_ROOT}/commands/reflect/review.md |
--dedupe | ${CLAUDE_PLUGIN_ROOT}/commands/reflect/dedupe.md |
--organize | ${CLAUDE_PLUGIN_ROOT}/commands/reflect/organize.md |
--scan-history does NOT exit early — it feeds the normal workflow (see Step 0.5).
--all-projects also does NOT exit early — it is a self-sufficient flag that
implies --scan-history and forces global scope. When present, read
${CLAUDE_PLUGIN_ROOT}/commands/reflect/all-projects.md and follow it instead of
the per-project Step 0.5 scan. --scan-history --all-projects is accepted and
identical to --all-projects alone.
Check if /reflect has been run in THIS project before. Run these commands separately:
WARNING: Do NOT combine these into a single compound command with $(...). Claude Code's bash executor mangles subshell syntax. Run each command individually and manually substitute the result.
ls ~/.claude/projects/ | grep -i "$(basename "$(pwd)")"
test -f ~/.claude/projects/PROJECT_FOLDER/.reflect-initialized && echo "initialized" || echo "first-run"
If user passed --all-projects, SKIP first-run detection entirely — go
straight to the global harvest (Step 0, --all-projects branch). The global sweep
is inherently a cold-start recovery path and must not be intercepted by a
per-project first-run offer.
If "first-run" for this project AND user did NOT pass --scan-history or --all-projects:
Use AskUserQuestion to recommend historical scan:
{
"questions": [{
"question": "First time running /reflect in this project. Scan past sessions for learnings?",
"header": "First run",
"multiSelect": false,
"options": [
{"label": "Yes, scan history (Recommended)", "description": "Find corrections from past sessions in this project"},
{"label": "No, just process queue", "description": "Only process learnings captured by hooks"}
]
}]
}
If user chooses "Yes, scan history", proceed as if --scan-history was passed.
If user passed --dry-run:
If user passed --scan-history:
If user passed --all-projects:
${CLAUDE_PLUGIN_ROOT}/commands/reflect/all-projects.md and follow it end
to end. It runs the cross-project sweep (pass-1 script), judges the shortlist
inline, writes only to global ~/.claude/CLAUDE.md, and lists project-specific
finds per project. --days and --dry-run compose as documented there.Only when --scan-history was passed (or the first-run offer was accepted): read
${CLAUDE_PLUGIN_ROOT}/commands/reflect/scan-history.md and follow it to scan
past sessions for missed corrections and tool-error patterns. It ADDS results to
the working list; continue to Step 3 with the combined list.
~/.claude/learnings-queue.json--scan-history will add itemsCapture is a wide recall net (ADR-0001): the queue over-captures on purpose,
so a real correction is never permanently dropped in an always-on hook where a
miss is unreviewable. Precision lives here, judged inline by you as you read
each item to present it — no subprocess, no claude -p, no separate pass. You
are already the smartest model in the loop; a second Claude judging what you're
about to show the user is redundant.
1.5a. For each queued item, judge whether it is a reusable learning.
Read item["message"] and decide, in one pass, in any language:
For kept items, write a concise, actionable extracted_learning (the clean
statement that would go into a memory file) and note its type
(correction / positive / explicit / guardrail).
1.5b. remember: items are ALWAYS kept — explicit user requests are never
dropped, regardless of your reusability judgment.
1.5c. Report what you dropped, so the user can catch a bad call:
═══════════════════════════════════════════════════════════
INLINE REVIEW — [N] queued items
═══════════════════════════════════════════════════════════
✓ [M] kept as learnings
✗ [K] dropped (no reusable signal)
Dropped:
- "Hello, how are you?" — greeting
- "perfect! now add the column" — one-off task instruction
═══════════════════════════════════════════════════════════
Scan auto memory for entries that may deserve "promotion" to CLAUDE.md, and route low-confidence items downward.
1.6a. Check auto memory for promotion candidates:
from scripts.lib.reflect_utils import read_auto_memory
auto_entries = read_auto_memory()
# Look for entries that have been validated by repeated use
If auto memory entries exist, scan for patterns that appear in multiple topic files or have been manually confirmed — these are candidates for promotion to CLAUDE.md.
1.6b. Route low-confidence queue items to auto memory:
For items with confidence 0.60-0.74 that you judged reusable inline (Step 1.5):
/reflect --organizeLearning: "Try using batch mode for large datasets" (confidence: 0.65)
→ Suggested destination: Auto Memory (model-preferences.md)
Reason: Low confidence — store in auto memory for now, promote later if confirmed
Use AskUserQuestion when routing to auto memory:
{
"questions": [{
"question": "Low-confidence learning — where should it go?",
"header": "Route",
"multiSelect": false,
"options": [
{"label": "Auto Memory (Recommended)", "description": "Store in auto memory for later promotion"},
{"label": "CLAUDE.md", "description": "Add to CLAUDE.md despite low confidence"},
{"label": "Skip", "description": "Don't store this learning"}
]
}]
}
Note: This step is for analyzing the CURRENT session only (when NOT using --scan-history).
If --scan-history was passed, skip to Step 3 with results from Step 0.5.
Analyze the current session for corrections missed by real-time hooks:
2a. Find current session file:
List session files for this project (most recent first):
ls -lt ~/.claude/projects/ | grep -i "$(basename $(pwd))"
Then list files in that folder and pick the most recent non-agent file:
ls -lt ~/.claude/projects/[PROJECT_FOLDER]/*.jsonl | head -5
Agent files (agent-*.jsonl) are sub-conversations; focus on main session files for current session analysis.
2b. Extract tool rejections (HIGH confidence corrections):
Search the current session file for toolUseResult fields containing "user said:" followed by feedback. These are high-confidence corrections.
2c. Extract user messages with correction patterns:
Search the current session file for user messages matching correction patterns. Use the same patterns from Step 0.5b. Remember:
isMeta: true entries (command expansions like /reflect itself)2d. Also reflect on conversation context:
2e. Judge reusability inline:
Judge corrections from 2b/2c the same way as Step 1.5 and Step 0.5d — inline, no subprocess — under surface, don't suppress:
2f. Add findings to working list: For each ACCEPTED learning:
Get current project path. For each queue item, compare item.project with current project:
CASE A: Same project
CASE B: Different project, looks GLOBAL (message contains: gpt-, claude-, model names, general patterns like "always/never")
CASE C: Different project, looks PROJECT-SPECIFIC (message contains: specific DB names, file paths, project-specific tools)
Heuristics:
gpt-[0-9] or claude- → GLOBAL (model name)always|never|don't + generic verb → GLOBAL (general rule)For each learning, reason about whether it relates to an active skill.
IMPORTANT: Use reasoning, not pattern matching.
Read the session context around the correction. Think:
/deploy, /commit) invoked before this correction?Example reasoning:
Learning: "always run tests before deploying"
Session context: User ran /deploy, then corrected me
My analysis: This correction happened right after /deploy was invoked.
The user wants the deploy skill to include running tests.
This should be offered as a skill improvement, not a CLAUDE.md entry.
For each skill-related learning, add metadata:
{
"skill_context": {
"skill_name": "deploy",
"skill_file": ".claude/commands/deploy.md",
"reason": "Correction followed /deploy invocation"
}
}
Detection approach:
/command patterns in recent session messages.claude/commands/[skill-name].md
(project) or ~/.claude/commands/[skill-name].md (user) — this is the single
source of truth shared with /reflect-skills. Prefer the project file if both exist.If skill context detected:
If NO skill context detected:
Before checking against CLAUDE.md, consolidate similar learnings within the current batch.
3.5a. Group by semantic similarity:
Analyze all learnings in the working list. Look for entries that:
Example - Before consolidation:
1. "Use gpt-5.1 for complex tasks"
2. "Prefer gpt-5.1 over gpt-5 for reasoning"
3. "gpt-5.1 is better for hard problems"
Example - After consolidation:
1. "Use gpt-5.1 for complex reasoning (replaces gpt-5)"
3.5b. Present consolidation proposals:
If similar learnings are detected, show:
═══════════════════════════════════════════════════════════
SIMILAR LEARNINGS DETECTED
═══════════════════════════════════════════════════════════
These 3 learnings appear related:
#2: "Use gpt-5.1 for complex tasks"
#5: "Prefer gpt-5.1 over gpt-5 for reasoning"
#7: "gpt-5.1 is better for hard problems"
Proposed consolidation:
→ "Use gpt-5.1 for complex reasoning tasks (replaces gpt-5)"
═══════════════════════════════════════════════════════════
3.5c. Use AskUserQuestion for consolidation:
{
"questions": [{
"question": "Consolidate these 3 similar learnings into one?",
"header": "Dedupe",
"multiSelect": false,
"options": [
{"label": "Yes, consolidate", "description": "Merge into: 'Use gpt-5.1 for complex reasoning tasks'"},
{"label": "Keep separate", "description": "Add all 3 as individual entries"},
{"label": "Edit consolidation", "description": "Let me modify the merged text"}
]
}]
}
3.5d. Consolidation rules:
3.5e. Skip if no duplicates:
For each learning kept after filtering, search ALL memory tiers:
# CLAUDE.md files
grep -n -i "keyword" ~/.claude/CLAUDE.md
grep -n -i "keyword" CLAUDE.md
grep -n -i "keyword" CLAUDE.local.md 2>/dev/null
# Rule files
grep -rn -i "keyword" .claude/rules/ 2>/dev/null
grep -rn -i "keyword" ~/.claude/rules/ 2>/dev/null
# Auto memory
grep -rn -i "keyword" ~/.claude/projects/PROJECT_FOLDER/memory/ 2>/dev/null
Or use the cross-tier deduplication utility:
from scripts.lib.reflect_utils import read_all_memory_entries
entries = read_all_memory_entries()
# Returns [{text, source_file, source_type, line_number}, ...]
# Search entries for semantic similarity to each learning
If duplicate found:
5a. Display condensed summary table:
Show all learnings in a compact table format:
════════════════════════════════════════════════════════════
LEARNINGS SUMMARY — [N] items found
════════════════════════════════════════════════════════════
┌────┬─────────────────────────────────────────┬──────────┬────────┐
│ # │ Learning │ Target │ Status │
├────┼─────────────────────────────────────────┼──────────┼────────┤
│ 1 │ Use DB for persistent storage │ project │ ✓ new │
│ 2 │ Backoff on actual errors only │ global │ ✓ new │
│ 3 │ Run tests before deploying │ /deploy │ ⚡skill │
│ ...│ ... │ ... │ ... │
└────┴─────────────────────────────────────────┴──────────┴────────┘
Destinations: [N] → Global, [M] → Project, [K] → Skills
Duplicates: [L] items will be merged with existing entries
5a.1. Skill-Related Learnings (if any detected):
If any learnings have skill_context metadata from Step 3.3, show them separately:
════════════════════════════════════════════════════════════
SKILL IMPROVEMENTS DETECTED
════════════════════════════════════════════════════════════
These learnings appear related to specific skills:
#3: "Run tests before deploying"
→ Relates to: /deploy (.claude/commands/deploy.md)
→ Reason: Correction followed /deploy invocation
#7: "Include file count in commit message"
→ Relates to: /commit (.claude/commands/commit.md)
→ Reason: Correction during commit workflow
════════════════════════════════════════════════════════════
5a.2. Skill Routing Question:
For each skill-related learning, use AskUserQuestion:
{
"questions": [{
"question": "Learning #3 relates to /deploy. Where should it go?",
"header": "Route",
"multiSelect": false,
"options": [
{"label": "Skill file (Recommended)", "description": "Add to .claude/commands/deploy.md to improve the skill"},
{"label": "CLAUDE.md", "description": "Add to project CLAUDE.md as general guidance"},
{"label": "Both", "description": "Add to skill file AND CLAUDE.md"},
{"label": "Skip", "description": "Don't add this learning anywhere"}
]
}]
}
Track routing decisions for Step 7.
5b. Use AskUserQuestion for strategy:
Use the AskUserQuestion tool:
{
"questions": [{
"question": "How would you like to process these [N] learnings?",
"header": "Action",
"multiSelect": false,
"options": [
{"label": "Apply all (Recommended)", "description": "Add [X] new entries, merge [K] duplicates with recommended scopes"},
{"label": "Select which to apply", "description": "Choose specific learnings from grouped lists"},
{"label": "Review details first", "description": "Show full details for each learning before deciding"},
{"label": "Skip all", "description": "Don't apply any learnings, clear the queue"}
]
}]
}
5c. Handle user selection:
Full learning card format (for "Review details first"):
════════════════════════════════════════════════════════════
LEARNING [N] of [TOTAL] — [source: queued/session-scan/tool-rejection]
════════════════════════════════════════════════════════════
Original message:
"[the user's original text]"
Proposed addition:
┌──────────────────────────────────────────────────────────┐
│ ## [Section Name] │
│ - [Exact bullet point that will be added] │
└──────────────────────────────────────────────────────────┘
Duplicate check:
✓ None found
OR
⚠️ SIMILAR in [global/project] CLAUDE.md:
Line [N]: "[existing content]"
════════════════════════════════════════════════════════════
Group learnings by destination and use AskUserQuestion with multiSelect.
Rules:
Example for GLOBAL learnings:
{
"questions": [
{
"question": "Select GLOBAL learnings to apply:",
"header": "Global",
"multiSelect": true,
"options": [
{"label": "#2 Backoff errors", "description": "Implement backoff only on actual errors, not artificial delays"},
{"label": "#3 DB cache", "description": "Use local database cache to minimize data fetching"},
{"label": "#4 Batch+delays", "description": "Use batching with stochastic delays for API rate limits"},
{"label": "#5 Use venv", "description": "Always use virtual environments for Python projects"}
]
}
]
}
If >4 global items: Add second question with header "Global+"
Example for PROJECT learnings:
{
"questions": [
{
"question": "Select PROJECT learnings to apply:",
"header": "Project",
"multiSelect": true,
"options": [
{"label": "#1 DB storage", "description": "Use database for persistent tracking data"},
{"label": "#6 DB ports", "description": "Assign unique ports per database instance"}
]
}
]
}
Selection rules:
6a. Show summary of changes:
════════════════════════════════════════════════════════════
SUMMARY: [N] changes ready to apply
════════════════════════════════════════════════════════════
Project CLAUDE.md ([path]):
Line [N]: UPDATE "[old]" → "[new]"
After line [N]: ADD "[new entry]"
Global CLAUDE.md (~/.claude/CLAUDE.md):
Line [N]: REPLACE "[old]" → "[new]"
After line [N]: ADD "[new entry]"
Skill Files:
.claude/commands/deploy.md: ADD "Run tests before build step"
.claude/commands/commit.md: ADD "Include file count in message"
Skipped: [N] learnings (including [M] from other projects)
════════════════════════════════════════════════════════════
6b. Use AskUserQuestion for confirmation:
{
"questions": [{
"question": "Apply [N] learnings to target files?",
"header": "Confirm",
"multiSelect": false,
"options": [
{"label": "Yes, apply all", "description": "[X] to Global, [Y] to Project, [Z] to Skills"},
{"label": "Go back", "description": "Return to selection to adjust"},
{"label": "Cancel", "description": "Don't apply anything, keep queue"}
]
}]
}
6c. Handle response:
Only after final confirmation:
7a. Apply to CLAUDE.md (Primary Targets):
7a.1. Apply to Rule Files (if any routed to rules):
For learnings routed to .claude/rules/*.md:
guardrails.md, model-preferences.md, coding-style.md, testing.md, etc.---
paths:
- "src/"
- "lib/"
---
~/.claude/rules/*.md (user-level rules), use the same approach7a.2. Apply to Auto Memory (if low-confidence or exploratory):
For learnings routed to auto memory (typically confidence 0.60-0.74):
suggest_auto_memory_topic() to determine filename:
from scripts.lib.reflect_utils import suggest_auto_memory_topic, get_auto_memory_path
topic = suggest_auto_memory_topic(learning_text) # e.g., "model-preferences"
memory_dir = get_auto_memory_path()
memory_dir.mkdir(parents=True, exist_ok=True){topic}.md) in markdown format:
# Model Preferences
- Use gpt-5.1 for reasoning tasks (confidence: 0.65, 2026-02-12)
/reflect --organize7b. Apply to Skill Files (if any routed to skills):
For learnings routed to skill files in Step 5a.2:
.claude/commands/deploy.md)Example skill file update:
## Steps
1. Run tests ← NEW (added from learning)
2. Build the project
3. Push to production
4. Notify Slack
## Guardrails
- Always verify tests pass before proceeding ← Could also go here
Important:
7c. Apply to AGENTS.md (if exists):
Check if AGENTS.md exists:
test -f AGENTS.md && echo "AGENTS.md found"
If AGENTS.md exists, apply the SAME learnings using this format:
## Claude-Reflect Learnings
<!-- Auto-generated by claude-reflect. Do not edit this section manually. -->
### Model Preferences
- Use gpt-5.1 for reasoning tasks
### Tool Usage
- Use local database cache to minimize API calls
<!-- End claude-reflect section -->
Update Strategy:
<!-- Auto-generated by claude-reflect marker<!-- End claude-reflect section -->)echo "[]" > ~/.claude/learnings-queue.json
════════════════════════════════════════════════════════════
DONE: Applied [N] learnings
════════════════════════════════════════════════════════════
✓ ~/.claude/CLAUDE.md [N] entries
✓ ./CLAUDE.md [N] entries
✓ AGENTS.md [N] entries (if exists)
⚡ .claude/commands/deploy.md [N] skill improvements
⚡ .claude/commands/commit.md [N] skill improvements
Skipped: [N]
════════════════════════════════════════════════════════════
Create marker file for THIS project so first-run detection won't trigger again. Use the PROJECT_FOLDER you found in First-Run Detection:
touch ~/.claude/projects/PROJECT_FOLDER/.reflect-initialized
Replace PROJECT_FOLDER with the actual folder name (e.g., -Users-bob-myproject).
(e.g., gpt-5.2 not gpt-5.1)Use these standard headers:
## LLM Model Recommendations — model names, versions## Tool Usage — MCP, APIs, which tool for what## Project Conventions — coding style, patterns## Guardrails — constraints and "don't do X" rules## Common Errors to Avoid — gotchas, mistakes## Environment Setup — venv, configs, pathsWhen routing learnings to .claude/rules/ files, use this mapping:
| Learning Type | Suggested Rule File | Create If Missing |
|---|---|---|
| Guardrails / "don't do X" | guardrails.md | Yes |
| Model preferences | model-preferences.md | Yes |
| Coding style / formatting | coding-style.md | Yes |
| Testing conventions | testing.md | Yes |
| Path-specific rules | {context}.md with paths: frontmatter | Ask user |
YAML Frontmatter for Path-Scoped Rules:
When a learning applies only to specific directories, create the rule file with frontmatter:
---
paths:
- "src/api/"
- "src/services/"
---
# API Conventions
- Always use async/await for API handlers
- Return proper HTTP status codes
Rules without paths: frontmatter apply globally within the project.
Learnings with type: "guardrail" are special corrections about unwanted behavior. These should be routed to the ## Guardrails section in CLAUDE.md.
Guardrail patterns detected by reflect_utils.py:
dont-unless-askedonly-what-askedstop-unrelateddont-over-engineerleave-aloneminimal-changesWhen presenting guardrail learnings:
═══════════════════════════════════════════════════════════
GUARDRAIL DETECTED — Constraint about unwanted behavior
═══════════════════════════════════════════════════════════
Original: "don't add docstrings unless I explicitly ask"
Pattern: dont-unless-asked (confidence: 0.90)
Proposed entry for ## Guardrails:
┌────────────────────────────────────────────────────────┐
│ - Don't add docstrings to code unless explicitly asked │
└────────────────────────────────────────────────────────┘
═══════════════════════════════════════════════════════════
Formatting guardrails:
## Guardrails section (create if doesn't exist)If CLAUDE.md exceeds 150 lines, warn:
Note: CLAUDE.md is [N] lines. Consider:
- /reflect --dedupe to consolidate similar entries
- /reflect --organize to redistribute across memory tiers
npx claudepluginhub caioniehues/claude-reflect/reflectReflects on completed tasks and session progress using Serena MCP analysis — validates adherence, captures insights, and optimizes workflows. Supports --type, --analyze, --validate flags.
/reflectReflects on session corrections and updates CLAUDE.md memory files across multiple targets (project, global, rules, skills). Supports dry-run, history scanning, deduplication, and reorganization.
/reflectAnalyzes diary entries for recurring patterns, synthesizes insights, and proposes updates to CLAUDE.md configuration.
/reflectAnalyzes Claude Code's instructions, commands, and config from chat history, then proposes and implements improvements to optimize performance and consistency.
/reflectAnalyzes conversation signals (corrections, problems, approvals) and extracts learnings to CLAUDE.md Skill Memories. Supports auto-reflection on session end via --on/--off.
/reflectGuides you through a structured reflection process to extract and record learnings from recent work — bug fixes, features, or debugging sessions. Also supports recording architectural decisions.