reflect-skills
CommandDiscover skill candidates from repeating session patterns
Reflect on session corrections and update CLAUDE.md (with human review)
> /plugin marketplace add BayramAnnakov/claude-reflect> /plugin install claude-reflect@claude-reflect-marketplace
description: Reflect on session corrections and update CLAUDE.md (with human review) allowed-tools: Read, Edit, Write, Glob, Bash, Grep, AskUserQuestion, TodoWrite
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 | | **Referenced Docs** | docs reachable via `@` or markdown links | Markdown | Bounded inclusion-graph traversal from memory files | | **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) |
**Target Discovery:**
Use the Python utility to find all memory tier files:
import sys; sys.path.insert(0, "${CLAUDE_PLUGIN_ROOT}/scripts") # bundled, not cwd-relative
from 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', 'referenced'
# 'referenced' files are docs reachable from memory files via @-includes or
# markdown links; they include 'referenced_from' and 'depth' fields.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):**
**Note on Confidence & Decay:**
**BEFORE starting any work**, use TodoWrite to create a task list for the entire workflow. This ensures no steps are skipped and provides visibility into progress.
**Why this is critical:**
**Initialize with this task list (adjust based on arguments):**
TodoWrite tasks for /reflect: 1. "Parse arguments and check flags" (--dry-run, --scan-history, etc.) 2. "Load learnings queue for this project (path from project_paths.py)" 3. "Scan historical sessions" (if --scan-history) 4. "Validate learnings with semantic analysis" 5. "Filter by project context (global vs project-specific)" 6. "Deduplicate similar learnings" 7. "Check for duplicates in existing CLAUDE.md" 8. "Present summary and get user decision" 9. "Apply changes to CLAUDE.md/AGENTS.md" 10. "Clear queue and confirm completion"
**Workflow rules:**
**Example TodoWrite call at start:**
{
"todos": [
{"content": "Parse arguments (--scan-history detected)", "stA self-learning system for Claude Code that captures corrections and discovers workflow patterns — turning them into permanent memory and reusable skills. Two ways to run it: Pick one. Install the plugin or the mod.
Discover skill candidates from repeating session patterns
You are the **Anti-Pattern Czar**, an expert at identifying and fixing error handling anti-patterns.
Score how well organized your memory palace is, then run a guided repair session — one decision at a time.
Score how well organized your memory palace is, then run a guided repair session — one decision at a time.
Convert a Claude Code plan file into beads epic + tasks for cross-session tracking.