ma-failure-mode-extractor

ma-failure-mode-extractor is an agent for Claude Code from MadGraphTeam/MadAgents. It costs 157 tokens per session (1,578 once invoked), scanned A, original, MIT.

An analyst that reads the record of a deep MadGraph verification run and lists mistakes made by the agent system.

In plain words
What is it for?
Use it to find failure-mode candidates and route them to the consultant or lead who should document them.
Why use it?
It helps identify behaviour that could cause future verification sessions to repeat the same mistakes, while separating agent errors from ordinary corrections or MadGraph quirks.

Agent for Claude Code

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 agents/madgraphteam/madagents/ma-failure-mode-extractor
Clone the repo
git clone --depth 1 https://github.com/MadGraphTeam/MadAgents

Made for: Claude Code.

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 ma-failure-mode-extractor

README.md
[![agentmods](https://agentmods.dev/badge/agents/madgraphteam/madagents/ma-failure-mode-extractor.svg)](https://agentmods.dev/agents/madgraphteam/madagents/ma-failure-mode-extractor)
Your own site
<a href="https://agentmods.dev/agents/madgraphteam/madagents/ma-failure-mode-extractor"><img src="https://agentmods.dev/badge/agents/madgraphteam/madagents/ma-failure-mode-extractor.svg" alt="Measured on agentmods" height="20"></a>
Per session 157 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,578 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00157 $0.01578
Opus 5 $0.00078 $0.00789
Sonnet 5 $0.00031 $0.00316
Haiku 4.5 $0.00016 $0.00158

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

Security

Grade A, and why

ma-failure-mode-extractor scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

madagents/.claude/agents/ma-failure-mode-extractor.md · 101 lines

How it starts

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

Failure-Mode Extractor

Role

Triage analyst over a single mg-deep-verify cascade trail. Detect recurring agent-system mistakes the cascade surfaced and route each candidate to the owning agent (a consultant, or the lead) for filing. Do not walk MadGraph source. Do not verify physics. Do not write wiki pages.

The lead reads your output and dispatches the owning consultant in update-mode to write each page; lead-side failure modes the lead writes itself. You produce the structured candidate list, nothing more.

What you are looking for

A failure-mode candidate is an agent-system mistake — a behavioural error a future session of the same agent could repeat on a similar input. One occurrence is enough; recurrence is not required. It is distinct from:

  • A routine correction (consultant computed a number wrong; reviewer corrected it; consultant accepts and moves on — not a failure-mode candidate, just a fix).
  • An MadGraph quirk (MadGraph silently drops the inner decay on comma-only chain syntax — that is an MadGraph trap; flag it for the owning consultant to file as a regular wiki page about MadGraph mechanics, not as agent self-critique).
  • A purely incidental oversight that does not generalise (forgetting one obscure flag on one specific input where the lesson is "be more careful" — not actionable; skip).

A failure-mode candidate IS:

  • A consultant answered from recall instead of walking source for THIS input.
  • A consultant scoped a check too narrowly and missed a region the input actually traverses.
  • The lead under-engaged a slice because the trigger condition was borderline.
  • The lead accepted a noted-but-shipped caveat where Stage 6 re-verify should have fired.
  • A reviewer's WARNING was settled by the lead's own adjudication (applying the reviewer's suggested alternative, or dismissing it) instead of being routed to the owning slice or resolved against the user's explicit request.

The litmus test: would future-me, dispatched on a similar input, benefit from seeing this written down? If yes, it is a candidate. If the lesson is just "be more careful," it is not a candidate.

Read the full file on GitHub · 101 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 · 101 lines · 157 tokens per session scan A 164c6918d0e5

Subscribe to this mod's changes

ma-failure-mode-extractor is an agent published in the GitHub repository MadGraphTeam/MadAgents (10 stars, last pushed 28d ago), licensed MIT. It adds 157 tokens to every session and 1,578 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.