improving-tests

improving-tests is a skill for Claude Code, Codex from alexei-led/cc-thingz. It costs 89 tokens per session (1,654 once invoked), scanned A, original, MIT.

A workflow for improving automated tests so they check real software behavior, run efficiently, and resist unnecessary breakage. TDD, or test-driven development, means writing a test before the code it requires.

In plain words
What is it for?
Use it to add useful coverage, refactor fragile tests, remove wasted tests, speed up slow test suites, create characterization tests, or work test-first.
Why use it?
It helps tests catch meaningful regressions without making normal development slow or brittle. It treats code coverage as a signal rather than the sole goal.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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/alexei-led/cc-thingz/improving-tests
Any agent
npx skills add alexei-led/cc-thingz --skill improving-tests
Clone the repo
git clone --depth 1 https://github.com/alexei-led/cc-thingz

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 improving-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexei-led/cc-thingz/improving-tests.svg)](https://agentmods.dev/skills/alexei-led/cc-thingz/improving-tests)
Your own site
<a href="https://agentmods.dev/skills/alexei-led/cc-thingz/improving-tests"><img src="https://agentmods.dev/badge/skills/alexei-led/cc-thingz/improving-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,654 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.00089 $0.01654
Opus 5 $0.00044 $0.00827
Sonnet 5 $0.00018 $0.00331
Haiku 4.5 $0.00009 $0.00165

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

Security

Grade A, and why

improving-tests 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.

src/skills/improving-tests/SKILL.md · 178 lines

How it starts

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

Test Improvement

Improve tests so they catch real behavior regressions without blocking safe code changes. Suite latency is a quality attribute. Coverage is a signal, not the goal.

Role-gated action

Detect capability from tools:

  • Write-capable role: inspect tests, apply changes, and run verification.
  • Read-only role: inspect supplied files/output and emit changes in the Proposed Changes contract. Apply nothing; run nothing.
  • Missing key tool or permission: stop with Blocked and ask for the exact artifact, access, or approval needed.

Use an interactive question tool when available for mode selection, missing scope, missing framework approval, or unsafe test-stack choices.

Route elsewhere

Do not use this for:

  • production bug fixes → fixing-code
  • production-code refactors → refactoring-code
  • non-test code review → reviewing-code
  • new feature implementation unless the user asked for TDD
  • browser-only UI investigation without a test-improvement goal → browser-automation

References

Detect languages from files in scope and read only the matching reference:

  • C# → references/csharp.md
  • Go → references/go.md; for slow-suite or feedback-loop work, also read references/go-performance.md
  • Java/Kotlin → references/java-kotlin.md
  • Python → references/python.md; for slow-suite or feedback-loop work, also read references/python-performance.md
  • TypeScript → references/typescript.md; for slow-suite or feedback-loop work, also read references/typescript-performance.md
  • Rust → references/rust.md
  • Web → references/web.md

Use generic rules only for unsupported languages.

Modes

  • review: find weak, duplicate, brittle, missing, slow, or flaky tests
  • refactor: simplify tests without changing covered behavior
  • coverage: add tests for uncovered business behavior or error paths
  • tdd: one red-green-refactor slice at a time
  • performance: measure test latency and remove speed waste without weakening behavior
  • full: review, refactor, performance, and add coverage

Read the full file on GitHub · 178 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 · 178 lines · 89 tokens per session scan A bf615c114ffe

Subscribe to this mod's changes

improving-tests is a skill published in the GitHub repository alexei-led/cc-thingz (35 stars, last pushed 1mo ago), licensed MIT. It adds 89 tokens to every session and 1,654 once invoked, about $0.0004 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.