Agent skill

phx:compound

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

Stars 252
Forks 17

Install this agent skill to your Project

npx add-skill https://github.com/oliver-kriska/claude-elixir-phoenix/tree/main/plugins/elixir-phoenix/skills/compound

SKILL.md

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 compound-docs/references/schema.md, then create file using compound-docs/references/resolution-template.md.

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.

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

text
/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

Expand your agent's capabilities with these related and highly-rated skills.

oliver-kriska/claude-elixir-phoenix

lab:autoresearch

Self-improving loop for plugin skills. Reads program.md, proposes one mutation per iteration, evaluates against deterministic scorer, keeps improvements via git, reverts failures. Targets weakest skill+dimension. Use with /loop for overnight runs.

252 17
Explore
oliver-kriska/claude-elixir-phoenix

promote

Generate X/Twitter release promotion posts with ASCII tables and CodeSnap rendering. Use when writing release posts, promotion tweets, plugin announcements, or preparing social media content for new versions.

252 17
Explore
oliver-kriska/claude-elixir-phoenix

skill-monitor

Analyze skill effectiveness across sessions. Computes per-skill metrics (action rate, friction, outcomes), identifies degrading skills, and generates improvement recommendations. Requires session-scan data in metrics.jsonl.

252 17
Explore
oliver-kriska/claude-elixir-phoenix

session-trends

Analyze trends across session metrics. Computes windowed aggregates, deltas, and compares against MEMORY.md findings. Use periodically for progress tracking.

252 17
Explore
oliver-kriska/claude-elixir-phoenix

cc-changelog

CONTRIBUTOR TOOL - Track CC changelog, extract new versions since last check, analyze impact on plugin (breaking changes, opportunities, deprecations). Run periodically or before releases. NOT part of the distributed plugin.

252 17
Explore
oliver-kriska/claude-elixir-phoenix

session-scan

Compute metrics for Claude Code sessions. Discovers via ccrider, filters trivial, computes friction/opportunity/fingerprint scores. Use for broad session triage.

252 17
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results