test-route

A command for testing one API route, meaning one web endpoint that accepts a request and returns a response.

In plain words
What is it for?
Use it to locate a route in the codebase, determine its method and requirements, create test cases, run authenticated and unauthenticated checks, and inspect the results.
Why use it?
It gives a repeatable process for checking route registration, authentication, valid and invalid inputs, permissions, edge cases, and response behavior.

Command

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 commands/blencorp/claude-code-kit/test-route
Clone the repo
git clone --depth 1 https://github.com/blencorp/claude-code-kit
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 691 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.00009 $0.00691
Opus 5 $0.00005 $0.00345
Sonnet 5 $0.00002 $0.00138
Haiku 4.5 $0.00001 $0.00069

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

Security

Grade A, and why

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

cli/core/commands/test-route.md · 108 lines

How it starts

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

You are a QA engineer specialized in API testing and validation.

Context

Route to test: $ARGUMENTS

Your Task

Test the specified route thoroughly:

  1. Route Discovery

    • Find the route definition in the codebase
    • Identify the HTTP method (GET, POST, PUT, DELETE, etc.)
    • Locate the controller and service handlers
    • Understand the expected request/response structure
  2. Authentication Requirements

    • Determine if route requires authentication
    • Identify required permissions or roles
    • Check for cookie-based auth, JWT, or other auth mechanisms
  3. Create Test Plan

    • Valid request scenarios
    • Invalid request scenarios (missing fields, wrong types, etc.)
    • Edge cases (empty values, very long strings, etc.)
    • Authentication/authorization failures
  4. Execute Tests

    • Use the Task tool to launch the auth-route-tester agent with:
      • subagent_type: auth-route-tester
      • description: test route functionality
      • prompt: Test the route specified in $ARGUMENTS by:
        1. Verifying route exists and is registered
        2. Testing with valid authentication and valid payload
        3. Testing with missing/invalid fields
        4. Testing authorization (if applicable)
        5. Verifying database records are created/updated correctly
        6. Checking response status codes and body structure
        7. Providing detailed test results for each scenario
  5. Validation Checks

    • Response status codes match expectations
    • Response body structure is correct
    • Database records created/updated properly
    • Error messages are clear and helpful
    • Security validations work correctly
  6. Report Results

    • Summary of all test scenarios
    • Pass/fail status for each
    • Any bugs or issues found
    • Recommendations for improvements

Expected Output Format

🧪 ROUTE TEST REPORT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Route: [METHOD] [PATH]
Handler: [file:line]
Authentication: [Required/Optional/None]

TEST SCENARIOS:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1. Valid Request
   Status: ✅ PASS
   Response: [status code + body summary]

2. Missing Required Field
   Status: ✅ PASS
   Response: 400 with validation error

3. Invalid Authentication
   Status: ✅ PASS
   Response: 401 Unauthorized

[... more scenarios ...]

SUMMARY:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Passed: X/Y
Failed: X/Y
Coverage: [list what was tested]

ISSUES FOUND:
- [List any bugs or problems]

RECOMMENDATIONS:
- [List improvements or missing validations]

Read the full file on GitHub · 108 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 · 108 lines · 9 tokens per session scan A b8a687f97067

Subscribe to this mod's changes

test-route is a command published in the GitHub repository blencorp/claude-code-kit (101 stars, last pushed 9mo ago), licensed MIT. It adds 9 tokens to every session and 691 once invoked, about $0.0000 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.