test-generation

test-generation is a skill for Claude Code, Codex from darrenhinde/OpenAgentsControl. It costs 27 tokens per session (1,065 once invoked), scanned A, original, MIT.

A test-writing workflow that creates tests for new or changed code using test-driven development, an approach where expected behavior is defined through tests. It follows the project's testing conventions and covers important success and failure cases.

In plain words
What is it for?
Use it when requesting tests, mentioning TDD, or adding coverage for newly written code, including tests for valid inputs, invalid inputs, errors, and edge cases.
Why use it?
It turns feature requirements into explicit checks and helps prevent regressions in critical code paths.

Skill for Claude CodeCodex

Part of the oac plugin — 12 skills, 6 commands, 7 agents, 1 hook 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/darrenhinde/openagentscontrol/test-generation
Any agent
npx skills add darrenhinde/OpenAgentsControl --skill test-generation
Clone the repo
git clone --depth 1 https://github.com/darrenhinde/OpenAgentsControl

Made for: Claude Code, Codex.

Or install oac, the plugin that ships this one along with the rest of its 12 skills, 6 commands, 7 agents, 1 hook.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/darrenhinde/openagentscontrol/test-generation.svg)](https://agentmods.dev/skills/darrenhinde/openagentscontrol/test-generation)
Your own site
<a href="https://agentmods.dev/skills/darrenhinde/openagentscontrol/test-generation"><img src="https://agentmods.dev/badge/skills/darrenhinde/openagentscontrol/test-generation.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,065 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.01065
Opus 5 $0.00014 $0.00532
Sonnet 5 $0.00005 $0.00213
Haiku 4.5 $0.00003 $0.00106

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

Security

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 4d 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.

plugins/claude-code/skills/test-generation/SKILL.md · 183 lines

How it starts

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

Test Generation

Overview

Generate comprehensive tests following TDD principles and project testing standards. Runs in isolated test-engineer context with pre-loaded testing conventions.

Announce at start: "I'm using the test-generation skill to create tests for [feature/component]."

The Process

Step 1: Specify Test Requirements

Provide clear requirements to test-engineer:

/test-generation

Feature: JWT token validation middleware

Behaviors:
1. Valid token → allow request
2. Expired token → reject with 401
3. Invalid signature → reject with 401
4. Missing token → reject with 401

Coverage: All critical paths

Testing Standards (pre-loaded):
- Framework: vitest
- Mocks: vi.mock()
- Structure: AAA pattern

Step 2: Review Test Plan

Test-engineer proposes a test plan:

## Test Plan

Behaviors:
1. Valid token
   - ✅ Positive: Allow request with valid JWT
   - ❌ Negative: Reject malformed JWT
2. Expired token
   - ✅ Positive: Normal token works
   - ❌ Negative: Expired token rejected with 401

Mocking Strategy:
- JWT verification: Mock with vi.mock()
- Request/Response: Use test doubles

Coverage Target: 95% line coverage, all critical paths

IMPORTANT: Review and approve before implementation proceeds.

Step 3: Implement Tests

Test-engineer implements following AAA pattern (Arrange-Act-Assert):

describe('JWT Middleware', () => {
  it('allows request with valid token', () => {
    // Arrange
    const req = mockRequest({ headers: { authorization: 'Bearer valid.jwt.token' } });
    
    // Act
    const result = jwtMiddleware(req);
    
    // Assert
    expect(result.authorized).toBe(true);
  });
});

Step 4: Run Self-Review

Test-engineer verifies:

  • ✅ Positive AND negative tests for each behavior
  • ✅ AAA pattern followed
  • ✅ All external dependencies mocked
  • ✅ Tests are deterministic (no flakiness)
  • ✅ Standards compliance

Step 5: Run Tests

Execute test suite and verify all pass:

Read the full file on GitHub · 183 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. 4d ago First seen · 183 lines · 27 tokens per session scan A fc839f9cee73

Subscribe to this mod's changes

test-generation is a skill published in the GitHub repository darrenhinde/OpenAgentsControl (4,815 stars, last pushed yesterday), licensed MIT. It adds 27 tokens to every session and 1,065 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.