test-generator

test-generator is an agent for Claude Code 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 for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions Claude Code.

Part of the ps plugin — 1 skill, 6 commands, 3 agents, 3 hooks, 1 MCP server shipped together

Good fit Use it to build regression tests, evaluation rubrics, pass-or-fail checks, and test harness ideas for a prompt.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/joseph0926/prompt-shield/test-generator
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.

Clone the repo
git clone --depth 1 https://github.com/joseph0926/prompt-shield

Made for: Claude Code.

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/github.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/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-generator

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.00015 $0.00912
Opus 5.5 $0.00006 $0.00365
Sonnet 5.5 $0.00003 $0.00182
Haiku 4.5 $0.00002 $0.00091

Measured 1mo ago against content hash 3ceeef24dd18, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 9mo ago), licensed MIT. It adds 15 tokens to every session and 912 once invoked, about $0.0001 per session on Opus 5.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

the-prompt-critic

Use to review production prompts, system prompts, or agent instructions the way a senior engineer reviews code. Trigger when the user shares a prompt and asks "is this good?", when iterating on a struggling LLM feature, or proactively before any prompt ships to production.

shwetank/bettersense · 59 tokens

prompt

Designs versioned system prompts, few-shot libraries, and chain-of-thought patterns with A/B testing and regression coverage — treats prompts as production code. Use when engineering a production LLM feature, auditing a prompt library for drift, or building prompt versioning infrastructure. Trigger with "design this…

jeremylongshore/tons-of-skills-marketplace · 70 tokens

executor

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

datit309/supergraph · 25 tokens

qa-tester

Specialized QA automation engineer. Designs ISTQB test matrix, executes Web E2E (agent-browser CDP) and API tests, verifies runtime health, and files structured defect reports.

datit309/supergraph · 41 tokens

diagnostician

Specialized root cause debugger. Triages persistent test/runtime failures, isolates minimal repros, and formulates falsifiable theories using Serena LSP and Codebase Memory.

datit309/supergraph · 37 tokens

prompt-engineer

Prompt & guardrail engineering specialist. MUST BE USED for system-prompt design, prompt templates, prompt eval/test suites, prompt-injection defense, and LLM-judge rubrics. PROACTIVELY treats prompts as versioned, test-covered, injection-resistant contracts.

komluk/scaffolding · 58 tokens