compound

A command that records reusable solutions and design decisions in existing project documentation. It looks for patterns that have appeared more than once or are useful after the current task.

In plain words
What is it for?
Use it to add test helpers, prompt patterns, design reasons, or warnings about recurring mistakes to the relevant AGENTS.md or work document.
Why use it?
It keeps useful knowledge from being lost in temporary work notes and helps future contributors follow established practices.

Command for Claude Code

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 commands/jo-duchan/tapflow/compound
Clone the repo
git clone --depth 1 https://github.com/jo-duchan/tapflow

Made for: Claude Code.

Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 416 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.00057 $0.00416
Opus 5 $0.00028 $0.00208
Sonnet 5 $0.00011 $0.00083
Haiku 4.5 $0.00006 $0.00042

Measured yesterday against content hash 1a2cc0f53a8c, 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 yesterday.

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.

.claude/commands/compound.md · 35 lines

What it actually says

현재 대화와 작업 맥락을 분석해 재사용 가능한 패턴을 추출하고, 기존 문서를 업데이트한다.

절차

  1. 패턴 식별 — 이번 작업에서 반복 사용될 가능성이 있는 것을 파악한다.

    • 테스트 픽스처 / 헬퍼 함수 패턴
    • 자주 쓰는 프롬프트 구조
    • 설계 결정 및 그 이유 (ADR)
    • 피해야 할 안티패턴
  2. 업데이트 대상 결정 — 새 파일은 만들지 않는다. 아래 우선순위로 기존 파일을 수정한다.

    • 현재 작업 중인 .work/*.md 문서 → ## Compound 섹션 추가 또는 갱신
    • 관련 패키지의 packages/{pkg}/AGENTS.md → 해당 규칙 섹션에 추가
    • 프로젝트 루트 AGENTS.md → 전체에 적용되는 패턴만
  3. 업데이트 내용 작성 — 각 패턴을 아래 형식으로 기록한다.

    ### {패턴 이름}
    **언제**: 어떤 상황에서 쓰는가
    **방법**: 코드 스니펫 또는 절차
    **이유**: 왜 이 방식을 선택했는가
    
  4. 변경 사항 요약 — 어떤 파일의 어느 섹션을 수정했는지 간략히 보고한다.

제약

  • .work/ 파일을 생성하지 않는다.
  • 기존 내용을 삭제하거나 구조를 바꾸지 않는다. 추가만 한다.
  • 명백히 이번 작업에만 해당하는 일회성 내용은 기록하지 않는다.
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. yesterday First seen · 35 lines · 57 tokens per session scan A 1a2cc0f53a8c

Subscribe to this mod's changes

compound is a command published in the GitHub repository jo-duchan/tapflow (536 stars, last pushed 2d ago), licensed MIT. It adds 57 tokens to every session and 416 once invoked, about $0.0003 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.