tokio-test

tokio-test is a command for Claude Code from geoffjay/claude-plugins. It costs 11 tokens per session (2,486 once invoked), scanned A, original, MIT.

A command that generates tests for asynchronous Tokio Rust code. It supports unit tests, integration tests, benchmarks, and property-based tests for a file, module, or function.

In plain words
What is it for?
Use it to create tests for async handlers and services, check integrations, measure performance, or test behavior across many generated inputs.
Why use it?
Writing tests for asynchronous code requires understanding its functions, dependencies, errors, and returned values.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: positional $N argument.

Good fit Use it to create tests for async handlers and services, check integrations, measure performance, or test behavior across many generated inputs.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/geoffjay/claude-plugins/tokio-test
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/geoffjay/claude-plugins

Made for: Claude Code.

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 tokio-test

README.md
[![agentmods](https://agentmods.dev/badge/commands/geoffjay/claude-plugins/tokio-test/github.svg)](https://agentmods.dev/commands/geoffjay/claude-plugins/tokio-test)
Your own site
<a href="https://agentmods.dev/commands/geoffjay/claude-plugins/tokio-test"><img src="https://agentmods.dev/badge/commands/geoffjay/claude-plugins/tokio-test/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 tokio-test

Your own site · 80×15
<a href="https://agentmods.dev/commands/geoffjay/claude-plugins/tokio-test"><img src="https://agentmods.dev/badge/commands/geoffjay/claude-plugins/tokio-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,486 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.00011 $0.02486
Opus 5 $0.00005 $0.01243
Sonnet 5 $0.00002 $0.00497
Haiku 4.5 $0.00001 $0.00249

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

Security

Grade A, and why

tokio-test 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 5d 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.

plugins/rust-tokio-expert/commands/tokio-test.md · 426 lines

How it starts

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

Tokio Test Command

This command generates comprehensive async tests for Tokio applications, including unit tests, integration tests, benchmarks, and property-based tests.

Arguments

  • $1 - Target to generate tests for: file path, module name, or function name (required)
  • $2 - Test type: unit, integration, benchmark, or all (optional, defaults to unit)

Usage

/rust-tokio-expert:tokio-test src/handlers/user.rs
/rust-tokio-expert:tokio-test src/service.rs integration
/rust-tokio-expert:tokio-test process_request benchmark
/rust-tokio-expert:tokio-test src/api/ all

Workflow

  1. Parse Arguments

    • Validate target is provided
    • Determine test type (unit, integration, benchmark, all)
    • Identify target scope (file, module, or function)
  2. Analyze Target Code

    • Read the target file(s) using Read tool
    • Identify async functions to test
    • Analyze function signatures and dependencies
    • Detect error types and return values
  3. Invoke Agent

    • Use Task tool with subagent_type="rust-tokio-expert:tokio-pro"
    • Provide code context and test requirements
    • Request test generation based on type
  4. Generate Unit Tests

    For each async function, create tests covering:

    Happy Path Tests

    #[tokio::test]
    async fn test_process_user_success() {
        // Arrange
        let user_id = 1;
        let expected_name = "John Doe";
    
        // Act
        let result = process_user(user_id).await;
    
        // Assert
        assert!(result.is_ok());
        let user = result.unwrap();
        assert_eq!(user.name, expected_name);
    }
    

    Error Handling Tests

    #[tokio::test]
    async fn test_process_user_not_found() {
        let result = process_user(999).await;
    
        assert!(result.is_err());
        assert!(matches!(result.unwrap_err(), Error::NotFound));
    }
    

    Timeout Tests

    #[tokio::test]
    async fn test_operation_completes_within_timeout() {
        use tokio::time::{timeout, Duration};
    
        let result = timeout(
            Duration::from_secs(5),
            slow_operation()
        ).await;
    
        assert!(result.is_ok(), "Operation timed out");
    }
    

Read the full file on GitHub · 426 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. 5d ago First seen · 426 lines · 11 tokens per session scan A ab84fc967ef2

Subscribe to this mod's changes

tokio-test is a command published in the GitHub repository geoffjay/claude-plugins (8 stars, last pushed 10mo ago), licensed MIT. It adds 11 tokens to every session and 2,486 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-09-03.