
Extract Learnings
Capture session insights into a layered memory system and prune stale notes so your coding agent stays accurate across projects.
Overview
Extract Learnings is a journey-wide agent skill that persists and maintains agent memory across sessions—usable whenever a solo builder needs to capture or verify patterns before the next task.
Install
npx skills add https://github.com/gupsammy/claudest --skill extract-learningsWhat is this skill?
- Runs two parallel agents (auditor + discoverer) when you say remember this—not a single sticky note
- 5-layer memory hierarchy (L0 universal, L1 project, L2 working notes) controls what auto-loads per session
- Consolidation dream mode prunes outdated entries, merges overlaps, and clusters overflowing sections
- Triggers on extract learnings, save for next time, remember this pattern, and consolidate memories
- Team context carries forward so future sessions onboard faster on the same codebase
- 5-layer memory hierarchy with L0 loaded every session
- Two parallel agents: auditor and discoverer on capture runs
Adoption & trust: 1 installs on skills.sh; 253 GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
You solved something once in chat but the next session forgets it, or your agent memory file grows noisy and contradicts itself.
Who is it for?
Solo builders running long-lived Claude Code projects who repeatedly say remember this and want structured L0–L2 memory without manual file babysitting.
Skip if: Teams that already treat ADRs and README as the sole source of truth with no agent-local memory, or one-off tasks where nothing should persist past the session.
When should I use this skill?
User says extract learnings, save this for next time, remember this pattern, consolidate memories, dream, or clean up memories.
What do I get? / Deliverables
New knowledge lands in the right memory layer while an auditor flags stale entries, and dream consolidation shrinks overlap so future invokes load trustworthy context.
- Updated layered memory files (L0–L2 per hierarchy)
- Consolidated index after dream or clean-up passes
Recommended Skills
Journey fit
Useful at every journey phase - explore requirements and options before committing to a direction.
Where it fits
After wiring a third-party API quirk, run extract learnings so L1 project memory documents the workaround before the next feature.
Post-review, save recurring review rules to L0 so every future session applies the same bar without re-reading the PR thread.
Invoke dream to merge duplicate deployment notes and drop outdated env URLs after you migrate hosting.
Remember pricing and scope decisions from brainstorming so Validate conversations do not contradict earlier commitments.
Persist support playbooks discovered in tickets so the agent answers repeat customer questions consistently.
How it compares
Structured agent memory workflow with parallel verify-and-capture, not a generic notes MCP or single append-to-CLAUDE.md macro.
Common Questions / FAQ
Who is extract-learnings for?
Indie and solo developers using Claude Code (or similar) on multi-session repos who want durable patterns, preferences, and project facts without re-explaining context every day.
When should I use extract-learnings?
After you land a fix or convention during Build integrations, before Ship review when you want lessons recorded, during Operate iterate when debugging repeats, or anytime you say remember this pattern, consolidate memories, or dream to prune stale notes.
Is extract-learnings safe to install?
It requests Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion, and Agent tools to touch memory files and run maintenance scripts; review the Security Audits panel on this page and scope writes to your own ~/.claude and project paths.
SKILL.md
READMESKILL.md - Extract Learnings
## Value Context Weave these into conversation at natural moments — after results land, when context is relevant, or on first use. One or two per run, not all at once. - Most users say "remember this" expecting a single note — this skill actually runs two parallel agents (auditor + discoverer) to both capture new knowledge and verify existing memories haven't gone stale. - The 5-layer memory hierarchy means the right knowledge loads at the right time — universal preferences in L0, project architecture in L1, working notes in L2 — without polluting every session with everything. - Consolidation ("dream") is the maintenance mode: it prunes outdated and low-value memories, merges overlaps, and clusters overflowing sections so the always-loaded index stays small. - For teams: memories captured here carry forward to every future session in this project, making onboarding and context-switching dramatically faster. ## Memory Hierarchy | Layer | File | Loaded | Purpose | |-------|------|--------|---------| | 0 | `~/.claude/CLAUDE.md` | Every session, all projects | Universal behavioral preferences | | 1 | `<repo>/CLAUDE.md` | Every session, this project | Architecture, conventions, gotchas | | 2 | `memory/MEMORY.md` (project dir) | Every session, agent-managed | Top index: working notes + pointers to clusters/topics | | 2c | `memory/clusters/*.md` sub-index | On-demand (after a section overflows) | Section sub-index split off MEMORY.md to cap always-loaded size | | 3 | `memory/*.md` topic files | On-demand | Detailed reference too long for L2 | | Meta | Suggest new skill/command | N/A | Repeatable workflow → automation | Placement decision: project-independent preference → L0, project-specific technical → L1, concise working note → L2, detailed reference → L3, repeatable pattern → Meta. Adaptive clustering: keep MEMORY.md flat until a section exceeds 25 entries; then move that section's pointers into `memory/clusters/<section>.md` and replace the section in MEMORY.md with a single pointer to it. Only MEMORY.md loads every session, so this caps startup cost while detail stays on-demand. ## Pointer Format Every MEMORY.md and cluster entry is a load trigger, not a label — a future session must recognize its current task in the pointer and open the file. A pointer that only names a file gets ignored, so the index loads without ever being used. Two shapes: - Triggered (default): `**When <task-condition>:** <one-line takeaway>. → [detail](file.md)`. Use whenever a sharp "when" can be written — e.g. `**When compositing a face onto a turned head:** align centers, tight ellipse. → [detail](feedback_composite_align_tight_ellipse.md)`. - Always-on: `<terse fact>. → [detail](file.md)`. Only for rules that apply in every relevant session (locked context, global preferences), where a condition would be fake. Choose triggered if you can name the task that should open the file; choose always-on only when the rule applies regardless of task. Cluster files carry a short always-on block at the top, then a trigger-index — every other entry is a condition pointer. Do not inline full rule bodies in a cluster; it routes to topic files, detail lives in them. ## Early Exit Guard If the user said "remember X" with explicit content already in context — and the request is NOT a consolidation trigger ("consolidate", "dream", "extract learnings", "clean up memories", or triggered from the consolidation nudge): 1. Resolve memory path (see Phase 1 step 1) 2. Read existing memories to check for duplicates and pick the right layer 3.