Claude-elixir-phoenix phx:compound
Capture solved problems as searchable solution docs. Use after fixing bugs, when "that worked", or after successful /phx:review or /phx:investigate.
install
source · Clone the upstream repo
git clone https://github.com/oliver-kriska/claude-elixir-phoenix
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/oliver-kriska/claude-elixir-phoenix "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/elixir-phoenix/skills/compound" ~/.claude/skills/oliver-kriska-claude-elixir-phoenix-phx-compound && rm -rf "$T"
manifest:
plugins/elixir-phoenix/skills/compound/SKILL.mdsource content
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
- If
provided, use as description$ARGUMENTS - If no args, check scratchpad DEAD-END/DECISION entries,
,git diff
for recent completions.claude/plans/{slug}/progress.md - 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
compound-docs/references/schema.md,
then create file using compound-docs/references/resolution-template.md.
Step 4: Decision Menu
- Continue (default)
- Promote to Iron Law check — Add to iron-law-judge
- Update skill reference — Add to relevant skill
- 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.
Iron Laws
- YAML frontmatter validates or STOP
- Symptoms must be specific — not "it broke"
- Root cause is WHY, not WHAT
- One problem per file
- NEVER document a fix before verifying it works — run
first; unverified solutions poison the knowledge basemix compile && mix test
Integration with Workflow
/phx:review → Complete → /phx:compound ← YOU ARE HERE │ .claude/solutions/{category}/{fix}.md │ /phx:investigate and /phx:plan search here
References
— Detailed step-by-step${CLAUDE_SKILL_DIR}/references/compound-workflow.md- See also:
skill for schema and templatescompound-docs