create-unit-tests

create-unit-tests is a skill for Claude Code from nortonx/ai-tooling-free. It costs 31 tokens per session (1,252 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.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.svg" alt="Measured on agentmods" 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,252 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.01252
Opus 5 $0.00015 $0.00626
Sonnet 5 $0.00006 $0.00250
Haiku 4.5 $0.00003 $0.00125

Measured 8d ago against content hash ad45aeb3f828, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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 doesn't substitute in skills — include the argument inline in your prompt.

Create Unit Tests

Use @test-automator 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's already there — don't 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. 8d 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 24d ago), licensed MIT. It adds 31 tokens to every session and 1,252 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

intuitive-tests

Use this skill whenever the user asks about unit test best practices, test organization, flat test suites, redundant tests, test refactors, pytest/JUnit/Jest/xUnit layout, test taxonomy, flaky tests, coverage quality, fixtures, mocks, parametrization, pruning existing UTs, or "which tests are worth keeping." It…

MiaoDX/intuitive-flow · 154 tokens

unit-test

A Go testing workflow for writing unit tests: small tests that check individual functions or components. It supports table-driven cases, where many inputs and expected results are organised in one test, and subtests.

johnqtcg/awesome-skills · 100 tokens

fuzzing-test

A Go testing guide for generating fuzz tests, which repeatedly try varied inputs to find crashes and unexpected behavior. It first checks whether the code is suitable for fuzzing.

johnqtcg/awesome-skills · 74 tokens

test-coverage

Use when test coverage falls below target or a new module has no tests — identifies untested code paths and writes targeted unit or integration tests to close the coverage gap.

drvoss/everything-copilot-cli · 37 tokens

react-vitest

Use when adding or improving tests in a React project that uses Vitest — covers component testing with Testing Library, mocking hooks, and coverage configuration.

drvoss/everything-copilot-cli · 33 tokens

ds-test

Universal test skill — generate, update, run, and fix tests for any stack. Use when writing, repairing, or running tests, or improving coverage.

sungurerdim/dev-skills · 34 tokens