Use it when
- After a non-trivial bug fix, a framework gotcha or version-specific behavior, a reusable pattern, or an architectural decision with real trade-offs, when the lesson is one the code, tests and commit message do not already carry
- When the user asks to document, save or remember a solution so it is not hit again
- To tidy the knowledge base
Pick another skill
Not for typos, import fixes, one-off config changes, or anything framework docs, a regression test or a code comment already covers.
Name it in your tool
Every tool also picks a skill on its own when your request matches its description. Naming it picks it for sure.
Claude Code
/ab-knowledge-compoundingCodex
$ab-knowledge-compoundingIn Codex's pickerKnowledge CompoundingWrite up a solved problem so the fix is easy to find
Antigravity
/ab-knowledge-compoundingGrok Build
/ab-knowledge-compoundingPi
/skill:ab-knowledge-compoundingCursor CLI
/ab-knowledge-compoundingHermes
/ab-knowledge-compoundingAmp
use the ab-knowledge-compounding skillAsk for it in plain words.
What it does
Records a solved problem as a searchable solution document in docs/solutions/ (problem, root cause, solution, failed approaches, key insight, search terms), cross-links it to related solutions and decisions, and adds a one-line learning to the project instructions file when the lesson applies broadly. Also runs a gardening pass that prunes stale, orphaned or contradictory entries.
Identify the Knowledge
Write the Solution Document
Create
docs/solutions/YYYY-MM-DD-[slug].mdfromreferences/solution-doc.md§ Template, and check it against § Quality Bar and § Common Mistakes in the same file.Cross-Reference
Verify Searchability
Confirm
SKILL.md
The instructions the agent follows, from skills/ab-knowledge-compounding/SKILL.md.
Read SKILL.md on GitHubIts references/ folder
Knowledge Compounding
Each solved problem should make the next one easier. This skill turns a solved problem into a structured document in docs/, a knowledge base that the learnings-researcher helper (in the ab-deep-research, ab-deepen-plan and pipeline skills) searches before new work starts. Solve a problem once; benefit every time a similar one comes up.
A run ends with a new or updated solution document and the Step 5 confirmation, or with a plain statement that nothing cleared the bar.
When to Use
- After solving a non-trivial bug (not typos or config fixes)
- After implementing a pattern that could be reused
- After discovering a framework gotcha or version-specific behavior
- After a debugging session that uncovered a non-obvious root cause
- After making an architectural decision with significant trade-offs
- When the user asks for it, or says “document this for future reference”
Not for trivial fixes (typos, import corrections), one-off config changes, or changes framework docs already cover well.
For a pass over existing documents rather than a new one, go to the Gardening Checklist below.
Process
Step 1: Identify the Knowledge
Answer for yourself:
- What problem was solved? The symptom and the root cause.
- What approach worked? The solution, not just the fix.
- What did we try that didn’t work? Failed approaches save the next reader the most time.
- What would we do differently? The retrospective insight.
- When would this apply again? The search keywords.
- Do the code and tests already preserve this? If a regression test fails when someone repeats the mistake, or a comment beside the fix explains it, a solution doc adds nothing. Capture only what a future reader couldn’t recover from the code, the tests and the commit message.
If nothing clears the bar (the fix was trivial, or framework docs already cover it), say so, for example “nothing from this session is worth a solution doc”, and stop there rather than ending silently. Being invoked doesn’t oblige a new file.
Step 2: Write the Solution Document
Create docs/ from references/ § Template, and check it against § Quality Bar and § Common Mistakes in the same file. Aim for 50 to 100 lines: enough for the root cause and the failed approaches, short enough to read in a minute.
Step 3: Cross-Reference
Check whether the solution relates to:
- Existing docs in
docs/: add cross-references.solutions/ - Architecture decisions in
docs/: link them if relevant.decisions/ - Project instructions file: if the learning applies broadly, a one-line entry in its Learnings section (Key Learnings in older projects). The file is AGENTS.md, or CLAUDE.md when only that one exists; this is the one step that writes it. Keep the entry to one line, because that file loads in every session.
Step 4: Verify Searchability
The learnings-researcher finds documents by keyword, so check that:
- the title contains the key technology or pattern name;
- the tags cover the relevant domains;
- the Problem section includes the error message or symptom text;
- the
applies-tofield matches how a future planner would describe the area.
Step 5: Confirm
Tell the user:
Knowledge compounded: docs/solutions/[filename]
Tags: [tags]
Future ab-deep-research and planning runs will find this automatically.
How other skills use these documents: references/ § How This Integrates with Other Skills.
Gardening Checklist
Compounding isn’t only additive: the knowledge base needs periodic weeding. A gardening pass runs when the user asks to tidy, prune or audit the knowledge base, or when the ab-session-wrap skill’s learnings step (Step 5) finds a new learning that contradicts or supersedes an existing one.
Run the checks in references/ § Checks over the affected documents (all of docs/ when the user asked for a full audit), fix or remove what fails as each check says, and tell the user what changed and why.