Extract learnings from this session into ~/.claude/learnings/
Extracts significant learnings from the current session or a transcript file into ~/.claude/learnings/ for future reference. Use after solving complex problems to capture failures, discoveries, and constraints that should inform future work.
/plugin marketplace add saadshahd/moo.md/plugin install hope@moo.mdExtract session learnings into compound knowledge.
$ARGUMENTS
If a transcript path is provided above, read it using the Read tool. Otherwise, analyze the current session context.
Read source:
wc -l < "$PATH"
offset = line_count - 300Read(path, offset: X, limit: 300)Ensure directory exists:
mkdir -p ~/.claude/learnings
Read existing learnings for deduplication:
cat ~/.claude/learnings/failures.jsonl 2>/dev/null
cat ~/.claude/learnings/discoveries.jsonl 2>/dev/null
cat ~/.claude/learnings/constraints.jsonl 2>/dev/null
Deduplication rules (apply before writing each learning):
Extract and write each category (use current timestamp in ISO format):
~/.claude/learnings/failures.jsonlBugs, errors, wrong assumptions, things that didn't work.
{"ts":"ISO","context":"area","failure":"what","root_cause":"why","prevention":"how"}
~/.claude/learnings/discoveries.jsonlInsights, patterns, techniques that worked well.
{"ts":"ISO","context":"area","discovery":"insight","confidence":0.X,"applies_to":["areas"]}
~/.claude/learnings/constraints.jsonlLimits, blockers, requirements discovered.
{"ts":"ISO","context":"area","constraint":"limit","source":"how found","permanent":bool}
Be selective: Only significant learnings. Skip routine actions.
Use empty arrays if no items in a category.
Report summary: