askill
learn-rule

learn-ruleSafety 95Repository

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".

1.1k stars
23k downloads
Updated 2/26/2026

Package Files

Loading files...
SKILL.md

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

Categories

CategoryExamples
NavigationFile paths, finding code, wrong file edited
EditingCode changes, patterns, wrong approach
TestingTest approaches, coverage gaps, flaky tests
GitCommits, branches, merge issues
QualityLint, types, style violations
ContextWhen to clarify, missing requirements
ArchitectureDesign decisions, wrong abstractions
PerformanceOptimization, 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

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

90/100Analyzed 3/1/2026

Well-structured skill for capturing persistent learning rules with clear trigger conditions, step-by-step workflow, format templates, category taxonomy, and practical examples. Includes useful guardrails about approval and specificity. Located in dedicated skills folder with appropriate tags. Highly actionable and reusable across projects.

95
90
85
90
90

Metadata

Licenseunknown
Version-
Updated2/26/2026
Publisherrohitg00

Tags

databasegithub-actionslintingtesting