testgen

A code-testing helper that finds missing or empty tests and creates unit, integration, and end-to-end tests. It can also open a pull request, which is a proposed change for review.

In plain words
What is it for?
Use it to inspect a codebase for weak test coverage, add tests at different levels, and prepare the changes for review.
Why use it?
It reduces the manual work of checking whether important code paths are tested and writing tests for them.

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/pillip/claude-dev-kit/testgen
Any agent
npx skills add pillip/claude-dev-kit --skill testgen
Clone the repo
git clone --depth 1 https://github.com/pillip/claude-dev-kit

Made for: Claude Code, Codex.

Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,511 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.00027 $0.02511
Opus 5 $0.00014 $0.01256
Sonnet 5 $0.00005 $0.00502
Haiku 4.5 $0.00003 $0.00251

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

Security

Grade A, and why

testgen 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.

skills/testgen/SKILL.md · 177 lines

How it starts

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

Kit Preamble — testgen

Kit Script Root

Kit root: ${CLAUDE_PLUGIN_ROOT}

  • Absolute path above → plugin install (substituted at load time; no project scripts/ dir): prefix every kit script command with it, e.g. bash <kit-root>/scripts/checkpoint.sh …. Absolute paths also work from worktrees.
  • Literal ${…} placeholder above → standalone layout: run commands as written.

Project Context Detection

Run these checks silently at the start. Use results to adapt behavior:

  • [ -f issues.md ] — if true, this project uses the sprint system. Respect issue numbering and STATUS.md.
  • [ -f docs/sprint_state.md ] — if true and Status shows running, a sprint is active. Be aware of parallel work in worktrees.
  • [ -f docs/prd_digest.md ] — if true, read it for quick project context before starting.

Kit Rules

  • Verify gh auth status before any GitHub operation.

Checkpoint Rules — MANDATORY

Every phase in this skill that has a CHECKPOINT block must be verified. Run the verification command after completing each phase. Blocking gates exit non-zero on failure: STOP immediately, report, do NOT proceed. Advisory gates always exit 0 and print an ADVISORY: line on failure: report the gap, self-correct, then continue (ISSUE-031). Never skip running either tier.

Slug convention: After creating the worktree, store the branch slug (e.g., testgen/add-missing-tests) for use in checkpoint commands.

Argument Validation (run before anything else)

  1. If $ARGUMENTS is provided, verify it exists as a file or directory using Glob or Read.
    • If the path does not exist: stop with "Target path not found: <path>. Please provide a valid file or directory path."
  2. If $ARGUMENTS is empty: scan the entire project (all source files).

Algorithm:

  1. Ensure gh authenticated (gh auth status).
  2. Gather context — read the following docs (if they exist, skip silently if not). Read all applicable documents via parallel Read tool calls in a single message.
    • docs/test_plan.md — test strategy, risk matrix, critical flows for E2E prioritization
    • docs/architecture.md — tech stack, modules, dependencies
    • recalled review lessons (native memory) — known recurring quality issues

Read the full file on GitHub · 177 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 177 lines · 27 tokens per session scan A 614b904185d7

Subscribe to this mod's changes

testgen is a skill published in the GitHub repository pillip/claude-dev-kit (11 stars, last pushed 16d ago), licensed MIT. It adds 27 tokens to every session and 2,511 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

knowledge-base

Create and maintain a Markdown knowledge base that any AI agent can read, search, and update. Use when the user wants to start a knowledge base, add or update notes, organize docs/notes for an agent or LLM to consume, build an index of notes, or run a cleanup/maintenance pass on an existing MD knowledge base. Triggers…

wonderwhy-er/DesktopCommanderMCP · 112 tokens

peer-review

Structured manuscript/grant review with checklist-based evaluation. Use when writing formal peer reviews with specific criteria methodology assessment, statistical validity, reporting standards compliance (CONSORT/STROBE), and constructive feedback. Best for actual review writing, manuscript revision. For evaluating…

xintaofei/codeg · 71 tokens

build-teaql-app

Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…

teaql/teaql-agent-kit · 112 tokens

dd-code-generation

Use pup CLI for immediate Datadog operations or generate code for integration into applications.

DataDog/pup · 16 tokens

taiyi-integration

TaiyiForge 第9阶段 — 闭环归档,CHANGELOG.md。四端通用。.

Dong90/oh-my-taiyiforge · 27 tokens

taiyi-ui-design

TaiyiForge 第 4 阶段 — UI/UX 契约,产出 UI-DESIGN.md。四端通用。.

Dong90/oh-my-taiyiforge · 35 tokens