consolidate-learning
Skill1 starsChanged 5 months agoApache-2.0View on GitHub
Audits "Learned from runs" sections across .claude/skills/ — promotes durable lessons into the main SKILL.md body, prunes stale or already-covered entries. Use this whenever the user types /consolidate-learning, /housekeep flags a skill with a bloated learned section, the user asks to clean up skill learnings, says "this skill is getting cluttered," or a monthly cadence cycle hits. Conservative — proposes diffs for user approval before applying.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Look for a ## Learned from runs (or similar) section.
- Very specific: line 68
Don't promote lessons that are really feedback (corrections from the user) — those belong in memory/feedback.md instead.
- Very specific: line 69
Don't promote tool gotchas — those go in memory/learnings.md.
- Distinctive: line 70
If a lesson reveals a missing rule in CLAUDE.md, propose adding the rule there separately.
- Very specific: line 71
If a skill has zero entries to promote/merge/prune, say so cleanly: "<skill>: nothing to consolidate."
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
/consolidate-learning — Audit "Learned from runs" Sections
Promote durable lessons from skill "Learned from runs" sections into the main instructions. Prune entries that are stale or already covered upstream.
When to invoke
- A SKILL.md's "Learned from runs" section has >5 entries (surfaced by /housekeep).
- User typed
/consolidate-learning [skill-name]. - Monthly cadence (suggest at the end of /housekeep).
Steps
For each .claude/skills/*/SKILL.md (or the named skill):
1. Read the skill
Look for a ## Learned from runs (or similar) section. If absent, skip this skill.
2. Categorize each entry
For each lesson, decide:
- Promote: lesson is general guidance that applies every run → fold into the relevant section of the SKILL.md main body. Make sure the wording matches the rest of the doc. Then remove the entry from "Learned from runs".
- Merge: lesson is already implied or stated in the main body → remove the duplicate.
- Prune: lesson is stale (situation no longer applies, e.g., a tool was replaced) or one-off (specific to a single past run, no future relevance) → remove.
- Keep: lesson is not yet repeated enough to promote, still situational → leave in place.
3. Show the diff per skill
For each skill, show the user:
## <skill-name>
Promotions (N):
- "<lesson>" → into <section>
[diff preview]
Merges (M):
- "<lesson>" → already covered by <existing line>
Prunes (K):
- "<lesson>" → reason
Keeps (J): <list>4. Apply with confirmation
User approves per skill. Apply edits. Update the SKILL.md's *Updated:* line if present.
5. Commit
Per skill:
<skill>: consolidate-learning — N promotions, M merges, K prunesNotes
- Conservative defaults: when in doubt, keep. Promotion bar is "applies every run, not just one situation."
- Don't promote lessons that are really feedback (corrections from the user) — those belong in
memory/feedback.mdinstead. - Don't promote tool gotchas — those go in
memory/learnings.md. - If a lesson reveals a missing rule in
CLAUDE.md, propose adding the rule there separately. - If a skill has zero entries to promote/merge/prune, say so cleanly: "
<skill>: nothing to consolidate."
Learned from runs
(empty — populated as the skill is used)
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.

