跳到主要内容
知仓学习社ZHICANG

phx-investigate

Investigate Elixir/Phoenix bugs root-cause first. Reproduce failures,

不碰外部(只输出文字)无严重或高危命中oliver-kriska/claude-elixir-phoenix

它会碰到什么

扫了多少4 个文本文件,8 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Investigate Bug

Investigate Elixir/Phoenix bugs root-cause first. Reproduce or establish the

failing behavior before recommending a fix, and cite concrete paths and lines.

Usage

/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 OpenCode subagent tooling is

available; it is an optimization, never a requirement.

Iron Laws

  1. Read the error literally first — extract the exception, message, failing

assertion, and first relevant application frame before theorizing.

  1. Check the obvious before going deep — compile errors, missing migrations,

atom/string mismatches, nil values, stale servers, and changeset errors explain

many failures.

  1. Reproduce before proposing a fix — run the smallest relevant test or

controlled command and record its output. If reproduction is impossible,

state exactly what evidence establishes the failure instead.

  1. Confirm the root cause with evidence — distinguish the observed failure,

the causal code path, and the proposed correction.

  1. Do not edit while investigating unless the user asks for a fix — the

investigation result is evidence and a recommendation, not an implicit patch.

Workflow

1. Consult Existing Evidence

Search .claude/solutions/, recent diffs, tests, logs, and the literal error.

Do not block if .claude/solutions/ does not exist.

2. Capture Runtime Context When Available

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.

3. Run Sanity Checks

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.

4. Reproduce Before Fixing

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.

5. Check the Obvious

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.

6. Trace and Test the Hypothesis

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 OpenCode 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.

7. Report

Use references/investigation-template.md. Include:

  • reproduction or evidence establishing the failure;
  • root cause, not merely the symptom;
  • relevant paths and lines;
  • confidence and any unverified assumptions;
  • the smallest safe fix or next diagnostic step.

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

  • references/error-patterns.md — common errors and checklist
  • references/investigation-template.md — output format
  • references/debug-commands.md — debug commands and common fixes

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 553
本站分层T2
该仓技能数322
原文件路径targets/opencode/skills/phx-investigate/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 322 个技能

同名技能的其他版本

有 5 个不同仓库或目录里都有叫 phx-investigate 的技能。它们内容并不相同,别混用: