# Investigate

Find the root cause of Elixir/Phoenix bugs, crashes, exceptions, stack traces, compile...

- 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 investigate -g -a claude-code -y`
Codex: `npx skills add oliver-kriska/claude-elixir-phoenix --skill investigate -g -a codex -y`
Cursor: `npx skills add oliver-kriska/claude-elixir-phoenix --skill investigate -g -a cursor -y`
Gemini CLI: `npx skills add oliver-kriska/claude-elixir-phoenix --skill investigate -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add oliver-kriska/claude-elixir-phoenix`

## Description

Find the root cause of Elixir/Phoenix bugs, crashes, exceptions, stack traces, compile errors, LiveView that won't update, silent failures. Use when something is broken or misbehaves. --parallel for 4 tracks.

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

# Investigate Bug

Investigate bugs using the Ralph Wiggum approach: check the
obvious, read errors literally.

## Usage

```
/phx:investigate Users can't log in after password reset
/phx:investigate FunctionClauseError in UserController.show
/phx:investigate Complex auth bug --parallel
```

## Arguments

`$ARGUMENTS` = Bug description or error message. Add `--parallel`
for deep 4-track investigation.

## Mode Selection

Use **parallel mode** (spawn `deep-bug-investigator`) when:
bug mentions 3+ modules, spans multiple contexts, is intermittent
or involves concurrency, or user says `--parallel`/`deep`.

Before spawning it, determine the effective maximum nesting depth. Use an
explicit positive-integer `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH` value first;
when it is unset, inspect `claude --version` (the default is 1 in 2.1.217, 2.1.218
and 3 in 2.1.219+). If the version is unavailable, conservatively use 1. At
depth 3+, use the `deep-bug-investigator` orchestrator. At depth 1 or 2, keep
orchestration in this main session: spawn the four
focused tracks (reproduction, root cause, impact, fix strategy) directly in
one parallel batch, wait for all four, then synthesize their evidence. Never
spawn an orchestrator that cannot delegate.

**Otherwise**: Run the sequential workflow below.

**Avoid confirmatory subagents**: once Steps 3-4 identify the root cause
with high confidence, present it directly, four subagents (~80K tokens)
re-verifying a finding already made in this context add cost, not evidence.

## Iron Laws

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