一键导入
compound
Capture knowledge from development sessions. Debug patterns, architecture decisions, framework gotchas, and integration learnings compound over time.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Capture knowledge from development sessions. Debug patterns, architecture decisions, framework gotchas, and integration learnings compound over time.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Cross-project audit and sync. Backs up, bootstraps, promotes, syncs, and verifies all downstream projects.
Structured pre-planning research. Explores codebase, asks clarifying questions, and produces a brainstorm output file for /plan-feature input.
Load project context and show current status. Use at the start of a session or when context is needed.
Run parallel code reviews using specialized agents (security, performance, simplicity, nextjs-react). Produces a structured report.
Initialize a new project from Agent Kit boilerplate. Use when creating a new downstream project.
Pre-Production Security & Quality Check with Strix AI. Use BEFORE deploying to production to catch vulnerabilities and issues.
| name | compound |
| description | Capture knowledge from development sessions. Debug patterns, architecture decisions, framework gotchas, and integration learnings compound over time. |
Capture knowledge during development so it compounds over time. Every debug session, architecture decision, and framework gotcha becomes reusable knowledge for future sessions.
Principle: Knowledge that stays in a conversation dies with the context window. Knowledge that gets written down compounds.
/compound debug convex-id-type-mismatch/compound decision portkey-over-direct-api/compound gotcha nextjs-middleware-edge-only/compound pattern convex-batch-fetch/compound integration mastra-convex-webhookAgent should also suggest /compound after:
/compound <type> <title>
| Type | Target File | Purpose |
|---|---|---|
debug | .claude/reference/debug-patterns.md | What broke, why, how fixed |
decision | .claude/reference/architecture-decisions.md | Why X over Y |
gotcha | Relevant existing reference doc | Framework-specific traps |
pattern | Relevant existing reference doc | Reusable code patterns |
integration | .claude/reference/architecture.md | How services connect |
Ask the agent (or user) for the key details:
For debug:
1. What was the symptom?
2. What was the root cause?
3. How was it fixed?
4. How to detect this earlier next time?
For decision:
1. What was the question?
2. What options were considered?
3. What was chosen and why?
4. What would change this decision?
For gotcha:
1. What was expected?
2. What actually happened?
3. Why? (underlying reason)
4. How to avoid it?
For pattern:
1. What problem does this solve?
2. Show the pattern (code example)
3. When to use / when not to use
For integration:
1. Which services?
2. How do they connect? (API, webhook, shared DB)
3. What data flows between them?
4. Failure modes and recovery
Append to the appropriate reference doc using a consistent format:
### {Title}
**Added:** YYYY-MM-DD
**Context:** {One-line context}
{Content based on type — see templates below}
If the target doc doesn't exist, create it.
### {Title}
**Added:** YYYY-MM-DD
**Symptom:** {What you saw}
**Root Cause:** {Why it happened}
**Fix:** {What resolved it}
**Detection:** {How to catch this earlier — grep pattern, lint rule, test}
### {Title}
**Added:** YYYY-MM-DD
**Question:** {What needed deciding}
**Decision:** {What was chosen}
**Alternatives:** {What was rejected}
**Rationale:** {Why this choice}
**Revisit When:** {Conditions that would change this}
### {Title}
**Added:** YYYY-MM-DD
**Expected:** {What you thought would happen}
**Actual:** {What happened}
**Why:** {Root cause}
**Fix:** {How to avoid}
### {Title}
**Added:** YYYY-MM-DD
**Problem:** {What this solves}
**Pattern:**
\`\`\`typescript
// Example code
\`\`\`
**When to use:** {Conditions}
**When NOT to use:** {Anti-conditions}
### {Title}
**Added:** YYYY-MM-DD
**Services:** {Service A <-> Service B}
**Connection:** {HTTP API / webhook / shared DB / message queue}
**Data Flow:** {What data, which direction}
**Failure Mode:** {What happens when it breaks}
**Recovery:** {How to recover}
After writing, show:
KNOWLEDGE CAPTURED
----------------------------------------------------------------------
Type: {debug|decision|gotcha|pattern|integration}
Title: {title}
File: {path to reference doc}
This knowledge will be available in all future sessions.
----------------------------------------------------------------------
| File | Content |
|---|---|
.claude/reference/debug-patterns.md | Recurring bugs and their fixes |
.claude/reference/architecture-decisions.md | Why we chose X over Y |
.claude/reference/convex-patterns.md | Convex-specific patterns (exists) |
.claude/reference/nextjs-best-practices.md | Next.js patterns (exists) |
.claude/reference/react-patterns.md | React patterns (exists) |
.claude/reference/mastra-best-practices.md | Mastra patterns (exists) |
.claude/reference/architecture.md | Integration learnings (exists) |
Rule: Prefer appending to existing reference docs over creating new files. Only create a new file if no existing doc covers the topic.
The agent SHOULD proactively suggest /compound in these scenarios:
After a debug session:
"That was a non-obvious fix. Want to capture it? /compound debug {title}"
After a decision:
"We just decided on X. Want to record why? /compound decision {title}"
After hitting a gotcha:
"This framework behavior wasn't obvious. Capture it? /compound gotcha {title}"
/compound debug convex-collect-find-table-scan
/compound decision portkey-self-hosted
/compound gotcha mastra-studio-import-error
/compound pattern convex-batch-fetch-map
/compound integration frontend-mastra-brain-api