compound

compound is a skill for Claude Code, Codex from wsauret/flywheel. It costs 32 tokens per session (1,379 once invoked), scanned A, original, MIT.

A procedure for recording verified solutions to difficult problems as searchable team documents. YAML frontmatter is a small metadata block at the top of each document.

In plain words
What is it for?
Use it after a non-trivial problem is fixed and verified, especially for reusable patterns, debugging lessons, or performance issues.
Why use it?
It lets future developers reuse solutions to tricky bugs and investigations instead of solving the same problem from scratch.

Skill for Claude CodeCodex

Part of the flywheel plugin — 15 skills, 15 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/wsauret/flywheel/compound
Any agent
npx skills add wsauret/flywheel --skill compound
Clone the repo
git clone --depth 1 https://github.com/wsauret/flywheel

Made for: Claude Code, Codex.

Or install flywheel, the plugin that ships this one along with the rest of its 15 skills, 15 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for compound

README.md
[![agentmods](https://agentmods.dev/badge/skills/wsauret/flywheel/compound.svg)](https://agentmods.dev/skills/wsauret/flywheel/compound)
Your own site
<a href="https://agentmods.dev/skills/wsauret/flywheel/compound"><img src="https://agentmods.dev/badge/skills/wsauret/flywheel/compound.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,379 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.01379
Opus 5 $0.00016 $0.00690
Sonnet 5 $0.00006 $0.00276
Haiku 4.5 $0.00003 $0.00138

Measured 4d ago against content hash e4c4490369d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

compound scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

flywheel/skills/compound/SKILL.md · 206 lines

How it starts

The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Compound Skill

Document solved problems to build searchable institutional knowledge.

Why "compound"? Each documented solution compounds your team's knowledge like compound interest. First time solving a problem takes research. Document it, and the next occurrence takes minutes.

Compounding vs Compaction: Flywheel uses two strategies (see README):

  • Compaction = Reduce context mid-work (atomic progress.json checkpoints, structured spec.json.context arrays)
  • Compounding = Accumulate knowledge post-work (this skill)

Preconditions:

  • Problem has been solved (not in-progress)
  • Solution has been verified working

Organization: Single-file per problem in category directory (e.g., docs/solutions/performance-issues/n-plus-one-query.md).


Step 1: Detect Confirmation

Auto-invoke after: "that worked", "it's fixed", "working now", "problem solved"

OR manual: /compound command

Non-trivial problems only:

  • Multiple investigation attempts needed
  • Tricky debugging
  • Non-obvious solution

Skip: Simple typos, obvious syntax errors, trivial fixes.

Additional categories:

  • pattern = Successful approach worth reusing → docs/solutions/patterns/
  • mistake = Failed approach with prevention guidance → docs/solutions/mistakes/

Step 1.5: 3-Strike Integration

When invoked after 3-Strike escalation (error resolved with user help), capture:

  • What failed: All 3 attempts (sanitized - remove credentials, API keys, PII, internal URLs)
  • Why it failed: Root cause analysis
  • What worked: User-provided solution
  • How to prevent: Future guidance

This creates institutional memory from hard-won debugging sessions.


Step 2: Gather Context

Extract from conversation history:

  • Module - Which component had the problem
  • Symptom - Exact error messages, observable behavior
  • Investigation - What was tried, what didn't work
  • Root cause - Technical explanation
  • Solution - Code/config changes that fixed it
  • Prevention - How to avoid in future

Read the full file on GitHub · 206 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 206 lines · 32 tokens per session scan A e4c4490369d3

Subscribe to this mod's changes

compound is a skill published in the GitHub repository wsauret/flywheel (14 stars, last pushed 7d ago), licensed MIT. It adds 32 tokens to every session and 1,379 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

handoff

Write a compact, decision-ready handoff so the next session (or the user) can continue without reconstructing the current one. Use when the session is ending, context is running low, the user asks for a handoff / "pass the baton" / "hand off", or a long-running operation needs a durable state checkpoint.

Hmbown/CodeWhale · 70 tokens

maintaining-context

Use at the start of any substantial task and whenever you make a non-obvious decision or learn a reusable fact — keeps .yoke/context/ (PROJECT, DECISIONS, KNOWLEDGE) the durable source of truth so fresh-context work never drifts.

HECer/yoke · 57 tokens

startup-context

When the user wants to create or update their startup context document. Also use when the user mentions "set up context", "tell you about my startup", or any other skill needs context that doesn't exist yet.

Maudeunfledged834/startup-founder-skills · 45 tokens

interview

Ask one useful structured question at a time only when material product/implementation choices are genuinely missing; remember answers and produce a brief/spec. Discoverable facts should be investigated instead of asked.

Hmbown/CodeWhale · 40 tokens

document

Write or update repository/product documentation: README, user guides, API docs, architecture, migration notes, and changelog material. This is not the Word-document artifact skill.

Hmbown/CodeWhale · 0 tokens

research

Current external research using available web tools, primary sources where possible, links/citations, date awareness, synthesis, and unresolved uncertainty.

Hmbown/CodeWhale · 28 tokens