test-fix

test-fix is a skill for Claude Code, Codex from terva-sh/terva. It costs 17 tokens per session (329 once invoked), scanned A, a copy of test-fix, MIT.

A procedure for reproducing a failing test, making the smallest appropriate correction, and running the tests again. A test is an automated check that expected software behaviour still works.

In plain words
What is it for?
Use it when an isolated test or test suite fails and you need to diagnose the cause, apply a minimal fix, and verify the result.
Why use it?
It keeps debugging focused and helps distinguish a code bug from an outdated expectation or environment problem.

Skill for Claude CodeCodex

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/terva-sh/terva/test-fix
Any agent
npx skills add terva-sh/terva --skill test-fix
Clone the repo
git clone --depth 1 https://github.com/terva-sh/terva

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/terva-sh/terva/test-fix.svg)](https://agentmods.dev/skills/terva-sh/terva/test-fix)
Your own site
<a href="https://agentmods.dev/skills/terva-sh/terva/test-fix"><img src="https://agentmods.dev/badge/skills/terva-sh/terva/test-fix.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 329 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00017 $0.00329
Opus 5 $0.00009 $0.00164
Sonnet 5 $0.00003 $0.00066
Haiku 4.5 $0.00002 $0.00033

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

Security

Grade A, and why

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

Origin

This is a copy

100% identical to test-fix — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

examples/skills/test-fix/SKILL.md · 44 lines

What it actually says

Test fix

When the user reports a failing test (or a test suite failure), work in this order. Resist the temptation to rewrite large chunks of code.

1. Reproduce

Run the failing test in isolation first. For Go: go test -run TestThing ./pkg/.... For Node: npm test -- --run TestThing. The goal is a fast feedback loop, not the whole suite.

2. Read the failure carefully

  • What was expected vs got?
  • Which line of test code triggered the failure?
  • Is it a logic error in the implementation, an outdated test expectation, or environmental drift (e.g. timezone, locale, file system case-sensitivity)?

3. Choose the smallest possible fix

  • If the test is wrong → update the assertion only. Don't restructure.
  • If the implementation is wrong → patch the smallest function that fixes the failing case. Avoid drive-by refactors.
  • If the test depends on behaviour you need to change deliberately → ask the user before changing the assertion.

4. Re-run

The same isolated test, then the immediate suite, then the full test command if applicable. Stop the moment you see green; don't keep poking.

5. Report

Write 2–3 sentences: what was wrong, what changed, and which command verifies the fix. Include the diff inline.

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 · 44 lines · 17 tokens per session scan A d7190ae93b97

Subscribe to this mod's changes

test-fix is a skill published in the GitHub repository terva-sh/terva (2 stars, last pushed 4d ago), licensed MIT. It adds 17 tokens to every session and 329 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to test-fix, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

release

Create a new versioned release with changelog. Bumps version in code, updates CHANGELOG.md, commits, tags, and pushes using the repository release flow. GitHub Actions creates the release and uses only the current changelog section as release notes. Use when the user says "release", "cut a release", "bump version"…

genai-io/san · 75 tokens

qa

Regression test a San feature by name. Looks for a feature doc in docs/reference/ or docs/packages/2-feature/, runs automated Go tests and interactive tmux tests, then produces a pass/fail report. Use this skill when the user says "qa", "regression test", "test feature X", "verify feature", or references a feature…

genai-io/san · 85 tokens

pi-sync

Daily upstream-sync job for the pi Go port — fetch upstream pi, triage every change since the recorded pin, port what's in scope, verify idiomatic + parity via independent reviews, update the ledger, and push. Use for "sync with upstream", "porting job", or as the scheduled daily run.

sky-valley/pi · 66 tokens

code-review

Review changed code for correctness bugs — logic errors, nil/error handling, concurrency, resource leaks, edge cases, broken invariants. Reports findings first, ordered by severity, then fixes on request. Scoped to correctness, not quality or style cleanups. Use when the user says "code review", "review my changes"…

genai-io/san · 83 tokens

dream-memory

Consolidate recent logs, sessions, and existing memory files into durable topic memories, normalize dates, prune stale entries, and keep MEMORY.md short enough for prompt use.

LearnPrompt/cc-harness-skills · 37 tokens

debug

Systematic debugging that finds the root cause before changing any code — collect symptoms, trace the code path, check what changed, reproduce deterministically, form a testable hypothesis, then fix the cause (not the symptom) and prove it with a regression test. Use when the user reports a bug, a crash, a failing…

genai-io/san · 84 tokens