elixir-root-cause-only

elixir-root-cause-only is a skill for Claude Code, Codex from mkreyman/bmad-elixir. It costs 41 tokens per session (3,518 once invoked), scanned A, original, MIT.

A debugging method that traces an error back to its underlying cause before any code is changed.

In plain words
What is it for?
Use it when diagnosing software errors or unexpected behaviour, especially in Elixir projects where the visible failure may originate in another module or environment.
Why use it?
It prevents random changes and symptom-level patches by requiring a repeatable reproduction, one change at a time, and verification of the result.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mkreyman/bmad-elixir/elixir-root-cause-only
Any agent
npx skills add mkreyman/bmad-elixir --skill elixir-root-cause-only
Clone the repo
git clone --depth 1 https://github.com/mkreyman/bmad-elixir

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for elixir-root-cause-only

README.md
[![agentmods](https://agentmods.dev/badge/skills/mkreyman/bmad-elixir/elixir-root-cause-only.svg)](https://agentmods.dev/skills/mkreyman/bmad-elixir/elixir-root-cause-only)
Your own site
<a href="https://agentmods.dev/skills/mkreyman/bmad-elixir/elixir-root-cause-only"><img src="https://agentmods.dev/badge/skills/mkreyman/bmad-elixir/elixir-root-cause-only.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,518 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00041 $0.03518
Opus 5 $0.00020 $0.01759
Sonnet 5 $0.00008 $0.00704
Haiku 4.5 $0.00004 $0.00352

Measured 3d ago against content hash ef6b616902c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

elixir-root-cause-only scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

$ curl localhost:4000/users
priv/skills/elixir-root-cause-only/SKILL.md · 552 lines

How it starts

The opening of the file, as written. The whole thing — 552 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Elixir Root Cause Only: No Random Fixes

THE IRON LAW

NEVER fix symptoms. ALWAYS trace to the root cause.

No guessing. No "try this". No random changes. No symptom fixes.

TRACE. UNDERSTAND. FIX. VERIFY.

ABSOLUTE PROHIBITIONS

You are NEVER allowed to:

  1. Propose random fixes

    • "Try adding this import"
    • "Maybe change this to that"
    • "Let's see if this works"
    • "Could you try restarting the server?"
  2. Fix where error appears

    • Error appears in module A
    • Root cause is in module B
    • Don't just patch module A
  3. Make multiple changes at once

    • Change A + B + C together
    • Now you don't know which one fixed it
    • Make ONE change, verify, repeat
  4. Skip understanding

    • "I don't know why, but this fixes it"
    • If you don't know why, it's not fixed
    • Understanding is mandatory
  5. Accept "works on my machine"

    • Reproducibility is required
    • Environmental differences matter
    • Document exact reproduction steps

THE 4-PHASE DEBUGGING PROCESS

Phase 1: REPRODUCE

Objective: Get consistent, repeatable reproduction.

# Required steps:
1. Identify exact steps to trigger the issue
2. Run those steps
3. Confirm issue appears
4. Document steps precisely
5. Verify it reproduces every time

Output required:

## Reproduction Steps

1. Run `mix test test/my_app/accounts_test.exs:42`
2. Error appears: "undefined function User.changeset/2"
3. Reproduces 100% of the time
4. Environment: Elixir 1.15.7, OTP 26

CHECKPOINT: Cannot proceed to Phase 2 until you have consistent reproduction.

Phase 2: TRACE

Objective: Follow the error back to its origin.

# Tracing questions:
1. What function fails?
2. What called that function?
3. What called THAT function?
4. Where did the bad data/state originate?
5. What's the first point where things went wrong?

Tracing tools:

# 1. Add IO.inspect to see data flow
def create_user(attrs) do
  attrs
  |> IO.inspect(label: "Input attrs")
  |> User.changeset(%User{})
  |> IO.inspect(label: "Changeset")
  |> Repo.insert()
end

# 2. Use IEx.pry for interactive debugging
def create_user(attrs) do
  require IEx; IEx.pry()
  # Execution pauses here
  User.changeset(%User{}, attrs)
  |> Repo.insert()
end

# 3. Check the stack trace completely
** (UndefinedFunctionError) function User.changeset/2 is undefined
    (my_app 0.1.0) lib/my_app/accounts/user.ex:42: User.changeset/2
    (my_app 0.1.0) lib/my_app/accounts.ex:15: MyApp.Accounts.create_user/1
    test/my_app/accounts_test.exs:25: (test)

Read the full file on GitHub · 552 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 552 lines · 41 tokens per session scan A ef6b616902c0

Subscribe to this mod's changes

elixir-root-cause-only is a skill published in the GitHub repository mkreyman/bmad-elixir (10 stars, last pushed 10mo ago), licensed MIT. It adds 41 tokens to every session and 3,518 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens