test-triage

test-triage is a skill for Claude Code from MuhammadUsmanGM/claude-code-best-practices. It costs 49 tokens per session (493 once invoked), scanned A, original, MIT.

A guide for investigating groups of failing automated tests. It classifies each failure as a real regression, a flaky test, an environment issue, or an outdated test.

In plain words
What is it for?
Use it when you have failing test output or CI failures and need one concrete next action for each test.
Why use it?
It helps distinguish broken code from tests that fail intermittently, depend on their environment, or no longer match the intended behavior.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it when you have failing test output or CI failures and need one concrete next action for each test.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/muhammadusmangm/claude-code-best-practices/test-triage
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.

Any agent
npx skills add MuhammadUsmanGM/claude-code-best-practices --skill test-triage
Clone the repo
git clone --depth 1 https://github.com/MuhammadUsmanGM/claude-code-best-practices

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 test-triage

README.md
[![agentmods](https://agentmods.dev/badge/skills/muhammadusmangm/claude-code-best-practices/test-triage.svg)](https://agentmods.dev/skills/muhammadusmangm/claude-code-best-practices/test-triage)
Your own site
<a href="https://agentmods.dev/skills/muhammadusmangm/claude-code-best-practices/test-triage"><img src="https://agentmods.dev/badge/skills/muhammadusmangm/claude-code-best-practices/test-triage.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 493 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00049 $0.00493
Opus 5 $0.00024 $0.00246
Sonnet 5 $0.00010 $0.00099
Haiku 4.5 $0.00005 $0.00049

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

Security

Grade A, and why

test-triage 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 8d 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.

examples/skills/test-triage/SKILL.md · 43 lines

What it actually says

Test Triage

Given a batch of failing tests, classify each and propose one concrete action per test.

Input sources

Prefer in this order:

  1. Test output the user pasted.
  2. A CI log file the user points at (Read it).
  3. Running the test suite locally — only if the user asks.

For each failing test

  1. Read the test file and the code under test.
  2. git log -5 --follow <test-file> and the same for the implementation. Look for changes in the last ~24h or the last PR.
  3. Classify:
    • Real regression — behavior under test changed in a recent commit, or the assertion is logically correct and the implementation is wrong.
    • Flaky — test depends on wall-clock time, ordering, network, randomness, shared global state, or external services without a stub.
    • Environmental — passes locally, fails in CI (or vice versa) due to missing env, OS differences, or toolchain versions.
    • Stale test — intended behavior changed; the test wasn't updated.
  4. Propose one action: fix the code, update the test, stub the dependency, add a retry with rationale, delete the test, reproduce locally with .

Output format

A table, one row per failing test:

Test Classification Likely cause Proposed action

Then, below the table, list the tests ranked by fix-first priority (real regressions > stale tests > environmental > flaky-with-high-frequency > low-frequency flakes).

Rules

  • Do not modify code or tests during triage. This skill only diagnoses.
  • If you can't classify a test in under ~90 seconds of investigation, mark it unknown and say what you'd need.
  • Flag any test that looks security-sensitive (auth, crypto, input validation) so the user doesn't wave it through as "flaky."
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. 8d ago First seen · 43 lines · 49 tokens per session scan A 3e5674cf6a08

Subscribe to this mod's changes

test-triage is a skill published in the GitHub repository MuhammadUsmanGM/claude-code-best-practices (79 stars, last pushed 2mo ago), licensed MIT. It adds 49 tokens to every session and 493 once invoked, about $0.0002 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-30.