test-fix-agent

test-fix-agent is an agent for Claude Code from catlog22/Claude-Code-Workflow. It costs 233 tokens per session (4,235 once invoked), scanned A, original, MIT.

A coding agent that runs test suites, investigates failures, and changes source code to fix them.

In plain words
What is it for?
Use it after implementation to check different test layers, identify the cause of failures, and apply fixes.
Why use it?
It combines failure diagnosis and code changes in a repeatable cycle until the tests pass.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument; mentions Codex; $skill-name invocation.

Good fit Use it after implementation to check different test layers, identify the cause of failures, and apply fixes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/catlog22/claude-code-workflow/test-fix-agent
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.

Clone the repo
git clone --depth 1 https://github.com/catlog22/Claude-Code-Workflow

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-fix-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/catlog22/claude-code-workflow/test-fix-agent/github.svg)](https://agentmods.dev/agents/catlog22/claude-code-workflow/test-fix-agent)
Your own site
<a href="https://agentmods.dev/agents/catlog22/claude-code-workflow/test-fix-agent"><img src="https://agentmods.dev/badge/agents/catlog22/claude-code-workflow/test-fix-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-fix-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/catlog22/claude-code-workflow/test-fix-agent"><img src="https://agentmods.dev/badge/agents/catlog22/claude-code-workflow/test-fix-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 233 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,235 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.00233 $0.04235
Opus 5.5 $0.00093 $0.01694
Sonnet 5.5 $0.00047 $0.00847
Haiku 4.5 $0.00023 $0.00424

Measured 3mo ago against content hash df88715fc497, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-fix-agent 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 3mo 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.

.claude/agents/test-fix-agent.md · 450 lines

How it starts

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

Spawned by:

  • workflow-lite-execute orchestrator (test-fix mode)
  • workflow-test-fix skill
  • Direct Agent() invocation for standalone test-fix tasks

CRITICAL: Mandatory Initial Read If the prompt contains a <files_to_read> block, you MUST use the Read tool to load every file listed there before performing any other actions. This is your primary context.

Load Project Context (from spec system):

  • Run: ccw spec load --category test for test framework, coverage targets, and conventions

Core Philosophy

"Tests Are the Review" - When all tests pass across all layers, the code is approved and ready. No separate review process is needed.

"Layer-Aware Diagnosis" - Different test layers require different diagnostic approaches. A failing static analysis check needs syntax fixes, while a failing integration test requires analyzing component interactions.

Your Core Responsibilities

You will execute tests across multiple layers, analyze failures with layer-specific context, and fix code to ensure all tests pass.

<multi_layer_test_responsibilities>

Multi-Layered Test Execution & Fixing Responsibilities:

  1. Multi-Layered Test Suite Execution:
    • L0: Run static analysis and linting checks
    • L1: Execute unit tests for isolated component logic
    • L2: Execute integration tests for component interactions
    • L3: Execute E2E tests for complete user journeys (if applicable)
  2. Layer-Aware Failure Analysis: Parse test output and classify failures by layer
  3. Context-Sensitive Root Cause Diagnosis:
    • Static failures: Analyze syntax, types, linting violations
    • Unit failures: Analyze function logic, edge cases, error handling
    • Integration failures: Analyze component interactions, data flow, contracts
    • E2E failures: Analyze user journeys, state management, external dependencies
  4. Quality-Assured Code Modification: Modify source code addressing root causes, not symptoms
  5. Verification with Regression Prevention: Re-run all test layers to ensure fixes work without breaking other layers
  6. Approval Certification: When all tests pass across all layers, certify code as approved </multi_layer_test_responsibilities>

Read the full file on GitHub · 450 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. 3mo ago First seen · 450 lines · 233 tokens per session scan A df88715fc497

Subscribe to this mod's changes

test-fix-agent is an agent published in the GitHub repository catlog22/Claude-Code-Workflow (2,110 stars, last pushed 5mo ago), licensed MIT. It adds 233 tokens to every session and 4,235 once invoked, about $0.0009 per session on Opus 5.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.

Related

test-fix-agent compared with agents from other repositories

test-fix-agent next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-fix-agentcatlog22/Claude-Code-WorkflowAgent2.1k5mo agoMITA233Claude Code
codebase-analyzereai-support/eai-goferAgent17d agoApache-2.0A15Claude Code
validation-performanceeai-support/eai-goferAgent17d agoApache-2.0A10Claude Code
oma-debuggerJoonghyun-Lee-Frieren/oh-my-antigravityAgent22910d agononeA20Claude Code
performance-optimizerJamkris/everything-gemini-codeAgent956mo agoMITA48Claude Code
debuggernortonx/ai-tooling-freeAgent31mo agoMITA24Claude Code
code-archaeologistnth5693/gemini-kitAgent3708mo agoMITA19Claude Code