‹ 首页

compound

@oliver-kriska · 收录于 4 天前 · 上游提交 4 天前

Capture solved problems as searchable solution docs. Use after fixing bugs, when "that worked", or after successful /phx:review or /phx:investigate.

适合你,如果你常遇到相同技术问题并想积累经验库

/ 通过 npx 安装 校验哈希
npx oh-my-skill add oliver-kriska/claude-elixir-phoenix/compound
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- oliver-kriska/claude-elixir-phoenix/compound
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify oliver-kriska/claude-elixir-phoenix/compound
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
503GitHub stars
~811最小装载
~811含声明引用
~1.5K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 88c1194 · 表述以原文为准
它做什么

修复问题后,Claude会将解决方案保存为可搜索的文档,供未来参考。

什么时候触发

修复Bug后、你说“问题解决了”时,或成功执行/phx:review或/phx:investigate后触发。

装好后可以这样说
Claude会创建解决方案文档。
同上。
Claude自动从当前会话提取上下文。
技能原文 SKILL.md作者撰写 · MIT · 88c1194

Compound — Capture Solutions as Knowledge

After fixing a problem, capture the solution as searchable institutional documentation.

Usage
/phx:compound Fixed N+1 query in user listing
/phx:compound Resolved LiveView timeout in dashboard
/phx:compound   # Auto-detects from recent session context
Philosophy
Each unit of engineering work should make subsequent units easier — not harder.
Workflow
Step 1: Detect Context
  1. If $ARGUMENTS provided, use as description
  2. If no args, check scratchpad DEAD-END/DECISION entries, git diff, .claude/plans/{slug}/progress.md for recent completions
  3. If unclear, ask: "What problem did you just solve?"

Only document non-trivial problems that required investigation.

Step 2: Search Existing Solutions

Create .claude/solutions/ directory if it doesn't exist (run mkdir -p .claude/solutions). Then search .claude/solutions/ for relevant keywords using Grep.

If found: Create new (different root cause), Update existing (same root cause, new symptom), or Skip.

Step 3: Gather Details and Create Solution

Extract from session context: module, symptoms, investigation steps, root cause, solution code, and prevention advice.

Validate frontmatter against ${CLAUDE_PLUGIN_ROOT}/skills/compound-docs/references/schema.md, then create file using ${CLAUDE_PLUGIN_ROOT}/skills/compound-docs/references/resolution-template.md.

Write-blocked fallback: if writing to .claude/solutions/ is denied by permissions, do NOT silently drop the solution. Output the full solution doc inline (fenced markdown the user can paste), then suggest /phx:permissions to allow .claude/solutions/ writes for next time.

Step 4: Decision Menu
  1. Continue (default)
  2. Promote to Iron Law check — Add to iron-law-judge
  3. Update skill reference — Add to relevant skill
  4. Update CLAUDE.md — Add prevention rule
Auto-Trigger Phrases

When user says "that worked", "it's fixed", "problem solved", "the fix was" — suggest /phx:compound.

Supply-chain finding auto-feed (Phase 3)

When /phx:deps-audit produces a BLOCK-severity finding that the user investigates and confirms is a real malicious pattern (not a false positive), suggest:

Caught a high-severity finding in <pkg>@<version>. Run /phx:compound to capture this for future audits?

If accepted, the resulting solution doc goes to .claude/solutions/supply-chain/<pkg>-<cve_or_pattern>.md and includes the exact rule-id + snippet + diff window that triggered the finding. This compounds the audit corpus: future runs of /phx:deps-audit grep solutions/supply-chain/ for snippet matches and pre-elevate severity on known-bad patterns.

Always prompt; never auto-write. Solution docs are durable and shape future trust calls — the user reviews before committing.

Iron Laws
  1. YAML frontmatter validates or STOP
  2. Symptoms must be specific — not "it broke"
  3. Root cause is WHY, not WHAT
  4. One problem per file
  5. NEVER document a fix before verifying it works — run mix compile && mix test first; unverified solutions poison the knowledge base
Integration with Workflow
/phx:review → Complete → /phx:compound  ← YOU ARE HERE
                              │
                 .claude/solutions/{category}/{fix}.md
                              │
              /phx:investigate and /phx:plan search here
References
  • ${CLAUDE_SKILL_DIR}/references/compound-workflow.md — Detailed step-by-step
  • See also: compound-docs skill for schema and templates
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。