mine-history
Skill2 starsChanged 9 months agoMITView on GitHub
Extract and synthesize learnings from past Claude Code session transcripts into project documentation. Use when asked to "mine history", "extract learnings from past sessions", "what patterns keep recurring", or "improve docs from history".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ZoneMinder/zmNinjaNgtheir own version, first seen Jan 10, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- ZoneMinder/zmNinjaNg★ 110same 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 repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- analyze-depsSkill
- ask-expertSkill
- debriefSkill
- deep-interviewSkill
- pr-audit-anglesSkill
- pr-fix-anglesSkill
- trim-prSkill
- update-prSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
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 28
Run the extraction script to scan all session transcripts for user corrections:
- Distinctive: line 40
Read the output file to understand what was extracted.
- Very specific: line 44
Before proposing any changes, read ALL existing documentation to understand what's already captured — CLAUDE.md, docs/*.md, .claude/rules/.
- Distinctive: line 97
Use AskUserQuestion to get approval before writing.
- Distinctive: line 99
After applying, show a summary table with file, change description, and line delta.
- Distinctive: line 103
Never add session-specific context — "We fixed bug #42" is not a learning
- Distinctive: line 104
Prefer updating over adding — extend existing bullets, don't create new sections
- Distinctive: line 107
Don't duplicate linter rules — if the toolchain enforces it, don't document it
≈ “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
Mine Session History
Extract actionable learnings from past Claude Code conversations and synthesize them into project documentation. Turns the goldmine of corrections, mandates, and discoveries across all sessions into persistent knowledge.
$ARGUMENTS
Phase 1: Extract Raw Corrections
Run the extraction script to scan all session transcripts for user corrections:
node scripts/extract-learnings.js \
--project=. \
--output=/tmp/learnings-raw.md \
--since-days=90 \
--max-pairs=500Adjust --since-days and --max-pairs based on user arguments.
Read the output file to understand what was extracted.
Phase 2: Audit Existing Documentation
Before proposing any changes, read ALL existing documentation to understand what's already captured — CLAUDE.md, docs/*.md, .claude/rules/. Build a mental map of what's already documented.
Phase 3: Synthesize & Deduplicate
Work through the extracted corrections by topic:
| Check | Action |
| Already documented? | Skip — note as "confirmed" |
| Contradicts existing docs? | Flag for review |
| Genuinely new pattern? | Propose addition |
| Session-specific (not generalizable)? | Skip |
| Single occurrence (might be wrong)? | Skip unless obviously correct |
Quality filter — only propose learnings that:
- Appear multiple times across sessions (pattern, not one-off)
- OR are clearly universal (e.g., "never use DateTime.UtcNow")
- Would prevent a real mistake if documented
- Are concise enough for a one-liner or short paragraph
Route by category:
| Category | Target File |
| Universal rule | CLAUDE.md (if under 300 lines) |
| Domain-specific pattern | Appropriate docs/*.md file |
| Path-scoped convention | .claude/rules/{topic}.md |
| Tool/workflow preference | CLAUDE.md or docs/DEVELOPMENT_PRACTICES.md |
Phase 4: Present Proposals
Present ALL proposed changes in a single summary before writing anything:
## History Mining Results
### Statistics
- Sessions scanned: X
- Corrections found: Y
- Already documented: Z
- New learnings: N
### Proposed Updates
#### 1. docs/FRONTEND.md
- **Add to Reactivity section**: "Never unwrap .value in addToast() calls — refs stay reactive"
#### 2. Skipped (already documented)
- "Use npm run scripts" — in CLAUDE.md line 12Phase 5: Apply with Approval
Use AskUserQuestion to get approval before writing. Options: apply all, let me pick, save proposals to file, or skip.
After applying, show a summary table with file, change description, and line delta.
Gotchas
- Never add session-specific context — "We fixed bug #42" is not a learning
- Prefer updating over adding — extend existing bullets, don't create new sections
- One-liners only for CLAUDE.md — it has a 300-line budget
- Route domain knowledge to docs/*.md — that's where detailed patterns belong
- Don't duplicate linter rules — if the toolchain enforces it, don't document it
- Multiple occurrences = high confidence — a pattern seen across 3+ sessions is almost certainly worth documenting
- Single occurrence = verify first — read the surrounding context before proposing
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.

