Unit Test Improver

Unit Test Improver is a skill for Claude Code, Codex from Notysoty/openagentskills. It costs 29 tokens per session (1,885 once invoked), scanned A, original, MIT.

A unit-test review tool that examines existing tests for weak checks, missing edge cases, and tests tied too closely to implementation details. Unit tests are small automated checks for individual parts of a program.

In plain words
What is it for?
Improving tests before a refactor, during code review, or after a bug was missed by existing tests.
Why use it?
It helps reveal tests that pass even when the code is broken, so the test suite provides a more dependable safety net.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for cline. Also seen: mentions Claude Code; mentions Codex; built for cline.

Good fit Improving tests before a refactor, during code review, or after a bug…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/notysoty/openagentskills/unit-test-improver
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.

Any agent
npx skills add Notysoty/openagentskills --skill unit-test-improver
Clone the repo
git clone --depth 1 https://github.com/Notysoty/openagentskills

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 Unit Test Improver

README.md
[![agentmods](https://agentmods.dev/badge/skills/notysoty/openagentskills/unit-test-improver.svg)](https://agentmods.dev/skills/notysoty/openagentskills/unit-test-improver)
Your own site
<a href="https://agentmods.dev/skills/notysoty/openagentskills/unit-test-improver"><img src="https://agentmods.dev/badge/skills/notysoty/openagentskills/unit-test-improver.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,885 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.00029 $0.01885
Opus 5 $0.00015 $0.00942
Sonnet 5 $0.00006 $0.00377
Haiku 4.5 $0.00003 $0.00188

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

Security

Grade A, and why

Unit Test Improver 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.

skills/unit-test-improver/SKILL.md · 214 lines

How it starts

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

Unit Test Improver

What this skill does

This skill directs the agent to review an existing set of unit tests and improve them. It looks for weak or incomplete tests — tests that pass even when the code is broken, tests that don't assert the right things, tests that are missing critical edge cases, and tests that test implementation details instead of behavior. The output is an improved, rewritten test suite that is harder to fool and more useful as a safety net.

Use this before a major refactor (so you can trust the tests will catch regressions), during a code review, or when a bug slips past your existing tests.

How to use

Claude Code / Cline

Copy this file to .agents/skills/unit-test-improver/SKILL.md in your project root.

Then ask:

  • "Use the Unit Test Improver skill on tests/cart.test.ts."
  • "Review and improve the unit tests for calculateDiscount using the Unit Test Improver skill."

Provide both the test file and the code being tested.

Cursor

Add the instructions below to your .cursorrules or paste them into the Cursor AI pane. Then share the test file and the source file side by side.

Codex

Paste both the test file (labeled "TESTS") and the source file (labeled "SOURCE") and ask Codex to follow the instructions below.

The Prompt / Instructions for the Agent

When asked to improve unit tests, follow these steps:

Step 1 — Read both the tests and the source

Read the full test file. Then read the source code being tested. Understand what the function is supposed to do before evaluating whether the tests cover it.

Step 2 — Identify test quality issues

Check every test for these problems:

Weak assertions

  • expect(result).toBeTruthy() instead of expect(result).toBe(true) — passes for any truthy value
  • expect(result).toBeDefined() when the actual value should be checked
  • expect(fn).not.toThrow() without checking the return value
  • Asserting on the wrong field (e.g., checking result.id but not result.value)

Read the full file on GitHub · 214 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 · 214 lines · 29 tokens per session scan A 905eb08486dc

Subscribe to this mod's changes

Unit Test Improver is a skill published in the GitHub repository Notysoty/openagentskills (9 stars, last pushed 23d ago), licensed MIT. It adds 29 tokens to every session and 1,885 once invoked, about $0.0001 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.