Learn from session corrections and update AI configuration files. USE WHEN user says 'reflect', 'learn from this', 'remember this', 'teach you', 'update skills', OR user wants to persist corrections, prevent repeated mistakes, OR mentions reflection or session learnings.
Analyzes session corrections and updates configuration files to prevent repeated mistakes. Automatically queues learnings when you say "reflect", "learn from this", or after being corrected multiple times.
/plugin marketplace add aryateja2106/reflect-skill/plugin install aryateja2106-reflect-skill@aryateja2106/reflect-skillThis skill inherits all available tools. When active, it can use any tool Claude has access to.
templates/LearningsSection.txttools/AutoReflect.shtools/CheckQueue.shtools/DetectTarget.shtools/GitSafeCommit.shtools/SafeAppend.shworkflows/Analyze.mdworkflows/Apply.mdworkflows/Auto.mdworkflows/Process.mdworkflows/Review.mdAnalyzes sessions for corrections and updates configuration files to prevent repeated mistakes.
When executing a workflow, output this notification:
Running the **WorkflowName** workflow from the **Reflect** skill...
| Workflow | Trigger | File |
|---|---|---|
| Analyze | /reflect, /reflect analyze | workflows/Analyze.md |
| Review | After Analyze completes | workflows/Review.md |
| Apply | After Review approval | workflows/Apply.md |
| Auto | Session end (Stop hook), /reflect auto | workflows/Auto.md |
| Process | /reflect process, after CheckQueue notification | workflows/Process.md |
Example 1: Manual reflection after work session
User: "/reflect"
→ Invokes Analyze workflow
→ Scans conversation for corrections ("Don't do X", "Use Y instead")
→ Presents Review UI with detected learnings
→ User selects which to apply and chooses scope (Project/Global)
→ Safely appends to target files
→ Commits changes with timestamped message
Example 2: Teach AI a new rule
User: "Remember: always use bun instead of npm in this project"
→ Invokes Analyze workflow (detects explicit instruction)
→ Shows: "Detected 1 learning: Use bun instead of npm"
→ User confirms, selects Project scope
→ Appends to CLAUDE.md
Example 3: After being corrected multiple times
User: "/reflect" (after correcting Claude on inline CSS 3 times)
→ Detects: "Don't use inline styles" (HIGH priority - repeated)
→ Shows preview of changes to CLAUDE.md
→ User approves
→ Creates constraint: "Never use inline CSS; use Tailwind"
Detects and updates (in priority order):
./CLAUDE.md./.cursorrules./.github/copilot-instructions.md./AGENTS.mdUpdates skill files:
~/.claude/Skills/{SkillName}/SKILL.mdThe skill uses these shell tools located in tools/:
| Tool | Purpose |
|---|---|
DetectTarget.sh | Find project/global config files |
SafeAppend.sh | Safely append to markdown files |
GitSafeCommit.sh | Isolated git commits |
AutoReflect.sh | Session-end scanner (Stop hook) |
CheckQueue.sh | SessionStart notification |
~/.claude/Scratchpad/reflect-queue.mdStop Hook (Auto-queue):
# Run at session end to queue corrections
# Use ${CLAUDE_PLUGIN_ROOT} for plugin installations, or ~/.claude/Skills/reflect/tools/ for manual install
${CLAUDE_PLUGIN_ROOT}/skills/reflect/tools/AutoReflect.sh "$SESSION_ID"
SessionStart Hook (Notification):
# Check for pending reflections on session start
${CLAUDE_PLUGIN_ROOT}/skills/reflect/tools/CheckQueue.sh
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.