test-gen

A workflow for generating tests for existing code, including unit tests and integration tests. It analyzes the target, creates tests, runs them, and repeats fixes up to three times.

In plain words
What is it for?
Use it when adding test coverage or creating a test suite for a file or module.
Why use it?
It reduces the manual effort of deciding what to test and checking whether the generated tests pass.

Skill for Claude CodeCodex

Part of the devkit plugin — 39 skills, 6 agents, 4 hooks shipped together

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

Made for: Claude Code, Codex.

Or install devkit, the plugin that ships this one along with the rest of its 39 skills, 6 agents, 4 hooks.

Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 162 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.00061 $0.00162
Opus 5 $0.00030 $0.00081
Sonnet 5 $0.00012 $0.00032
Haiku 4.5 $0.00006 $0.00016

Measured 3d ago against content hash dd33ba7ae875, 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 3d 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/test-gen/SKILL.md · 15 lines

What it actually says

Test Generation

Deterministic test generation. Analyze target → generate via the test-writer subagent → run tests and iterate up to 3x → report.

Invoke

Use the devkit_start tool with workflow: "test-gen" and input: "{input}".

Then follow each step the engine returns. Call devkit_advance after completing each step. The engine controls step order, gates, and loops. Do NOT skip steps.

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. 3d ago First seen · 15 lines · 61 tokens per session scan A dd33ba7ae875

Subscribe to this mod's changes

test-gen is a skill published in the GitHub repository 5uck1ess/devkit (5 stars, last pushed 14d ago), licensed MIT. It adds 61 tokens to every session and 162 once invoked, about $0.0003 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

python-testing

Guidelines for writing and running tests in the Agent Framework Python codebase. Use this when creating, modifying, or running tests.

microsoft/agent-framework · 29 tokens

brooks-test

Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…

hyhmrright/brooks-lint · 161 tokens

test-implement

Implements React/TypeScript unit, integration, and browser E2E tests with the repository's configured runner, mocks, setup, and browser harness. Use when creating or completing frontend tests and generated test skeletons.

shinpr/claude-code-workflows · 48 tokens

laravel-testing

Laravel 13 testing with Pest PHP 4 or PHPUnit 12. Use when writing feature tests, unit tests, or any test code in a Laravel application. Triggers on tasks involving HTTP tests, model factories, database assertions, mocking facades, authentication testing, or test organisation patterns.

AsyrafHussin/agent-skills · 62 tokens

testing-best-practices

Unit testing, integration testing, and test-driven development principles. Use when writing tests, reviewing test code, improving test coverage, or setting up testing strategy. Triggers on "write tests", "review tests", "testing best practices", or "TDD".

AsyrafHussin/agent-skills · 58 tokens

rspec

This skill should be used when the user asks to "write specs", "create spec", "add RSpec tests", "fix failing spec", or mentions RSpec, describe blocks, it blocks, expect syntax, test doubles, or matchers. Should also be used when editing spec.rb files, working in spec/ directory, planning implementation phases that…

hoblin/claude-ruby-marketplace · 125 tokens