learn-rule
Skill9 starsChanged 3 months agoMITView on GitHub
Persist corrections and patterns to long-term memory. When a mistake is made or a rule is learned, write it to .claude/state/learnings.md so it's never repeated.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- rohitg00/pro-workflowtheir own version, first seen Sep 29, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- rohitg00/pro-workflow★ 2.9ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository109 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- agent/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- router/CLAUDE.mdCLAUDE.md
- .agents/skills/llms.txtllms.txt
- agent-harnessSkill
- auto-fixSkill
- brain-dumpSkill
- industrial-brutalist-uiSkill
- changelog-enforcerSkill
- checkpoint-strategySkill
- context-primeSkill
- cooldown-resumeSkill
- council-reviewSkill
- data-quality-auditSkill
- debug-tracerSkill
- dependency-auditSkill
- deslopSkill
- docs-syncSkill
- duplicate-threadSkill
- email-triageSkill
- fabric-patternsSkill
- feature-flagSkill
- git-hygieneSkill
- graphifySkill
- implementation-plannerSkill
- insightsSkill
- issue-resolverSkill
- local-ai-querySkill
- lr-schedule-advisorSkill
- minimalist-uiSkill
- modularity-reviewSkill
- full-output-enforcementSkill
- parallel-agentsSkill
- parallel-worktreesSkill
- prompt-librarySkill
- prompt-transparencySkill
- pro-workflowSkill
- redesign-existing-projectsSkill
- release-readinessSkill
- replay-learningsSkill
- repo-memory-updaterSkill
- repowise-intelligenceSkill
- researchSkill
- resource-panelSkill
- risky-module-reviewSkill
- sandboxed-execSkill
- scope-guardSkill
- self-improveSkill
- session-handoffSkill
- skill-composerSkill
- smart-commitSkill
- high-end-visual-designSkill
- stitch-design-tasteSkill
- system-prompt-auditSkill
- task-alive-updatesSkill
- task-scoperSkill
- design-taste-frontendSkill
- test-first-executorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Use this skill whenever:
- Distinctive: line 48
Create it if it doesn't exist.
- Distinctive: line 72
If the rule is general enough to apply to every future session:
- Distinctive: line 74
Add it to the "Coding Rules" section (numbered, concise)
- Very specific: line 75
Use repo-memory-updater skill if multiple rules need updating
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: learn-rule
When to Use
Use this skill whenever:
- The user corrects a mistake you made
- You discover a repo-specific rule that isn't in CLAUDE.md
- A pattern works unexpectedly (positively or negatively)
- You want to persist a decision for future sessions
This is how Claude gets smarter at this specific repo over time.
Instructions
Step 1 — Identify the rule
Extract the core rule from the correction or discovery. A good rule is:
- Specific — refers to a concrete situation
- Actionable — tells you what to do or not do
- Memorable — can be read in under 10 seconds
Bad rule: "Be careful with auth code."
Good rule: "Always call risky-module-review before touching admin_auth.py — even for 1-line changes."
Step 2 — Append to learnings file
File: .claude/state/learnings.md
Create it if it doesn't exist. Always append — never overwrite.
## YYYY-MM-DD — <short title>
**Situation:** What was being worked on when this was learned.
**Mistake/Discovery:** What went wrong or what was surprising.
**Rule:** <One clear, actionable sentence starting with a verb.>
**Source:** user-correction | self-discovery | docsExample entry:
## 2026-04-09 — Don't use git add -A
**Situation:** Committing the router refactor.
**Mistake:** Used `git add -A` which staged keys.json accidentally.
**Rule:** Always stage specific files by name; never use `git add -A` or `git add .`.
**Source:** user-correctionStep 3 — Check if CLAUDE.md should be updated
If the rule is general enough to apply to every future session:
- Read CLAUDE.md
- Add it to the "Coding Rules" section (numbered, concise)
- Use
repo-memory-updaterskill if multiple rules need updating
Learnings File Format
.claude/state/learnings.md:
# Session Learnings
Rules and corrections learned from working in this repo.
Read this at the start of sessions via the `replay-learnings` skill.
---
## YYYY-MM-DD — title
**Situation:** ...
**Mistake/Discovery:** ...
**Rule:** ...
**Source:** ...
---Acceptance Checks
- Rule is specific and actionable (not vague advice)
- Entry appended to
.claude/state/learnings.md - CLAUDE.md updated if rule is broadly applicable
- Rule phrased as an imperative: "Always X", "Never Y", "Before Z, do W"
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

