No slash command · from beagle-elixir
Enforces mandatory verification steps before reporting code review findings to reduce false positives. Includes anti-confabulation, read, evidence, usage, cross-cutting, and severity gates. For Elixir/OTP/Phoenix/LiveView.
Ships in beagle-elixir. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This protocol MUST be followed before reporting any code review finding. Skipping these steps leads to false positives that waste developer time and erode trust in reviews.
For Elixir/OTP/Phoenix/LiveView files, apply the gates below first; the issue-type and cross-stack sections apply when the reviewed code uses those stacks or patterns.
Before issuing any verdict — flag, reject, or downgrade a finding — you MUST echo the exact artifact you are judging, quoted from a source you read in this turn:
The artifact is the only source of truth. Never infer what you are reviewing from the branch name, the working directory, surrounding files, or recollection. If your mental model differs from the freshly read source, the source wins. A verdict issued without a same-turn echo of its target is invalid — emit the echo first, or do not emit the verdict.
This gate exists because an LLM under contextual priming will confidently flag code that is not in the file. It runs before the hard gates below.
Do not report a finding until each relevant gate passes for that finding. A gate passes only when the pass condition is objectively satisfied (tool output, cited path:line), not when it “feels” verified.
path:line (or line range) that you can tie to actual file content from a read/search tool in this session.apply, MFA strings, config) or explicitly mark uncertainty as a question, not a defect.If you cannot pass a gate, omit the finding, downgrade per Severity Calibration, or ask a question instead of asserting a defect.
Before flagging ANY issue, verify (maps to Hard gates):
path:line from tool-backed contentBefore flagging, you MUST:
Common false positives:
Before flagging, you MUST:
Common false positives:
Before flagging, you MUST:
Valid patterns often flagged incorrectly:
# Pattern matching, NOT type casting
%UserData{} = data = load_user()
# Guard clauses narrow the type safely
def process(%User{name: name} = user) do
name # Elixir knows this is a User struct
end
Before flagging, you MUST:
Common false positives:
Before flagging, you MUST:
Do NOT flag:
ONLY use for:
Use for:
Use for:
Use for:
These are NOT review blockers. They should be noted for the author's awareness but must not appear in the actionable issue count. The Verdict should ignore informational items entirely.
| Pattern | Why It's Valid |
|---|---|
case with multiple clauses | Standard pattern matching, not excessive branching |
with chains | Idiomatic for sequential operations that may fail |
Pipe operator (|>) chains | Elixir's core composition pattern |
@spec without Dialyzer enforcement | Documentation value even without static analysis |
defp private functions | Proper encapsulation, not hidden complexity |
| Pattern | Why It's Valid |
|---|---|
assign/2 in mount/3 | Standard LiveView state initialization |
handle_event/3 returning {:noreply, socket} | Correct for UI-triggered state updates |
~H sigil for inline templates | Valid for small components |
on_mount hooks | Correct lifecycle pattern for auth/setup |
| PubSub broadcasts in handle_info | Standard real-time communication pattern |
| Pattern | Why It's Valid |
|---|---|
assert without message | ExUnit provides clear diff output |
setup block for test context | Standard ExUnit fixture pattern |
describe blocks for grouping | Idiomatic test organization |
conn pipeline in controller tests | Phoenix test helper convention |
| Pattern | Why It's Valid |
|---|---|
+? lazy quantifier in regex | Prevents over-matching, correct for many patterns |
| Direct string concatenation | Simpler than template literals for simple cases |
| Multiple returns in function | Can improve readability |
| Comments explaining "why" | Better than no comments |
Flag missing pattern match ONLY IF ALL of these are true:
Flag missing supervision ONLY IF:
Flag missing error handling ONLY IF:
with clause handles the error caseFinal verification: 0. For each finding, confirm the Hard gates that apply to its type were passed (or the finding was downgraded/removed).
[FILE:LINE] ISSUE_TITLEIf uncertain about any finding, either:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
code-review, false-positives, verification-protocol, elixir, phoenix, liveview
npx claudepluginhub existential-birds/beagle --plugin beagle-elixir11 skills in this plugin
/elixir-code-reviewReviews Elixir code for idiomatic patterns, OTP basics, and documentation. Use when reviewing .ex/.exs files, checking pattern matching, GenServer usage, or module documentation./elixir-docs-reviewReviews Elixir documentation for completeness, quality, and ExDoc best practices. Use when auditing @moduledoc, @doc, @spec coverage, doctest correctness, and cross-reference usage in .ex files./elixir-performance-reviewReviews Elixir code for performance issues including GenServer bottlenecks, memory usage, and concurrency patterns. Use when reviewing high-throughput code or investigating performance issues./elixir-security-reviewReviews Elixir code for security vulnerabilities including code injection, atom exhaustion, and secret handling. Use when reviewing code handling user input, external data, or sensitive configuration./elixir-writing-docsGuides writing Elixir documentation with @moduledoc, @doc, @typedoc, doctests, cross-references, and metadata. Use when adding or improving documentation in .ex files./exdoc-configConfigures ExDoc for Elixir projects including mix.exs setup, extras, groups, cheatsheets, and livebooks. Use when setting up or modifying ExDoc documentation generation.Other plugins' skills for the same job