# Compound

Capture solved problems as searchable solution docs.

- Repository: https://github.com/oliver-kriska/claude-elixir-phoenix (572 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add oliver-kriska/claude-elixir-phoenix --skill compound -g -a claude-code -y`
Codex: `npx skills add oliver-kriska/claude-elixir-phoenix --skill compound -g -a codex -y`
Cursor: `npx skills add oliver-kriska/claude-elixir-phoenix --skill compound -g -a cursor -y`
Gemini CLI: `npx skills add oliver-kriska/claude-elixir-phoenix --skill compound -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add oliver-kriska/claude-elixir-phoenix`

## Description

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

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

The rest: https://github.com/oliver-kriska/claude-elixir-phoenix/blob/HEAD/plugins/elixir-phoenix/skills/compound/SKILL.md
