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.
npx agentmods add skills/int2t05/engineering-skills/test-generationnpx skills add int2t05/engineering-skills --skill test-generationgit clone --depth 1 https://github.com/int2t05/engineering-skillsWrote 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.
[](https://agentmods.dev/skills/int2t05/engineering-skills/test-generation)<a href="https://agentmods.dev/skills/int2t05/engineering-skills/test-generation"><img src="https://agentmods.dev/badge/skills/int2t05/engineering-skills/test-generation.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00052 | $0.01362 |
| Opus 5 | $0.00026 | $0.00681 |
| Sonnet 5 | $0.00010 | $0.00272 |
| Haiku 4.5 | $0.00005 | $0.00136 |
Grade A, and why
test-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.
How it starts
The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test Generation (Language-Agnostic)
Generate anti-pattern-free test code from PRD acceptance criteria and source code. Read inputs, produce test files. No execution, no reports, no source modifications.
Input: PRD acceptance criteria + architecture docs + source code
When to use
- Generating tests for a feature or bugfix
- Creating tests from a PRD, API contract, or existing source
- Triggers on "generate tests", "write tests for", "生成测试", "生成测试代码", "补测试"
Not for: the TDD red-green-refactor loop (use tdd); API contract testing (use api-testing); browser E2E flows (use e2e-testing).
Steps
1. Detect language & framework
Scan the project before generating. Detection priority: existing test files (naming conventions) → dependency manifests → test config files. If nothing found, ask which framework to use.
- Load references/language-patterns.md for the per-language detection table (manifests and test-file patterns to scan for) and the Test Framework | Assertion Style | Mock Library mapping (testify/gomock, pytest/unittest.mock, jest/jest.fn, etc.)
2. Read inputs
Ask for or discover: PRD path (default docs/PRD.md or docs/vX.Y/prd.md), architecture docs
(default docs/TECH.md or docs/vX.Y/tech.md), source code to test (default src/), and the
auto-detected language/framework. Ask only critical questions before proceeding.
3. Extract testable conditions
- Per acceptance criterion → one or more test cases
- Per API endpoint / function signature → contract tests
- Per defined error state → error path test
- Per security-sensitive input → injection test (SQL, command, path traversal, XSS)
PRD: "US-001: User login"
AC: "Valid credentials return an authenticated session"
AC: "Invalid credentials return an error"
AC: "Empty fields show validation errors"
→ Test cases:
1. valid credentials → success + session established
2. wrong password → error response + message present
3. empty email → validation error for email field
4. empty password → validation error for password field
What ships with it
2 files 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.
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.
- 5d ago First seen · 141 lines · 52 tokens per session scan A a798e6f599d4
test-generation is a skill published in the GitHub repository int2t05/engineering-skills (3 stars, last pushed 4d ago), licensed MIT. It adds 52 tokens to every session and 1,362 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.
Other skills, from other repositories
auto-loop
TDD-based autonomous development loop with checkpoint recovery and observability changelog.
workflow
Run the complete 5-step development workflow: focus problem → prevent over-development → test-first (TDD) → document → smart commit. Use when starting a new feature, or when the user runs /workflow or asks for the full development flow.
plan-create
Create structured implementation plans for autonomous TDD development. Use for new features, multi-file changes, or anything requiring multiple steps or tests. Triggers on aspirational openers ("let's build", "let's start building", "I want to make", "I want an app that", "help me build"), capability lists ("users…
test-first
Drive one feature through a strict TDD Red-Green-Refactor cycle with checklists for each phase. Use when implementing new functionality test-first, or when the user runs /test-first.
specify-incremental
Decompose a single-feature specification into a linear, phase-by-phase implementation plan. Use this for medium-complexity work — single feature, one or two components — where transparent human-in-the-loop phase review is preferred over factory automation.
building
Implementation skill for writing production code with TDD. Covers the RED-GREEN-REFACTOR cycle, false-RED detection, vertical slicing, scope escalation, test process discipline, and code generation patterns. Loaded by component-builder and bug-investigator.