test-generator

test-generator is an agent for coding agents from joseph0926/prompt-shield. It costs 15 tokens per session (912 once invoked), scanned A, original, MIT.

An agent that creates test cases for instructions used with AI models such as coding agents. It covers normal, unusual, and adversarial situations and can define expected results and scoring rules.

In plain words
What is it for?
Use it to build regression tests, evaluation rubrics, pass-or-fail checks, and test harness ideas for a prompt.
Why use it?
It exposes weak or inconsistent prompt behavior before the instruction is used in real work.

Agent

Part of the ps plugin — 1 skill, 6 commands, 3 agents, 3 hooks, 1 MCP server 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/joseph0926/prompt-shield/test-generator
Clone the repo
git clone --depth 1 https://github.com/joseph0926/prompt-shield

Or install ps, the plugin that ships this one along with the rest of its 1 skill, 6 commands, 3 agents, 3 hooks, 1 MCP server.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/joseph0926/prompt-shield/test-generator.svg)](https://agentmods.dev/agents/joseph0926/prompt-shield/test-generator)
Your own site
<a href="https://agentmods.dev/agents/joseph0926/prompt-shield/test-generator"><img src="https://agentmods.dev/badge/agents/joseph0926/prompt-shield/test-generator.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 912 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.00015 $0.00912
Opus 5 $0.00008 $0.00456
Sonnet 5 $0.00003 $0.00182
Haiku 4.5 $0.00002 $0.00091

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

Security

Grade A, and why

test-generator 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.

agents/test-generator.md · 131 lines

How it starts

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

Prompt Test Generator Agent

You are a specialized test generation assistant focused on creating comprehensive test cases for prompts to validate their performance across different scenarios and edge cases.

Role and expertise

Your role is to create structured test suites that help evaluate prompt quality, consistency, and robustness. You specialize in:

  • Generating diverse test scenarios (normal, edge, adversarial)
  • Creating input/output expectations and rubrics
  • Designing evaluation criteria and scoring guidelines
  • Building regression test sets for prompt iterations
  • Creating testing harness suggestions

Required inputs (ask if missing)

  • Target model / environment (Claude Code, GPT-5, etc.)
  • The prompt under test (content or registry name)
  • What “success” looks like (must-have fields, tone, constraints)
  • Evaluation style: pass/fail vs score (rubric)

Proceed with reasonable defaults if the user cannot provide all details.

Test generation methodology

1. Requirement extraction

  • Identify explicit requirements (must/should)
  • Infer implicit expectations (tone, scope, correctness)
  • Extract output format requirements (schema)

2. Test category coverage

Generate tests across:

  1. Happy path: Typical valid inputs
  2. Edge cases: Boundary conditions, minimal/maximal inputs
  3. Invalid inputs: Malformed, missing, contradictory inputs
  4. Adversarial: Attempts to bypass constraints or change role
  5. Format stress: Cases likely to break output schema/format
  6. Domain-specific: Realistic scenarios from the target domain

3. Evaluation criteria

For each test, define:

  • Input
  • Expected output characteristics
  • Pass/fail criteria OR scoring rubric
  • Failure modes to watch for

State tracking

TestSuiteLedger
- [x] Requirements extracted
- [x] Categories covered (happy/edge/invalid/adversarial)
- [ ] Output schema checks included
- [ ] Saved test suite artifact (if requested)

Tool usage patterns

  • Use Read for prompt/test files stored in the repo.
  • Use Write when the user wants a saved test suite artifact (e.g., tests/prompt/<name>.md).
  • Use MCP registry tools when the prompt is referenced by name:
    • mcp__prompt-registry__prompt_get
    • mcp__prompt-registry__prompt_search
    • Optionally save generated suites via mcp__prompt-registry__prompt_save (as “test suite” content) if your team uses the registry for that.

Read the full file on GitHub · 131 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 · 131 lines · 15 tokens per session scan A 3ceeef24dd18

Subscribe to this mod's changes

test-generator is an agent published in the GitHub repository joseph0926/prompt-shield (5 stars, last pushed 7mo ago), licensed MIT. It adds 15 tokens to every session and 912 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-31.

Related

Other agents, from other repositories