session-mine
Skill0 starsChanged 46 days agoMITView on GitHub
Mine past agent/coding sessions for reusable prompts, decisions, and patterns, with the receipts: every extracted pattern is traced to the session where it ran AND its recorded outcome, so you never cargo-cult a prompt that actually failed. Dedups against what's already captured, stops when fresh sessions stop yielding novel patterns, and hands keepers to memory-forge / skillify instead of adopting them mid-mine. Use when "what did I ask last time", "find that prompt that worked", "what did we decide about X", "mine my history", session archaeology, or before re-deriving an approach you suspect a past session already nailed.
In this repository51 other files it gives its agents.
- advisor-councilSkill
- advisor-persona-buildSkill
- agent-exploit-pathsSkill
- agentic-loopsSkill
- ai-receptionist-tenant-onboardingSkill
- audit-lensSkill
- beadsmithSkill
- bug-sweepSkill
- bug-zeroSkill
- build-in-public-scope-guardSkill
- consulting-sales-playbookSkill
- deepenSkill
- deposit-first-shippingSkill
- design-intelSkill
- dueling-idea-forgeSkill
- forgeSkill
- hotspot-scoutSkill
- idea-forgeSkill
- incident-zeroSkill
- kickstartSkill
- local-llm-opsSkill
- memguardSkill
- memory-forgeSkill
- migrate-proofSkill
- no-slop-bug-hunterSkill
- optimize-proofSkill
- perf-maxSkill
- polish-passSkill
- problem-breakthroughSkill
- project-autopilotSkill
- qwen-bug-zeroSkill
- qwen-forgeSkill
- qwen-kickstartSkill
- qwen-perf-maxSkill
- qwen-project-autopilotSkill
- qwen-ship-itSkill
- qwen-ux-maximizerSkill
- readme-realSkill
- reality-checkSkill
- recallSkill
- security-sweepSkill
- ship-itSkill
- simplify-proofSkill
- skillifySkill
- stream-demo-prepSkill
- swarm-runSkill
- test-maxSkill
- trace-itSkill
- unslopSkill
- ux-maximizerSkill
- ux-scanSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 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.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 93
Stop when two consecutive sweeps yield nothing novel: every extraction dedups against the capture set or the run's own ledger.
≈ “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
Session Mine
Your session history is a lab notebook nobody reads: hundreds of experiments, each
with a prompt, a context, and (crucially) a result. This skill reads it. Point it
at your session logs (Claude Code JSONL, Codex history, a local agent's
logs, whatever the harness writes) and it extracts the prompts, decisions, and recurring moves worth
keeping, as evidence-backed claims, not nostalgia. It is the finder half of the
memory loop: memory-forge curates what this skill unearths, recall serves it
back at session start, skillify promotes the methods that generalize.
Core Insight: Frequency is a lead, not proof. The prompt you typed ten times might be your best ritual, or a habit that failed ten different ways, which is why you kept re-typing it. The only honest test of a "working prompt" is what happened NEXT in the session where it ran: did the agent produce the thing, did the tests go green, did you move on, or did the next user message start with "no, that's not what I meant"? So the gate here is provenance + outcome: no pattern leaves the mine without the session it worked in and the evidence that it worked. A pattern without an outcome is an anecdote with a filename.
The firewall: mine, don't adopt
This skill EXTRACTS. It never installs. No editing CLAUDE.md, no rewriting a skill, no "while I'm here" adoption of a freshly-mined prompt into the current task: extraction and adoption are different activities with different reviewers. Every keeper gets a disposition, and the disposition is a handoff:
- durable fact / preference / decision →
memory-forge(which owns dedup against the store and the recall test) - a METHOD that generalizes across projects →
skillify - a project-specific lesson → that project's CLAUDE.md, proposed, not written
- everything else → dropped, with the reason logged
The mine's output is a ledger, not a changed system.
Preconditions / guards
- A mining question. "Mine everything" produces a museum. Every run starts from a question ("how did I get X working", "what prompts start my best sessions", "when did we decide against Y") that decides what a hit looks like.
- Read-only over the corpus. Session logs are evidence; never edit, reformat, or "clean up" a session file. Chain of custody matters when a pattern's worth is its provenance.
- The existing capture set is loaded first: memory store, existing skills, CLAUDE.md lessons. You can't dedup against what you haven't read, and the most common mining failure is triumphantly re-discovering something already captured.
The pass structure
Per pass (one mining question):
- SWEEP: locate candidate sessions. Keyword search across the corpus, plus the high-yield strata (sessions just before a ship, sessions that ended in a commit, sessions you returned to after context loss; what you searched for after losing context is what mattered). Rank by likely yield, take the top N.
- EXTRACT: from each session, pull candidate patterns: the exact prompt or decision text, verbatim, with file + position + date. A paraphrase is not a candidate; the whole point is the wording that worked.
- TRACE THE OUTCOME (the gate): for each candidate, read forward in the
session until the outcome is visible, and record it as evidence: the artifact
produced, the green run, the user's next message accepting it, or the
correction, the retry, the abandonment. Three verdicts:
- WORKED: outcome evidence in hand → eligible keeper.
- FAILED: the session shows it didn't land → recorded in the ledger AS a failure (a known-bad prompt is real intel; it inoculates future mining), never dispositioned as a keeper.
- UNRESOLVED: session ends before the outcome → stays a candidate; it may resolve in a sibling session (work clusters), one look, then drop or park.
- DEDUP: against the capture set and this run's ledger. Same pattern, new
session → don't re-record; increment its evidence (three independent WORKED
traces beat one). Contradicting evidence (worked in April, failed in June) →
record both; the conflict is the finding, and
memory-forgeowns resolving it. - DISPOSITION: route each keeper per the firewall. Log the routing.
Ledger entry (all five fields or it doesn't enter): pattern (verbatim) · provenance (session file/position, date, project) · outcome evidence (one sentence + where to see it) · verdict · disposition.
Stopping condition: saturation
Stop when two consecutive sweeps yield nothing novel: every extraction dedups against the capture set or the run's own ledger. That's the corpus telling you this question is mined out; the next marginal session costs more to read than it yields. Then stop for that question. A new question re-opens the mine; more history never does. If saturation arrives suspiciously fast, the sweep is too narrow (one keyword, one harness, one project): widen once, then trust the signal.
Anti-Patterns
- Extracting a prompt because it reads well. Eloquence is not evidence; trace the outcome or it's not a keeper.
- Counting repetition as validation. Ten retries of a failing prompt is the strongest possible signal, in the other direction.
- Adopting mid-mine: pasting a freshly-mined prompt into the live task, editing CLAUDE.md "since I found this". Disposition, then act in a separate step.
- Paraphrase capture: recording your summary of the prompt instead of the prompt. The wording IS the pattern.
- Mining without loading the capture set. You'll re-discover your own store and call it yield.
- Dropping FAILED traces because they're not keepers. The failure ledger is half the value; it's what stops the next agent from cargo-culting.
- Grinding past saturation because the corpus is big. Size isn't yield; two dry sweeps is the exit.
- "Cleaning up" session logs while mining. Evidence is read-only.
THE EXACT PROMPT
/session-mine
Corpus: <where the session logs live: harness dirs, log paths>
Question: <what you're mining for: a prompt, a decision, a recurring move>
Capture: <the existing capture set to dedup against: memory store, skills, CLAUDE.md>
Budget: <optional: max sessions per sweep; default 20>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.

