mine-learnings
Skill4 starsChanged 9 days agoMITView on GitHub
Mine project history (commits, docs, logs) for durable learnings and write them to LEARNINGS.md and CLAUDE.md, idempotently. Use when the user asks to "extract learnings", "mine learnings from history" or "update CLAUDE.md from project history".
- Commits and pushes
In this repository15 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- cavemanSkill
- gh-issues-by-severitySkill
- grid-helpSkill
- grill-meSkill
- growth-psychSkill
- handoffSkill
- openspec-helpSkill
- rubber-duckSkill
- setup-repo-skillsSkill
- skill-scoutSkill
- spec-scoutSkill
- standupSkill
- tightenSkill
- un-claudishSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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 20
Read the hash ledger: If LEARNINGS.md exists, parse its hidden ledger comments (see sections/learnings-format.md) for both accepted hashes …
- Very specific: line 28
Extract candidates: Look for: Signals to look for: sections/extraction-signals.md.
- Distinctive: line 65
Every run rescans full history — there's no watermark file to go stale or drift from reality — but nothing is ever duplicated: a …
- Very specific: line 73
If a repo has no docs/logs beyond git history, mine commits alone — don't treat a missing LOGS//docs/ as an error.
- Very specific: line 75
If LEARNINGS.md would grow past a few hundred lines, suggest splitting by category or year to the user — don't do this unprompted.
- Distinctive: line 81
Read a section only when its condition applies.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
mine-learnings
Turn project history into durable, reusable knowledge: a LEARNINGS.md file
of dated entries, with the highest-value ones folded as short rules into
CLAUDE.md. Idempotent — safe to run repeatedly; only genuinely new material
produces new entries.
Process
- Locate repo root and existing files.
git rev-parse --show-toplevel, then check for an existingCLAUDE.mdandLEARNINGS.mdat that root. IfLEARNINGS.mddoesn't exist, it will be created in step 6 — don't create an empty stub up front. - Read the hash ledger. If
LEARNINGS.mdexists, parse its hidden ledger comments (seesections/learnings-format.md) for both accepted hashes (entries already written) and rejected hashes (candidates the user declined on a previous run). Both sets are things to never re-propose. - Gather history sources:
Sources and caps:
sections/history-sources.md. Extract candidates. Look for: Signals to look for:
sections/extraction-signals.md.For each candidate, compute a content hash of the normalized learning text. Drop any candidate whose hash is already in the accepted or rejected ledger before it goes any further — this is what makes reruns idempotent.
- Confirm with the user before writing anything. Present the remaining
new candidates via
AskUserQuestion, batched a few at a time (approve / edit / reject each). Never write a candidate straight to disk without this step —CLAUDE.mdandLEARNINGS.mdare checked-in files the user reads and re-reads; unwanted entries are expensive to notice and remove. - Write approved entries to
LEARNINGS.md— dated section, category, source reference (commit SHA or file path), the learning itself (what happened, why it matters, how to apply it), and its content hash so future runs recognize it. Create the file with a short header if it doesn't exist yet. Fold only the most durable/actionable approved learnings into
CLAUDE.mdas short rules, each pointing back to itsLEARNINGS.mdentry (e.g.- Never do X — see LEARNINGS.md#short-title.). Leave situational entries only inLEARNINGS.md.Model-routing learnings:
sections/model-routing.md. Procedural: tankevolvemay draft a skill (never auto-wired).- Record rejected candidates' hashes in
LEARNINGS.md's rejected ledger so they aren't re-proposed on the next run. - Report a short summary: N new entries written, M folded into
CLAUDE.md, K rejected, L already-seen (no-op, skipped before the user ever saw them).
Idempotency contract
Every run rescans full history — there's no watermark file to go stale or drift from reality — but nothing is ever duplicated: a candidate's hash being present in either ledger short-circuits it before it reaches the user. Running the skill twice with no new history in between must report "0 new candidates" and touch neither file.
Notes
- If a repo has no docs/logs beyond git history, mine commits alone — don't
treat a missing
LOGS//docs/as an error. - If
LEARNINGS.mdwould grow past a few hundred lines, suggest splitting by category or year to the user — don't do this unprompted. - This skill never runs
git push; writing local files is as far as it goes. Committing/pushing the result is a separate, explicit step.
Sections
Read a section only when its condition applies; do not preload them.
- sections/history-sources.md: read at step 3
- sections/extraction-signals.md: read at step 4
- sections/model-routing.md: read at step 7 for model-choice learnings
- sections/learnings-format.md: read at steps 2, 6 and 8
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.

