targets/codex/skills/phx-investigate/SKILL.md
Investigate Elixir/Phoenix bugs root-cause first. Reproduce failures, cite evidence, and use optional Codex subagents only when useful.
npx skillsauth add oliver-kriska/claude-elixir-phoenix phx-investigateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Investigate Elixir/Phoenix bugs root-cause first. Reproduce or establish the failing behavior before recommending a fix, and cite concrete paths and lines.
$phx-investigate Users can't log in after password reset
$phx-investigate FunctionClauseError in UserController.show
$phx-investigate Complex auth bug --parallel
Treat the text after the skill name as the bug description. --parallel asks
for independent investigation tracks when native Codex subagent tooling is
available; it is an optimization, never a requirement.
Search .claude/solutions/, recent diffs, tests, logs, and the literal error.
Do not block if .claude/solutions/ does not exist.
Tidewave is optional. If its tools are configured, use them for logs, source
locations, safe queries, or hypothesis checks. Otherwise use repository files,
mix commands, and local logs. Never fail or ask the user to install Tidewave
merely to continue an investigation.
Choose focused checks that fit the report, such as:
mix compile --warnings-as-errors
mix test test/path_test.exs --trace
Do not run migrations or other state-changing commands unless they are necessary, safe for the fixture, and authorized by the user.
Capture the exact command, failure, and relevant output. Read
references/error-patterns.md, then inspect only the code needed to trace the
failure from entry point to cause.
Check saved files, atom/string keys, preload state, pattern matches, nil values,
return values, server restarts, and changeset errors. For silent LiveView form
failures, inspect {:error, changeset} and rendered validation errors before JS.
Use targeted searches, source reads, tests, or non-mutating diagnostics. Only add
temporary source diagnostics if the user explicitly authorizes edits, and remove
them before reporting. Cite path:line evidence for both the failing behavior
and the causal code.
If native Codex subagents are available and the bug genuinely spans independent areas, delegate read-only tracks by concern. Otherwise perform the same tracks sequentially in this session. Do not require named custom agents.
Use references/investigation-template.md. Include:
Route follow-up work with $phx-quick, $phx-plan, or $phx-compound when
appropriate. Do not invoke another skill unless the user asks you to continue.
references/error-patterns.md — common errors and checklistreferences/investigation-template.md — output formatreferences/debug-commands.md — debug commands and common fixestools
Compatibility alias for the Elixir/Phoenix plugin's LiveView assigns audit. Invoke explicitly with /lv:assigns.
development
Trace Elixir call trees from entry points via mix xref. Use when debugging data flow, planning signature changes, or understanding how a bug reaches code.
tools
Compatibility alias for the Elixir/Phoenix plugin's N+1 query checker. Invoke explicitly with /ecto:n1-check.
tools
Compatibility alias for the Elixir/Phoenix plugin's Ecto constraint debugger. Invoke explicitly with /ecto:constraint-debug.