test-unit

test-unit is a skill for Claude Code from irahardianto/awesome-agv. It costs 41 tokens per session (1,009 once invoked), scanned A, original, MIT.

A guided skill for finding and improving unit-test coverage in existing code. Unit tests check small pieces of code, such as individual functions, separately from databases, web services, or full user journeys.

In plain words
What is it for?
Use it to inspect coverage reports, map uncovered files and functions, and add unit tests before a release or after a quality problem.
Why use it?
It identifies risky parts with few tests and prioritises the gaps instead of adding tests blindly. It is for existing code, not new feature development where the supplied workflow already includes TDD.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions subagents; installed under .agents/ (shared by several agents).

Good fit Use it to inspect coverage reports, map uncovered files and functions, and add unit tests before a release or after a quality problem.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/irahardianto/awesome-agv/test-unit
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 irahardianto/awesome-agv --skill test-unit
Clone the repo
git clone --depth 1 https://github.com/irahardianto/awesome-agv

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-unit

README.md
[![agentmods](https://agentmods.dev/badge/skills/irahardianto/awesome-agv/test-unit/github.svg)](https://agentmods.dev/skills/irahardianto/awesome-agv/test-unit)
Your own site
<a href="https://agentmods.dev/skills/irahardianto/awesome-agv/test-unit"><img src="https://agentmods.dev/badge/skills/irahardianto/awesome-agv/test-unit/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-unit

Your own site · 80×15
<a href="https://agentmods.dev/skills/irahardianto/awesome-agv/test-unit"><img src="https://agentmods.dev/badge/skills/irahardianto/awesome-agv/test-unit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,009 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.00041 $0.01009
Opus 5.5 $0.00016 $0.00404
Sonnet 5.5 $0.00008 $0.00202
Haiku 4.5 $0.00004 $0.00101

Measured 4d ago against content hash 705534ce3077, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

.agents/skills/test-unit/SKILL.md · 103 lines

How it starts

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

Improve Unit Test Coverage

Entry-point guard: This is a user-invoked command skill (/test-unit). If you are a spawned subagent, do NOT execute this skill — return to your assigned scope card.

Purpose

Retroactive unit test coverage improvement for existing codebases. For greenfield development, use /workflow-solo — TDD is built in.

When to Use

  • Existing codebase with insufficient unit test coverage
  • Post-mortem finding: "we need more tests"
  • Pre-release hardening
  • Quality improvement initiative

When NOT to Use

  • Greenfield development (use /workflow-solo — TDD is built in)
  • Integration test gaps (use /test-integration skill)
  • E2E test gaps (use /test-e2e skill)
  • Need test scenarios first (use /test-scenarios skill)

Phases

Phase 1: ANALYZE

Objective: Map current coverage gaps.

  1. Load applicable idiom skill(s) — each defines the coverage tool (e.g., Go: go test -coverprofile, TS: vitest --coverage, Python: pytest-cov)
  2. Run coverage tool against the full codebase
  3. Parse coverage report — identify files and functions with lowest coverage
  4. Produce Coverage Gap Map artifact with: file path, current coverage %, lines uncovered, module/feature area. Sort by coverage ascending.

Gate: Coverage gap map artifact created with baseline metrics.

Phase 2: PRIORITIZE

Objective: Rank gaps by business impact for user review.

Prioritization criteria (highest → lowest):

  1. Critical business logic — payment, auth, core domain rules
  2. High-churn files — use git log --format='%H' --follow <file> | wc -l to find frequently changed files
  3. Public API surface — exported functions/methods used by other modules
  4. Error handling paths — catch/error blocks with no test coverage
  5. Utilities and helpers — lowest priority unless widely imported

Steps:

  1. Cross-reference coverage gaps with git churn data
  2. Categorize each gap by criteria above
  3. Present prioritized list to user for confirmation
  4. User selects which gaps to address in this iteration

Read the full file on GitHub · 103 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. 4d ago First seen · 103 lines · 41 tokens per session scan A 705534ce3077

Subscribe to this mod's changes

test-unit is a skill published in the GitHub repository irahardianto/awesome-agv (156 stars, last pushed 4d ago), licensed MIT. It adds 41 tokens to every session and 1,009 once invoked, about $0.0002 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-10-15.