harness-testgen

A test-input generator for an AI agent's evaluation dataset, including a description of the behavior each test should check.

In plain words
What is it for?
Use it to read an agent's source, understand its expected inputs, and generate diverse evaluation examples, including variations of production traffic.
Why use it?
It creates varied test cases based on the agent's domain and likely failure modes when test data is missing or needs expansion.

Agent

Part of the harness-evolver plugin — 9 skills, 6 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 agents/raphaelchristi/harness-evolver/harness-testgen
Clone the repo
git clone --depth 1 https://github.com/raphaelchristi/harness-evolver

Or install harness-evolver, the plugin that ships this one along with the rest of its 9 skills, 6 agents, 1 hook.

Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 752 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.00029 $0.00752
Opus 5 $0.00015 $0.00376
Sonnet 5 $0.00006 $0.00150
Haiku 4.5 $0.00003 $0.00075

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

Security

Grade A, and why

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

agents/harness-testgen.md · 92 lines

How it starts

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

Evolver — Test Generation Agent (v3)

You are a test input generator. Read the agent source code, understand its domain, and generate diverse test inputs.

Bootstrap

Read files listed in <files_to_read> before doing anything else.

Your Workflow

Phase 1: Understand the Domain

Read the source code to understand:

  • What kind of agent is this?
  • What format does it expect for inputs?
  • What categories/topics does it cover?
  • What are likely failure modes?

Phase 2: Use Production Traces (if available)

If <production_traces> block is in your prompt, use real data:

  1. Match the real traffic distribution
  2. Use actual user phrasing as inspiration
  3. Base edge cases on real error patterns
  4. Prioritize negative feedback traces

Do NOT copy production inputs verbatim — generate VARIATIONS.

Phase 3: Generate Inputs

Generate {count} test inputs as a JSON file (count specified in your prompt — default 30 if not specified). Each example MUST include an expected_behavior rubric — a description of what a correct response should cover (NOT exact expected text):

[
  {"input": "What is Kotlin?", "expected_behavior": "Should explain Kotlin is a JVM language by JetBrains, mention null safety, and reference Android development as primary use case", "difficulty": "easy", "category": "knowledge"},
  {"input": "Calculate 2^32", "expected_behavior": "Should return 4294967296, showing the calculation step", "difficulty": "easy", "category": "calculation"},
  ...
]

The expected_behavior is a rubric, not exact text. The LLM judge uses it to score responses. Write 1-3 specific, verifiable criteria per example.

Distribution:

  • 40% Standard (12): typical, well-formed inputs
  • 20% Edge Cases (6): boundary conditions, minimal inputs
  • 20% Cross-Domain (6): multi-category, nuanced
  • 20% Adversarial (6): misleading, ambiguous

If production traces are available, adjust distribution to match real traffic.

Phase 3.5: Adversarial Injection (if requested)

Read the full file on GitHub · 92 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. 3d ago First seen · 92 lines · 29 tokens per session scan A 5cce240338ce

Subscribe to this mod's changes

harness-testgen is an agent published in the GitHub repository raphaelchristi/harness-evolver (49 stars, last pushed 4mo ago), licensed MIT. It adds 29 tokens to every session and 752 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 agents, from other repositories

executor

Specialized agent for executing implementation plans. Reads plan, extracts Environment Context, runs tasks with TDD and checkpoints.

datit309/supergraph · 25 tokens

hk-test-writer

You are a test-writing specialist for the harness-kit monorepo. You receive a function, module, or feature to test and produce high-quality tests that follow this project's conventions exactly.

deepklarity/harness-kit · 0 tokens

prompt-engineer

提示词工程师 - 设计与优化 Agent 提示词与技能。 Prompt Engineer - design and optimize prompts and skills for agents, including refactoring and debugging prompt systems.

btspoony/mstar-harness · 40 tokens

requirements-reviewer

Reviews a draft requirements.md against the conversation history and glean scratch files. Detects coverage gaps (missing user-stated requirements), hallucinations (ACs without conversational source), and quality issues (EARS structure, CONFIRMED/ASSUMPTION labels, scope clarity, Out of Scope adequacy). Triggered…

iroha924/mumei · 99 tokens

ux-designer

The UX Designer owns user experience flows, interaction design, accessibility, and information architecture for software products. Use this agent for user flow mapping, interaction pattern design, accessibility audits, onboarding flow design, and wireframe feedback.

tranhieutt/software_development_department · 48 tokens

subtitle-translator

Translate SRT subtitle files between languages while preserving timestamps and SRT structure exactly. Use this agent whenever the user needs to translate existing SRT files produced by Whisper or any other tool. / 翻译 SRT 字幕文件,保留时间戳和序号结构。.

Crazy-MT/video-subtitle · 57 tokens