create-unit-tests

create-unit-tests is a skill for Claude Code from nortonx/ai-tooling-free. It costs 31 tokens per session (1,261 once invoked), scanned A, original, MIT.

A unit-test writing tool that creates tests for changed code or for a specified file, directory, or module.

In plain words
What is it for?
Use it to add tests for a branch’s changed functions or to target a particular part of the codebase, following arrange, act, and assert structure.
Why use it?
It helps check that new or modified functions behave as expected and reduces the chance of later changes breaking them.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to add tests for a branch’s changed functions or to target a particular part of the codebase, following arrange, act, and assert structure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nortonx/ai-tooling-free/create-unit-tests
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 nortonx/ai-tooling-free --skill create-unit-tests
Clone the repo
git clone --depth 1 https://github.com/nortonx/ai-tooling-free

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/nortonx/ai-tooling-free/create-unit-tests/github.svg)](https://agentmods.dev/skills/nortonx/ai-tooling-free/create-unit-tests)
Your own site
<a href="https://agentmods.dev/skills/nortonx/ai-tooling-free/create-unit-tests"><img src="https://agentmods.dev/badge/skills/nortonx/ai-tooling-free/create-unit-tests/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 create-unit-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/nortonx/ai-tooling-free/create-unit-tests"><img src="https://agentmods.dev/badge/skills/nortonx/ai-tooling-free/create-unit-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,261 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.00031 $0.01261
Opus 5.5 $0.00012 $0.00504
Sonnet 5.5 $0.00006 $0.00252
Haiku 4.5 $0.00003 $0.00126

Measured 1mo ago against content hash 666aa421de4e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create-unit-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 1mo 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/create-unit-tests/SKILL.md · 100 lines

How it starts

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

Arguments

[<file-path | directory | module>]

  • Optional. Scopes test generation to a specific target; default is the branch diff vs main/master.
  • Examples: /create-unit-tests, /create-unit-tests src/payments/

Copilot CLI note: $ARGUMENTS does not substitute in skills; include the argument inline in your prompt.

Create Unit Tests

Act as or delegate to the test automation role to write unit tests for the resolved scope.

Scope

Default: diff between this branch and the base branch (main/master), narrowed to changed functions only. If provided, scope to: $ARGUMENTS (a file path, a directory, or a module name).

Hard rule: never touch files outside the resolved scope. If $ARGUMENTS is empty AND the branch diff is also empty, stop and report: "No changes detected; nothing to test. Pass an explicit target if you want to scope this run manually."

How to write each test

Follow these practices for every test you generate:

  1. Structure (AAA): Arrange -> Act -> Assert, with a blank line between sections. One logical assertion per test.
  2. Naming: descriptive: should_<expected>_when_<condition> or given_<state>_when_<action>_then_<outcome>. The name alone should explain the intent.
  3. FIRST:
    • Fast: no real network, DB, filesystem, or sleep.
    • Independent: no ordering dependencies, no shared mutable state.
    • Repeatable: no time.now, no unseeded random, no env-dependent values.
    • Self-validating: pass/fail via assertions, not print or manual inspection.
    • Timely: written alongside or before the production code, not as an afterthought.
  4. Mock only at boundaries: external services, filesystem, network, clock, randomness. Do NOT mock the system under test (SUT) or its internal helpers.
  5. Test behavior, not implementation: assert on public outputs, return values, and observable state; never on private method calls or internal data structures.
  6. Coverage per changed function:
    • Happy path (the documented/obvious case)
    • At least one error path
    • Boundaries: 0, 1, max, negative
    • Nullish / empty inputs
    • Collections: empty, single element, ordering
    • Target: >=80% branch coverage on the scoped target. (Threshold chosen because below 80% typically leaves entire catch/error branches untested, the largest source of regressions in this repo's prior bugs. Lower it explicitly with a project-level coverage config if the codebase has a different baseline.)
  7. Match the repo's existing test style: framework, file location, imports, fixture pattern, assertion library. Mirror what is already there; do not introduce a new style.

Read the full file on GitHub · 100 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. 1mo ago Changed 666aa421de4e
  2. 1mo ago First seen · 100 lines · 31 tokens per session scan A ad45aeb3f828

Subscribe to this mod's changes

create-unit-tests is a skill published in the GitHub repository nortonx/ai-tooling-free (1 stars, last pushed 18d ago), licensed MIT. It adds 31 tokens to every session and 1,261 once invoked, about $0.0001 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-08-31.