test-driven-generation

test-driven-generation is a skill for Claude Code, Codex from ArabelaTso/Skills-4-SE. It costs 71 tokens per session (1,030 once invoked), scanned A, original, Apache-2.0.

A development method that generates implementation code to satisfy existing unit tests. Unit tests are small automated checks of individual pieces of code.

In plain words
What is it for?
Use it to implement Python or Java functions, classes, and methods from pytest, unittest, JUnit, or TestNG tests.
Why use it?
It turns the expected behavior written in tests into an implementation and exposes missing edge cases through test failures.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to implement Python or Java functions, classes, and methods from pytest, unittest, JUnit, or TestNG tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arabelatso/skills-4-se/test-driven-generation
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 ArabelaTso/Skills-4-SE --skill test-driven-generation
Clone the repo
git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE

Made for: Claude Code, Codex.

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 test-driven-generation

README.md
[![agentmods](https://agentmods.dev/badge/skills/arabelatso/skills-4-se/test-driven-generation/github.svg)](https://agentmods.dev/skills/arabelatso/skills-4-se/test-driven-generation)
Your own site
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/test-driven-generation"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/test-driven-generation/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 test-driven-generation

Your own site · 80×15
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/test-driven-generation"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/test-driven-generation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,030 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Memory Poisoning · line 99
    Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
    Fix: Protect agent memory and state from modification by untrusted content. Use read-only memory for critical instructions and validate all state changes.
How audits are shown
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.00071 $0.01030
Opus 5 $0.00036 $0.00515
Sonnet 5 $0.00014 $0.00206
Haiku 4.5 $0.00007 $0.00103

Measured 5d ago against content hash db15dd04a590, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

test-driven-generation 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 5d 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-driven-generation/SKILL.md · 154 lines

How it starts

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

Test-Driven Generation

Generate implementation code that satisfies existing unit tests through an iterative test-driven development workflow.

Workflow

1. Analyze Tests

Read and understand the provided test file(s):

  • Identify what functions/classes/methods need to be implemented
  • Extract input/output expectations from assertions
  • Note edge cases, error conditions, and special behaviors
  • Understand dependencies and imports

2. Generate Implementation

Create implementation code that should satisfy the tests:

For Python:

  • Match the exact function/class signatures expected by tests
  • Implement logic to satisfy assertions
  • Handle all tested edge cases
  • Add necessary imports and dependencies

For Java:

  • Match exact method signatures and return types
  • Implement logic within the correct class structure
  • Handle exceptions as tested
  • Add required imports and annotations

3. Run Tests

Execute the test suite to verify the implementation:

Python:

pytest <test_file>.py -v
# or
python -m unittest <test_file>.py -v

Java:

mvn test
# or
gradle test
# or for single test file
javac <TestFile>.java && java org.junit.runner.JUnitCore <TestFile>

4. Debug Failures

If tests fail, analyze the failure output:

  • Read the assertion error messages carefully
  • Identify which specific test cases are failing
  • Understand what the test expected vs. what was returned
  • Locate the bug in the implementation

5. Iterate

Fix the implementation based on failure analysis:

  • Update the code to handle the failing case
  • Re-run tests to verify the fix
  • Repeat until all tests pass

Best Practices

Code Quality

  • Write clean, readable implementation code
  • Use descriptive variable names
  • Add comments for complex logic
  • Follow language conventions (PEP 8 for Python, Java naming conventions)

Test Understanding

  • Read ALL test cases before implementing
  • Don't assume - verify exact expected behavior from assertions
  • Pay attention to parametrized tests and edge cases
  • Check test fixtures and setup methods for context

Read the full file on GitHub · 154 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. 5d ago First seen · 154 lines · 71 tokens per session scan A db15dd04a590

Subscribe to this mod's changes

test-driven-generation is a skill published in the GitHub repository ArabelaTso/Skills-4-SE (251 stars, last pushed 19d ago), licensed Apache-2.0. It adds 71 tokens to every session and 1,030 once invoked, about $0.0004 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-09-03.

Related

Other skills, from other repositories

review-ugc-render

Mandatory pre-publish review gate for a UGC video render. Transcribes the finished render's AUDIO with Whisper and word-diffs it against the approved spoken script, then gates setfinalrender — blocking a render whose generated audio mis-voices a word (e.g. the approved "human-vetted" spoken as "human witted"), drops…

gooseworks-ai/goose-skills · 116 tokens

test-generator

A test-writing helper that creates unit or integration tests from the code's actual behavior and contracts. Unit tests check small pieces of code, while integration tests check how real components work together.

laolaoshiren/claude-code-skills-zh · 79 tokens

testing-r-packages

Best practices for writing R package tests using testthat version 3+. Use when writing, organizing, or improving tests for R packages. Covers test structure, expectations, fixtures, snapshots, mocking, and modern testthat 3 patterns including self-sufficient tests, proper cleanup with withr, and snapshot testing.

posit-dev/skills · 67 tokens

r-package-development

R package development with devtools, testthat, and roxygen2. Use when the user is working on an R package, running tests, writing documentation, or building package infrastructure.

posit-dev/skills · 41 tokens

111-java-maven-dependencies

Use when you need to add or evaluate Maven dependencies that improve code quality or domain modeling — including nullness annotations (JSpecify), static analysis (Error Prone + NullAway), functional programming (VAVR), architecture testing (ArchUnit), or money and currency support (JavaMoney) — and want a…

jabrena/plinth · 133 tokens

130-java-testing-strategies

Use when you need to apply testing strategies for Java code — RIGHT-BICEP to guide test creation, A-TRIP for test quality characteristics, or CORRECT for verifying boundary conditions. This should trigger for requests such as Review Java code for testing strategies; Apply RIGHT-BICEP testing strategies in Java code…

jabrena/plinth · 96 tokens