debugging-test-failures

debugging-test-failures is a skill for Claude Code, Codex from dork-labs/dorkos. It costs 38 tokens per session (459 once invoked), scanned A, original, MIT.

A method for finding the real cause of failing tests and fixing it with evidence-based checks.

In plain words
What is it for?
Use it to run focused tests, read failures, trace the related code, apply a minimal fix, and verify the result.
Why use it?
It prevents blind changes by separating problems in the application from problems in the test, mocks, or setup.

Skill for Claude CodeCodex

Part of the flow plugin — 17 skills, 37 commands, 5 agents shipped together

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/dork-labs/dorkos/debugging-test-failures
Any agent
npx skills add dork-labs/dorkos --skill debugging-test-failures
Clone the repo
git clone --depth 1 https://github.com/dork-labs/dorkos

Made for: Claude Code, Codex.

Or install flow, the plugin that ships this one along with the rest of its 17 skills, 37 commands, 5 agents.

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 debugging-test-failures

README.md
[![agentmods](https://agentmods.dev/badge/skills/dork-labs/dorkos/debugging-test-failures.svg)](https://agentmods.dev/skills/dork-labs/dorkos/debugging-test-failures)
Your own site
<a href="https://agentmods.dev/skills/dork-labs/dorkos/debugging-test-failures"><img src="https://agentmods.dev/badge/skills/dork-labs/dorkos/debugging-test-failures.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 459 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.00038 $0.00459
Opus 5 $0.00019 $0.00230
Sonnet 5 $0.00008 $0.00092
Haiku 4.5 $0.00004 $0.00046

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

Security

Grade A, and why

debugging-test-failures 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 4d 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.

.agents/skills/debugging-test-failures/SKILL.md · 59 lines

What it actually says

Debugging Test Failures

Overview

This is the shared-skill replacement for the legacy Claude Code /debug:test workflow.

Use it when tests are failing and the goal is to identify the real root cause instead of making blind changes.

Read First

Before acting, read:

  • .agents/skills/debugging-systematically/SKILL.md
  • .claude/skills/test-driven-development/SKILL.md when the failing test is tied to new feature work or a bugfix

Core Workflow

  1. Run the relevant test scope
    • one file or one pattern when possible
    • whole-suite only when needed
  2. Parse the failure output
    • failing test names
    • expected vs actual behavior
    • error messages and stack traces
  3. Read the failing test first
    • understand arrange / act / assert
    • explain what the test is trying to prove
  4. Read the implementation under test
    • trace inputs, transformations, and outputs
  5. Decide where the bug lives
    • implementation
    • test logic
    • mock/setup
    • broader shared root cause
  6. Apply a minimal fix
    • fix the real problem, not just the symptom
  7. Re-run verification
    • the failing test
    • nearby tests when relevant

Decision Heuristics

  • Prefer implementation fixes when the test encodes correct expected behavior.
  • Prefer test fixes when the implementation is correct and the test is asserting the wrong thing.
  • If multiple failures share one cause, fix the root cause before touching individual assertions.
  • If the test never demonstrated a correct RED state, repair the test before trusting it.

Cross-Agent Rules

  • Treat this skill as the portable replacement for /debug:test.
  • Keep a short execution plan, but do not depend on a tool-specific todo API.
  • Ask bounded clarification only if multiple failure scopes or fix strategies are materially different.
  • Always end with real verification, not reasoning alone.
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. 4d ago First seen · 59 lines · 38 tokens per session scan A 5a1598963fb6

Subscribe to this mod's changes

debugging-test-failures is a skill published in the GitHub repository dork-labs/dorkos (9 stars, last pushed today), licensed MIT. It adds 38 tokens to every session and 459 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-31.