oliver-kriska/claude-elixir-phoenix / targets/pi/skills/phx-investigate
phx-investigate
VerifiedInvestigate Elixir/Phoenix bugs root-cause first. Reproduce failures, cite evidence, and use optional Pi subagents only when useful.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.0 KB |
| references/debug-commands.md | markdown | 2.0 KB |
| references/error-patterns.md | markdown | 1.4 KB |
| references/investigation-template.md | markdown | 998 B |
references/error-patterns.md
View on GitHub# Error Patterns - Read Error LITERALLY
## Common Elixir/Phoenix Errors
| Error | Literal Meaning | Check |
|-------|-----------------|-------|
| `UndefinedFunctionError: MyMod.func/2` | Function doesn't exist with that arity | Is it `func/1` not `func/2`? |
| `KeyError: key :name not found` | Map doesn't have `:name` key | String key `"name"` instead? |
| `FunctionClauseError` | No pattern matched | `IO.inspect` the actual data |
| `(Ecto.NoResultsError)` | Query returned nil | Data doesn't exist in DB |
| `(Protocol.UndefinedError)` | Protocol not implemented | Wrong data type passed |
## Ralph Wiggum Checklist
Check systematically, or delegate to a generic read-only subagent if native Pi subagent tooling is available:
1. Is the file saved?
2. Atom vs string key mismatch?
3. Is data preloaded?
4. Is the pattern match correct?
5. Is nil being passed somewhere?
6. Is the return value correct (conn/socket)?
7. Did you restart the server?
## Temporary Diagnostics
Only when the user explicitly authorizes temporary source edits, add and later remove diagnostics such as:
```elixir
# Add to suspected location
|> IO.inspect(label: "DEBUG: data after transform")
```
## When Stuck
1. Inspect values through failing test output or an available safe runtime eval
2. Run a focused IEx expression without modifying source files
3. Trace reachability through existing logs or tests; source edits require approval
4. Compare the working and broken paths
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |