test-gen

A coding aid that creates unit tests for individual functions or classes. It covers normal behaviour, edge cases, errors, constructors, and integration points.

In plain words
What is it for?
Use it when adding tests for a code file, checking boundary conditions, testing exceptions, or documenting how methods should behave.
Why use it?
It reduces the time spent writing repetitive test cases and helps you remember less obvious failure conditions. The generated tests are designed to be independent, repeatable, fast, and clear.

Skill for Claude CodeCodex

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/phodal/auto-dev/test-gen
Any agent
npx skills add phodal/auto-dev --skill test-gen
Clone the repo
git clone --depth 1 https://github.com/phodal/auto-dev

Made for: Claude Code, Codex.

Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 136 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 $0.00010 $0.00136
Opus 5 $0.00005 $0.00068
Sonnet 5 $0.00002 $0.00027
Haiku 4.5 $0.00001 $0.00014

Measured 2d ago against content hash bb7c05288293, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-gen 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 2d 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.

examples/skills/test-gen/SKILL.md · 30 lines

What it actually says

Unit Test Generation

You are an expert at writing comprehensive, maintainable unit tests.

Test Generation Request

$ARGUMENTS

Guidelines

  1. Structure: Arrange-Act-Assert pattern
  2. Coverage: Happy path, edge cases, error cases
  3. Quality: Independent, repeatable, fast, clear
  4. Naming: Descriptive test names

Test Categories

  • Constructor tests
  • Method behavior tests
  • Exception handling tests
  • Boundary condition tests
  • Integration points tests

Project: $PROJECT_NAME

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. 2d ago First seen · 30 lines · 10 tokens per session scan A bb7c05288293

Subscribe to this mod's changes

test-gen is a skill published in the GitHub repository phodal/auto-dev (4,538 stars, last pushed 28d ago), licensed MPL-2.0. It adds 10 tokens to every session and 136 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-30.

Related

Other skills, from other repositories

unit-testing-test-generate

Generate comprehensive, maintainable unit tests across languages with strong coverage and edge case focus. Use when writing test suites or improving test coverage.

bcastelino/agent-skills-kit · 33 tokens

run-helix-tests

Submit and monitor .NET MAUI unit tests on Helix infrastructure. Supports running XAML, Resizetizer, Core, Essentials, and other unit test projects on distributed Helix queues.

dotnet/maui · 45 tokens

complete-partial-pr

Evaluate and complete an issue or PR where the submitted patch fixes only a narrow symptom of the reported pain point. Use when a contribution may miss adjacent integration surfaces, provider/spec semantics, roundtrip behavior, tests, docs, or historical maintainer decisions.

pydantic/pydantic-ai · 55 tokens

agui-dotnet-unit-tests

Author unit tests for the AG-UI .NET SDK (the .UnitTests projects), following the SDK's serialization and compatibility conventions. USE FOR: adding unit-test coverage for a new type/method in AGUI.Abstractions/Formatting/Protobuf/Client/Server, event serialization round-trips, JsonDocument property-name assertions…

ag-ui-protocol/ag-ui · 154 tokens

prowler-test-api

Testing patterns for Prowler API: JSON:API, Celery tasks, RLS isolation, RBAC. Trigger: When writing tests for api/ (JSON:API requests/assertions, cross-tenant isolation, RBAC, Celery tasks, viewsets/serializers).

prowler-cloud/prowler · 62 tokens

gen-test

Generate idiomatic tests for Go packages and handlers in the Meshery project.

meshery/meshery · 18 tokens