Capture a correction or lesson as a persistent learning rule with category, mistake, and correction. Stores, categorises, and retrieves rules for future sessions. Use after mistakes or when the user says "remember this", "don't forget", "note this", or "learn from this".
git clone https://github.com/rohitg00/pro-workflow.git--- name: learn-rule description: Capture a correction or lesson as a persistent learning rule with category, mistake, and correction. Stores, categorises, and retrieves rules for future sessions. Use after mistakes or when the user says "remember this", "don't forget", "note this", or "learn from this". user-invocable: true --- # Learn Rule Capture a lesson from the current session into permanent memory. ## Trigger Use when the user says "remember this", "add to rules", "don't do that again", or after a mistake is identified. ## Workflow 1. Identify the lesson — what mistake was made? What should happen instead? 2. Format the rule with full context. 3. Propose the addition and wait for user approval. 4. After approval, persist to LEARNED section or project memory. ## Format ``` [LEARN] Category: One-line rule Mistake: What went wrong Correction: How it was fixed ``` ### Wiki-scoped rules Append `Wiki: <slug>` to bind the rule to a single pro-workflow wiki. The rule loads only when that wiki is in scope, avoiding cross-project pollution: ``` [LEARN] Editing: Cite a sources.md row before adding any wiki claim. Wiki: agent-memory ``` The capture hook auto-detects `Wiki: <slug>` and links the learning to that wiki via `learnings_wiki`. ## Categories | Category | Examples | |----------|---------| | Navigation | File paths, finding code, wrong file edited | | Editing | Code changes, patterns, wrong approach | | Testing | Test approaches, coverage gaps, flaky tests | | Git | Commits, branches, merge issues | | Quality | Lint, types, style violations | | Context | When to clarify, missing requirements | | Architecture | Design decisions, wrong abstractions | | Performance | Optimization, O(n^2) loops, memory | ## 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) ``` ## Guardrails - Always wait for user approval before persisting. - Keep rules to one line — specific and actionable. - Bad: "Write good code". Good: "Always use snake_case for database columns". - Include the mistake context so the rule makes sense later. ## Output - The proposed `[LEARN]` rule with category - Confirmation after persisting
[{"step":"Identify the context of the correction. When you make a mistake or receive feedback, note the category (e.g., 'grammar', 'time management', 'data analysis') to help the AI retrieve the rule later.","tip":"Use specific categories like 'Python debugging' or 'client email tone' instead of vague ones like 'mistakes'."},{"step":"Describe the mistake and correction clearly. Include examples if possible, such as: 'Mistake: Using \"affect\" instead of \"effect\" in \"The change will have a positive affect on sales.\" Correction: Use \"effect\" as a noun (result) and \"affect\" as a verb (to influence). Correct sentence: \"The change will have a positive effect on sales.\"'","tip":"The more precise your description, the better the AI can apply the rule in future sessions."},{"step":"Store the rule by saying 'remember this', 'learn from this', or 'don’t forget'. The AI will confirm the rule has been saved and categorised.","tip":"You can review all stored rules later by asking, 'Show me my learning rules.'"},{"step":"Retrieve the rule in future sessions by making a similar mistake or asking the AI to recall it. For example, 'Remind me of the grammar rule about \"affect\" vs. \"effect\".'","tip":"The AI will proactively suggest corrections if it detects a pattern matching a stored rule."},{"step":"Refine or update rules over time. If a rule no longer applies, say 'Update my learning rule for [category]: [new correction].'","tip":"Regularly review your rules to ensure they stay relevant to your current workflows."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/rohitg00/pro-workflow/tree/main/skills/learn-ruleCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Capture this correction as a persistent learning rule: Category: [CATEGORY, e.g., 'grammar', 'coding', 'meeting etiquette'] Mistake: [DESCRIBE THE MISTAKE OR ISSUE] Correction: [WHAT SHOULD BE DONE INSTEAD] Example: Category: 'grammar', Mistake: 'Using "your" instead of "you're" in "Your going to the meeting?"', Correction: 'Use "you're" (contraction of "you are") instead of "your" (possessive form). Correct sentence: "You're going to the meeting?"'
Here’s the learning rule I’ve captured for you: **Category:** Meeting Etiquette **Mistake:** Interrupting a speaker before they finish their point, e.g., jumping in with "But what about X?" while the presenter is still explaining Y. **Correction:** Wait for a natural pause or explicit invitation to speak. Use phrases like "I’d love to add to that" or "Could I share a thought?" to signal your intent politely. If you’re unsure, jot down your point and revisit it later in the discussion. This rule has been stored in your persistent learning rules. Next time you’re in a meeting, I’ll remind you of this if you start to interrupt. Would you like to add any additional context or examples to this rule?
skills-collection
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan