fix-test

fix-test is a skill for Claude Code, Codex from Smart-AI-Memory/attune-ai. It costs 47 tokens per session (574 once invoked), scanned A, original, Apache-2.0.

A process that investigates failing automated tests, identifies likely causes, and applies targeted fixes, rerunning the tests for up to three attempts. Automated tests are checks that verify software behaves as expected.

In plain words
What is it for?
Use it when a named test or an automatically discovered test is failing. It helps with errors such as missing modules, incorrect mocks, failed assertions, and changed constructors.
Why use it?
It turns a test failure into a repeatable diagnosis-and-fix process instead of requiring manual investigation from the start. Rerunning the tests checks whether each attempted fix worked.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

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/smart-ai-memory/attune-ai/fix-test
Any agent
npx skills add Smart-AI-Memory/attune-ai --skill fix-test
Clone the repo
git clone --depth 1 https://github.com/Smart-AI-Memory/attune-ai

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/smart-ai-memory/attune-ai/fix-test.svg)](https://agentmods.dev/skills/smart-ai-memory/attune-ai/fix-test)
Your own site
<a href="https://agentmods.dev/skills/smart-ai-memory/attune-ai/fix-test"><img src="https://agentmods.dev/badge/skills/smart-ai-memory/attune-ai/fix-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 574 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.1 $0.00047 $0.00574
Opus 5 $0.00023 $0.00287
Sonnet 5 $0.00009 $0.00115
Haiku 4.5 $0.00005 $0.00057

Measured 6d ago against content hash f0608ccfc642, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

fix-test 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 6d 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/fix-test/SKILL.md · 84 lines

How it starts

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

Fix Test

IMPORTANT: Start your response with a context preamble.

Call help_lookup(topic="fix-test", mode="preamble") and display the returned preamble text as a blockquote. Then tell the user they can say "tell me more" for a step-by-step guide, or answer the scoping questions below to proceed.

If the MCP call fails, fall back to:

Fix Test — Diagnoses failing tests, classifies the root cause, and applies targeted fixes automatically.

Scoping

Before running, ask:

  1. Target: "Which test is failing? A specific file, test name, or should I find failures automatically?"
  2. Context: "Did this start failing after a recent change, or has it been broken?"

Execution

Step 1: Identify Failures

Run the failing test(s) to capture the error:

uv run pytest <target> -v --tb=short 2>&1 | tail -40

Step 2: Diagnose Root Cause

Common failure patterns:

Pattern Root Cause Fix
ModuleNotFoundError Import path changed Update import
AttributeError: mock Mock target wrong Match import path
AssertionError Expected value drift Update assertion
TypeError: __init__ Constructor changed Update call site
FileNotFoundError Fixture path wrong Use tmp_path

Step 3: Apply Fix and Re-run

Apply the fix, then re-run the test. If it still fails, diagnose again with the new error. Repeat up to 3 times.

uv run pytest <target> -v --tb=short

Step 4: Report

After fixing (or exhausting 3 attempts), report:

## Fix Test Results

**Tests Fixed:** X/Y | **Attempts Used:** Z/3

### Fixed
| Test | Root Cause | Fix Applied |
|------|------------|-------------|

### Still Failing (if any)
| Test | Error | Attempts | Notes |
|------|-------|----------|-------|

Follow-Up

After presenting results, offer:

  • "Want me to generate missing tests for the fixed module?"
  • "Should I check for similar failures elsewhere?"
  • "Want a deeper look at the root cause?"

Read the full file on GitHub · 84 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. 6d ago First seen · 84 lines · 47 tokens per session scan A f0608ccfc642

Subscribe to this mod's changes

fix-test is a skill published in the GitHub repository Smart-AI-Memory/attune-ai (10 stars, last pushed yesterday), licensed Apache-2.0. It adds 47 tokens to every session and 574 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.

Related

Other skills, from other repositories

novel-check

LLM 连通性自检:对默认模型与各角色模型做一次最小真实调用,逐一报告 provider/model 是否真的可用。触发:「检查 LLM 能不能用」「测试模型连通」「创作前先确认配置」「为什么一调用就报错」,排查代理未启动 / key 失效 / baseurl 写错时使用。.

Xiaoyangy/novel-studio · 83 tokens

novel-diag

诊断当前项目的 output 产物,从流程/质量/规划/上下文四维给出可执行发现,并写出脱敏报告。触发:「诊断这本书」「为什么卡住了」「检查创作有没有问题」「生成 diag 报告贴 issue」。.

Xiaoyangy/novel-studio · 65 tokens

ci-repair

Fix CI failures by fetching GitHub Actions logs, dispatching dev to fix, verifying locally, and pushing.

yimwoo/codex-agenteam · 26 tokens

debugging-discipline

Дисциплина отладки: стоп-линия при сбое, воспроизводящий тест до фикса, первопричина вместо симптома, минимальная правка, защита от регрессии.

radif-ru/ai-multi-agent-system · 47 tokens

error-handling-discipline

Дисциплина ошибок: ловим ожидаемые исключения (LLMError/ToolError/TimeoutError), нет необработанных, пользователю — человеческое сообщение, stacktrace только в лог.

radif-ru/ai-multi-agent-system · 47 tokens

massgen-log-analyzer

Run MassGen experiments and analyze logs using automation mode, logfire tracing, and SQL queries. Use this skill for performance analysis, debugging agent behavior, evaluating coordination patterns, and improving the logging structure, or whenever an ANALYSISREPORT.md is needed in a log directory.

massgen/MassGen · 60 tokens