router-builder

router-builder is an agent for Claude Code from claude-market/marketplace. It costs 13 tokens per session (500 once invoked), scanned A, original, MIT.

An agent that builds the main Axum web router by connecting request paths and HTTP methods to handler functions. Axum is a Rust framework for receiving web requests and returning responses.

In plain words
What is it for?
Use it when a Rust Axum backend already has handlers and needs routes for operations such as listing, creating, reading, updating, or deleting resources.
Why use it?
It removes the repetitive work of assembling routes and makes the application’s endpoints, middleware, and shared state visible in one router configuration.

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 when a Rust Axum backend already has handlers and needs routes for operations such as listing, creating, reading, updating, or deleting resources.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/claude-market/marketplace/router-builder/github.svg)](https://agentmods.dev/agents/claude-market/marketplace/router-builder)
Your own site
<a href="https://agentmods.dev/agents/claude-market/marketplace/router-builder"><img src="https://agentmods.dev/badge/agents/claude-market/marketplace/router-builder/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 router-builder

Your own site · 80×15
<a href="https://agentmods.dev/agents/claude-market/marketplace/router-builder"><img src="https://agentmods.dev/badge/agents/claude-market/marketplace/router-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 500 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.00013 $0.00500
Opus 5 $0.00006 $0.00250
Sonnet 5 $0.00003 $0.00100
Haiku 4.5 $0.00001 $0.00050

Measured 10d ago against content hash dd895dbe2aed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

router-builder 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 10d 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/router-builder.md · 95 lines

What it actually says

Router Builder Agent

You create the main Axum router by wiring together all handler functions with their routes.

Your Task

Given:

  1. List of handlers with their paths, methods, and handler function names
  2. Handler module names

Generate the router configuration.

Router Pattern

use axum::{
    routing::{get, post, put, delete},
    Router,
};

mod handlers;
use handlers::{users, orders};

pub fn create_router(state: AppState) -> Router {
    Router::new()
        // Health checks
        .route("/health", get(health_check))
        .route("/ready", get(readiness_check))

        // API routes
        .route("/api/users",
            get(users::list_users)
                .post(users::create_user))
        .route("/api/users/:id",
            get(users::get_user)
                .put(users::update_user)
                .delete(users::delete_user))
        .route("/api/orders",
            get(orders::list_orders)
                .post(orders::create_order))

        // Middleware
        .layer(create_cors())
        .layer(create_trace_layer())
        .layer(axum::middleware::from_fn(correlation_id_middleware))

        // State
        .with_state(state)
}

Multiple Methods on Same Route

When multiple handlers share the same path:

.route("/api/users",
    get(list_users)
        .post(create_user))

Path Parameters

Use :param syntax:

.route("/api/users/:id", get(get_user))
.route("/api/users/:id/orders", get(get_user_orders))

Middleware Order

Apply middleware in this order (bottom to top execution):

.layer(create_cors())              // CORS headers
.layer(create_trace_layer())       // Request logging
.layer(timeout_middleware)         // Timeouts
.layer(correlation_id_middleware)  // Correlation IDs
.layer(rate_limiter)               // Rate limiting

Access Skills

  • axum-patterns - Router and middleware patterns
  • axum-middleware - Middleware configuration
  • axum-tracing - Correlation ID middleware
  • axum-health-shutdown - Health check endpoints
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. 10d ago First seen · 95 lines · 13 tokens per session scan A dd895dbe2aed

Subscribe to this mod's changes

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

Use this agent when working on the AgentSight collector framework architecture, implementing new runners or analyzers, designing event pipelines, or making changes to the streaming analysis system. Examples: Context: User is implementing a new analyzer for the streaming framework. user: 'I need to create a new…

eunomia-bpf/agentsight · 0 tokens

rust-expert

Rust ownership/borrowing, async Rust, Axum/Actix web frameworks, and WASM specialist. Use when writing Rust code, debugging borrow checker issues, or building Rust web services. Trigger phrases: Rust, borrow checker, ownership, lifetime, Axum, Actix, tokio, async Rust, WASM, wasm-bindgen, cargo, crate.

travisjneuman/.claude · 78 tokens

rust-developer

Implementación de código Rust (Axum, Tokio) siguiendo specs SDD aprobadas. Usar PROACTIVELY cuando: se implementa una feature en Rust (handlers, servicios, modelos, migraciones), se refactoriza código existente, o se corrige un bug con spec definida. SIEMPRE requiere una Spec SDD aprobada antes de empezar.

gonzalezpazmonica/savia · 78 tokens

spikard-developer

General development agent for the spikard polyglot HTTP framework. Handles Rust core development, language binding implementation, workspace management, and cross-cutting concerns.

Goldziher/spikard · 38 tokens

tadpole-backend-specialist

Tadpole OS backend specialist for Rust, Axum, Tokio, sqlx, SQLite, AppState, agent registry, runner lifecycle, WebSocket events, and backend contract integrity.

DDS-Solutions/AI-TadPole-OS · 45 tokens

rust-expert

Use when: Cargo.toml present. Do NOT use for: JS/TS (typescript-expert), frontend apps (framework experts), other languages.

fusengine/agents · 34 tokens