consolidate-learningslisted
Install: claude install-skill ajyadav013/claude-kit
# Consolidate Learnings — Duplicate Merge Pass
Keep the agent-memory knowledge base lean and non-redundant. This runs **periodically** (nudged by the SessionStart hook every N sessions) or on demand. The goal is a single canonical entry per distinct learning — no bloat from near-duplicates accumulating as the same rule gets restated over time.
## Guiding rule
**Merge duplicates and overlaps. Do NOT delete distinct learnings.** Every learning is valid by definition. Consolidation only removes *redundancy*, never *information*. If two entries say different things, keep both. If two entries say the same thing (or one fully contains the other), merge into one.
## Procedure
### 1. Read the current state
- Read `.claude/agent-memory/MEMORY.md`.
- For each category folder (`ux/`, `architecture/`, `debugging/`, `patterns/`, `api/`, `performance/`, `gotchas/`), read every `*.md` learning file.
- **Advisory shape check** (while reading): flag any entry missing the `trigger:` frontmatter or a
body section (`Context` / `Learning` / `Evidence` / `Apply when`). Repair from the entry's own
content where the fix is obvious (e.g. derive `trigger` from an existing `Apply when`); otherwise
list it in the step-7 report. **Never delete or skip an entry for non-conformance** — a lossy
learning beats no learning; the shape exists to make retrieval reliable, not to gate capture.
### 2. Group within each category
Compare entries **within the same category** (cross-category merges are ra