Command
/learn-rule
Capture a lesson from this session into permanent memory.
One command from pro-workflow.
shell
$ npx -y skills add rohitg00/pro-workflow --agent claude-codeShips with pro-workflow. Installing the plugin gets this command.
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/learn-rule
Context preview
What this command does when you run it.
Capture a lesson from this session into permanent memory.
Stats
Stars2,638
Forks255
LanguageJavaScript
Command definition
learn-rule.md
# /learn-rule - Extract Correction to Memory Capture a lesson from this session into permanent memory. ## Process 1. **Identify the lesson** - What mistake was made? - What should happen instead? 2. **Format the rule** ``` [LEARN] Category: One-line rule ``` Categories: - Navigation (file paths, finding code) - Editing (code changes, patterns) - Testing (test approaches) - Git (commits, branches) - Quality (lint, types, style) - Context (when to clarify) - Architecture (design decisions) - Performance (optimization) - Claude-Code (sessions, modes, CLAUDE.md, skills, subagents, hooks, MCP) - Prompting (scope, constraints, acceptance criteria) 3. **Propose addition** Show what will be added to LEARNED section. 4. **Wait for approval** Only add after user confirms. ## Example ``` Recent mistake: Edited wrong utils.ts file [LEARN] Navigation: Confirm full path when multiple files share a name. Add to LEARNED section? (y/n)
