compound
Skill207 starsChanged 8 months agoApache-2.0View on GitHub
Document what you learned during this sprint. Reads artifacts, writes structured solutions to know-how/solutions/. Run after /ship or after fixing a significant bug. Triggers on /compound.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- rcelebrone/DotAgentstheir own version, first seen Sep 23, 2026
- chrislacey89/skillstheir own version, first seen Sep 18, 2026
- minhtran3124/agent-harnesstheir own version, first seen Aug 12, 2026
- pfeff/claude-skillstheir own version, first seen Aug 3, 2026
- toverux/cantripstheir own version, first seen Jul 25, 2026
- psw7205/skillstheir own version, first seen May 26, 2026
Used with
Projects with it also use research, tdd and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
DockerSkillresearch
Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".
Also in 4 projects that use this
AWSSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- ai-native-camp/camp-2★ 19same name
- rcelebrone/DotAgents★ 15same name
- c-reichert/flowstate★ 9same name
- minhtran3124/agent-harness★ 9same name
- Andamio-Platform/coach★ 6same name
- chrislacey89/skills★ 3same name
- toverux/cantrips★ 3same name
- dirkkok101/skills★ 2same name
- pfeff/claude-skills★ 2same name
- thoreinstein/obsidian-rag★ 2same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 15 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
15
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
After a sprint or a significant fix, extract what you learned into structured, searchable documents.
- Very specific: line 26
After /ship completes a sprint
- Distinctive: line 27
After fixing a bug that took significant investigation
- Distinctive: line 28
After making an architecture decision worth remembering
- Distinctive: line 29
After discovering a pattern that should be reused
- Distinctive: line 56
Not everything needs a solution document.
- Distinctive: line 68
Before creating a new document, search for related ones:
- Distinctive: line 76
If a closely related solution exists:
- Distinctive: line 77
Update it: if the new information extends or corrects the existing document
- Distinctive: line 78
Create a new one: if it's a different problem that happens to share keywords
- Distinctive: line 80
Do not create duplicates. One good document beats two partial ones.
- Distinctive: line 129
After filling in the body, update the frontmatter:
- Distinctive: line 148
After reporting, save the artifact.
- Distinctive: line 156
After saving solutions, check if any existing solutions now meet graduation criteria:
- Distinctive: line 162
If candidates exist, report them:
- Very specific: line 173
If .nanostack/know-how/diarizations/ exists, check whether this sprint touched files covered by any existing diarization.
- Distinctive: line 198
One problem per document: Don't combine unrelated fixes into one solution.
- Very specific: line 201
Tags are for search, not decoration: Use terms someone would grep for: stripe, webhooks, hmac, not payment-processing-integration.
- Very specific: line 203
Update, don't duplicate: If ~/.claude/skills/nanostack/bin/find-solution.sh returns a close match, update that document.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/compound - Knowledge Compounding
After a sprint or a significant fix, extract what you learned into structured, searchable documents. Next time the agent plans or reviews, it finds these automatically.
Telemetry preamble
Defensive telemetry init. No-op if telemetry is disabled via NANOSTACK_NO_TELEMETRY=1, ~/.nanostack/.telemetry-disabled, or if the helpers are removed.
_P="$HOME/.claude/skills/nanostack/bin/lib/skill-preamble.sh"
[ -f "$_P" ] && . "$_P" compound
unset _PWhen to run
- After
/shipcompletes a sprint - After fixing a bug that took significant investigation
- After making an architecture decision worth remembering
- After discovering a pattern that should be reused
Process
1. Read the sprint artifacts
Resolve all sprint phase artifacts in one call:
~/.claude/skills/nanostack/bin/resolve.sh compoundThe output is JSON with upstream_artifacts containing paths for think, plan, review, security, qa, and ship artifacts (only those that exist within the last 2 days). Read what's available. Focus on:
/reviewfindings that were fixed (these are bugs worth documenting)/securityfindings that were resolved (these are patterns worth remembering)/thinkscope decisions (these are decisions worth recording)/qafailures that were debugged (these are bugs with investigation trails)
Report-only ship check. Read the ship artifact's run_mode. If it is "report_only", /ship only previewed the delivery and nothing was published (no commit, no PR, no deploy). Tell the user plainly that the ship was report-only, then keep going: the investigation from /review, /security, and /qa is still worth capturing if it was non-trivial. But do not write a solution or summary that claims work was shipped or that the sprint closed. There is no shipment to record yet.
SHIP_ARTIFACT=$(~/.claude/skills/nanostack/bin/resolve.sh compound 2>/dev/null | jq -r '.upstream_artifacts.ship // empty')
SHIP_RUN_MODE=$(jq -r '.run_mode // "normal"' "$SHIP_ARTIFACT" 2>/dev/null || echo "normal")2. Identify what's worth capturing
Not everything needs a solution document. Capture:
- Bugs that took more than a trivial fix (the investigation is the value)
- Patterns you want the agent to follow in future sprints
- Architecture decisions with trade-offs that someone might question later
Skip:
- Typos, formatting, trivial fixes
- Standard library usage (the docs are better)
- Findings that were auto-fixed with no investigation
3. Check for existing solutions
Before creating a new document, search for related ones:
~/.claude/skills/nanostack/bin/find-solution.sh "relevant keywords"
~/.claude/skills/nanostack/bin/find-solution.sh --tag relevant-tag
~/.claude/skills/nanostack/bin/find-solution.sh --file affected/file/pathIf a closely related solution exists:
- Update it if the new information extends or corrects the existing document
- Create a new one if it's a different problem that happens to share keywords
Do not create duplicates. One good document beats two partial ones.
When updating an existing solution, evolve it:
- Rewrite the compiled truth. Read the current Problem, Solution, and Prevention sections. Do they reflect what you know NOW, or what you knew when the document was created? If the new sprint changed your understanding, rewrite these sections completely — don't append to them. The compiled truth must always reflect the current best understanding, not a history of partial fixes.
- Increment
applied_countin the frontmatter - Set
validated: trueandlast_validatedto today's date - Adjust confidence (1-10 scale): if the solution worked perfectly this sprint → set to current + 2 (cap 10). If it worked with adjustments → keep current. If it failed or needed major changes → set to current - 2 (floor 1). Confidence determines search ranking: high-confidence solutions surface first.
- Append a
### YYYY-MM-DD — Contextentry to the## Historysection at the bottom, documenting what happened in this sprint and what changed
Compiled truth is rewritten. Timeline is appended. The sections above History always reflect the latest understanding. The History section is the immutable evidence trail of how that understanding evolved. If old information was wrong, rewrite the compiled truth — don't leave stale text. The History entry records what changed and why.
4. Write solution documents
For each significant learning, create a document:
~/.claude/skills/nanostack/bin/save-solution.sh <type> "<title>" "tag1,tag2,tag3"Types:
bug- a problem you encountered and solvedpattern- a recurring approach worth rememberingdecision- an architecture or design choice with rationale
The script creates the file with YAML frontmatter and section templates. Fill in every section. Be specific:
Good:
## Problem
Stripe webhook endpoint accepted POST without signature verification.
stripe.webhooks.constructEvent() requires the raw request body, not parsed JSON.
## Solution
Use express.raw() middleware on the webhook route before express.json() parses it.Bad:
## Problem
Webhook was broken.
## Solution
Fixed the webhook handler.The value is in the detail. A future agent reading this needs enough context to apply the solution without re-investigating.
5. Update frontmatter
After filling in the body, update the frontmatter:
files: add the actual file paths involvedseverity: adjust based on actual impact (critical, high, medium, low)tags: add any tags that would help future search
6. Report
Print a summary of what was captured:
Compound: 3 solutions captured
bug/stripe-webhook-signature.md (high) - Stripe webhook missing signature verification
pattern/api-error-handling.md (medium) - Structured error responses with codes
decision/auth-clerk-over-custom.md (medium) - Chose Clerk over custom auth
Total solutions in project: 12After reporting, save the artifact. Run this command now — do not skip it:
~/.claude/skills/nanostack/bin/save-artifact.sh compound '<json with phase, summary including solutions_created, solutions_updated, total_solutions, context_checkpoint including summary, key_files, decisions_made, open_questions>'7. Check graduation candidates
After saving solutions, check if any existing solutions now meet graduation criteria:
~/.claude/skills/nanostack/bin/graduate.shIf candidates exist, report them:
N solutions ready to graduate into skill files.
Run `graduate.sh --apply` to promote them, or review with `graduate.sh` (dry-run).Graduation means a proven, validated solution gets baked directly into a SKILL.md file — no more runtime lookup needed. Only solutions with 3+ applications, validated status, and existing referenced files qualify.
8. Check stale diarizations
If .nanostack/know-how/diarizations/ exists, check whether this sprint touched files covered by any existing diarization. If so, the diarization may be stale — suggest re-running it:
Diarization for <subject> is N days old and this sprint modified files it covers.
Consider re-running: /investigate --diarize <subject>Then tell the user:
Knowledge captured. These solutions will be found automatically by /nano during planning and /review during code review.
Telemetry finalize
Before returning control:
_F="$HOME/.claude/skills/nanostack/bin/lib/skill-finalize.sh"
[ -f "$_F" ] && . "$_F" compound success
unset _FPass abort or error instead of success if compound did not complete normally.
Rules
- One problem per document. Don't combine unrelated fixes into one solution.
- Fill every section. Empty sections are noise. If "What didn't work" is empty, either you fixed it on the first try (rare, skip the document) or you forgot to write it down.
- Use the exact file paths.
src/api/webhooks/stripe.tsis searchable. "The webhook file" is not. - Tags are for search, not decoration. Use terms someone would grep for:
stripe,webhooks,hmac, notpayment-processing-integration. - Set severity accurately. Solutions are ranked by severity when searched. Don't leave everything as medium.
- Update, don't duplicate. If ~/.claude/skills/nanostack/bin/find-solution.sh returns a close match, update that document.
- The Prevention section is the highest-value section. A bug fix helps once. A prevention rule helps every future sprint.
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.

