test-generator

test-generator is an agent for Claude Code from claude-market/marketplace. It costs 14 tokens per session (617 once invoked), scanned A, original, MIT.

An agent that writes tests for Axum HTTP handlers, using types generated from an OpenAPI definition. Axum is a Rust framework for building web servers, and HTTP handlers process web requests.

In plain words
What is it for?
Use it to create success and other behavior tests for Axum endpoints, including database setup, request construction, handler execution, and response assertions.
Why use it?
It reduces the manual work of creating request setup, test data, calls, and response checks for each handler. The tests follow the generated API types and supplied endpoint details.

Agent for Claude Code

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

Part of the specforge-backend-rust-axum plugin — 3 agents shipped together

Good fit Use it to create success and other behavior tests for Axum endpoints, including database setup, request construction, handler execution, and response assertions.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/claude-market/marketplace/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/claude-market/marketplace

Made for: Claude Code.

Or install specforge-backend-rust-axum, the plugin that ships this one along with the rest of its 3 agents.

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/claude-market/marketplace/test-generator/github.svg)](https://agentmods.dev/agents/claude-market/marketplace/test-generator)
Your own site
<a href="https://agentmods.dev/agents/claude-market/marketplace/test-generator"><img src="https://agentmods.dev/badge/agents/claude-market/marketplace/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/claude-market/marketplace/test-generator"><img src="https://agentmods.dev/badge/agents/claude-market/marketplace/test-generator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 617 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.00014 $0.00617
Opus 5 $0.00007 $0.00309
Sonnet 5 $0.00003 $0.00123
Haiku 4.5 $0.00001 $0.00062

Measured 9d ago against content hash c5e95b88b835, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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.

specforge-backend-rust-axum/agents/test-generator.md · 100 lines

How it starts

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

Test Generator Agent

You generate comprehensive tests for HTTP handlers using OpenAPI-generated types and test patterns.

Your Task

Given:

  1. Handler path and function name
  2. Endpoint definition (path, method, request/response schemas)
  3. Path to generated API types

Generate a complete test suite.

Test Structure

use axum::{
    body::Body,
    http::{Request, StatusCode},
};
use tower::ServiceExt;
use crate::generated::api::{CreateUserRequest, User, ErrorResponse};

mod common;

#[tokio::test]
async fn test_{handler_name}_success() {
    // Setup
    let db = common::setup_test_db().await;
    let state = common::setup_test_state(db);
    let app = create_router(state);

    // Create request
    let payload = CreateUserRequest {
        email: "[email protected]".to_string(),
        name: Some("Test User".to_string()),
    };

    let request = Request::builder()
        .uri("/api/users")
        .method("POST")
        .header("content-type", "application/json")
        .body(Body::from(serde_json::to_string(&payload).unwrap()))
        .unwrap();

    // Execute
    let response = app.oneshot(request).await.unwrap();

    // Assert
    assert_eq!(response.status(), StatusCode::CREATED);

    let body = hyper::body::to_bytes(response.into_body()).await.unwrap();
    let user: User = serde_json::from_slice(&body).unwrap();

    assert_eq!(user.email, "[email protected]");
}

Required Test Cases

Generate tests for:

  1. Success case: Happy path with valid input
  2. Validation errors: Invalid input (400 Bad Request)
  3. Not found: Resource doesn't exist (404 Not Found)
  4. Conflict: Duplicate resource (409 Conflict)
  5. Authorization: If endpoint requires auth (401 Unauthorized)

Test Helpers

Create helper functions for common operations:

fn create_user_request(payload: &CreateUserRequest) -> Request<Body> {
    Request::builder()
        .uri("/api/users")
        .method("POST")
        .header("content-type", "application/json")
        .body(Body::from(serde_json::to_string(payload).unwrap()))
        .unwrap()
}

async fn parse_response_body<T: serde::de::DeserializeOwned>(response: Response) -> T {
    let body = hyper::body::to_bytes(response.into_body()).await.unwrap();
    serde_json::from_slice(&body).unwrap()
}

Read the full file on GitHub · 100 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. 9d ago First seen · 100 lines · 14 tokens per session scan A c5e95b88b835

Subscribe to this mod's changes

test-generator is an agent published in the GitHub repository claude-market/marketplace (22 stars, last pushed 10mo ago), licensed MIT. It adds 14 tokens to every session and 617 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

rust-testing-engineer

Rust testing specialist focused on comprehensive test coverage with nextest and criterion, test infrastructure, and quality assurance. Use PROACTIVELY when adding new functionality that requires tests, investigating test failures, or setting up test infrastructure.

bug-ops/zeph · 49 tokens

build-verifier

A read-only checker for a specified software crate or subproject. A crate is a Rust package or component that can be built and tested separately.

zerx-lab/FluxDown · 48 tokens

rust-implementer

Rust TDD implementer worker. Makes a frozen failing test suite pass with the smallest idiomatic change; forbidden from modifying test files. Half of the adversarial Rust fix pair (with rust-test-author). Use when implementing Rust code against frozen tests.

vinnie357/claude-skills · 55 tokens

rust-test-author

Rust TDD test-author worker. Writes failing tests against a provided spec/acceptance criteria and freezes them on commit; forbidden from writing implementation code. Half of the adversarial Rust fix pair (with rust-implementer). Use when a Rust change needs tests authored before implementation.

vinnie357/claude-skills · 60 tokens

rust-pro

Implements or refactors Rust against the repo's conventions, verifying with its build/test/clippy/fmt gate; returns a change report with verbatim gate output. - Use when writing, refactoring, or fixing Rust code or its Cargo manifests. Spawn one per module-sized task. Not for reviewing a diff (rust-reviewer).

uwuclxdy/agenticat · 70 tokens

rust-tests-reviewer

Rust test quality review for built-in test framework patterns, assert macros, async tests, mockall, proptest, rstest, insta snapshots, criterion benchmarks, and serialtest isolation.

vladolaru/claude-code-plugins · 41 tokens