rust-test

rust-test is a command for Claude Code from multiplex-ai/muggle-ai-teams. It costs 28 tokens per session (1,691 once invoked), scanned A, a copy of rust-test, MIT.

A Rust test-driven development command that writes tests before implementation, checks that they fail for the expected reason, then implements and refactors the code. TDD is a workflow of writing a failing test, making it pass, and improving the code while keeping it passing.

In plain words
What is it for?
Use it for new Rust functions, traits, bug fixes, critical logic, or adding tests to existing code.
Why use it?
It provides a repeatable way to design Rust behavior through tests and verify coverage with Rust coverage tools.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the muggle-ai-teams plugin — 166 skills, 55 commands, 30 agents, 4 hooks shipped together

Good fit Use it for new Rust functions, traits, bug fixes, critical logic, or adding tests to existing code.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/multiplex-ai/muggle-ai-teams/rust-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/multiplex-ai/muggle-ai-teams

Made for: Claude Code.

Or install muggle-ai-teams, the plugin that ships this one along with the rest of its 166 skills, 55 commands, 30 agents, 4 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/multiplex-ai/muggle-ai-teams/rust-test/github.svg)](https://agentmods.dev/commands/multiplex-ai/muggle-ai-teams/rust-test)
Your own site
<a href="https://agentmods.dev/commands/multiplex-ai/muggle-ai-teams/rust-test"><img src="https://agentmods.dev/badge/commands/multiplex-ai/muggle-ai-teams/rust-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 rust-test

Your own site · 80×15
<a href="https://agentmods.dev/commands/multiplex-ai/muggle-ai-teams/rust-test"><img src="https://agentmods.dev/badge/commands/multiplex-ai/muggle-ai-teams/rust-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,691 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 100% copy Near-identical to another mod 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.00028 $0.01691
Opus 5.5 $0.00011 $0.00676
Sonnet 5.5 $0.00006 $0.00338
Haiku 4.5 $0.00003 $0.00169

Measured 1mo ago against content hash dc474e6373e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rust-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 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.

Origin

This is a copy

100% identical to rust-test — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

commands/rust-test.md · 309 lines

How it starts

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

Rust TDD Command

This command enforces test-driven development methodology for Rust code using #[test], rstest, proptest, and mockall.

What This Command Does

  1. Define Types/Traits: Scaffold function signatures with todo!()
  2. Write Tests: Create comprehensive test module (RED)
  3. Run Tests: Verify tests fail for the right reason
  4. Implement Code: Write minimal code to pass (GREEN)
  5. Refactor: Improve while keeping tests green
  6. Check Coverage: Ensure 80%+ coverage with cargo-llvm-cov

When to Use

Use /rust-test when:

  • Implementing new Rust functions, methods, or traits
  • Adding test coverage to existing Rust code
  • Fixing bugs (write failing test first)
  • Building critical business logic
  • Learning TDD workflow in Rust

TDD Cycle

RED     -> Write failing test first
GREEN   -> Implement minimal code to pass
REFACTOR -> Improve code, tests stay green
REPEAT  -> Next test case

Example Session

User: /rust-test I need a function to validate user registration

Agent:
# TDD Session: Registration Validator

## Step 1: Define Interface

```rust
// src/validator.rs
pub struct RegistrationRequest {
    pub name: String,
    pub email: String,
    pub password: String,
}

pub enum ValidationResult {
    Valid,
    Invalid(Vec<String>),
}

pub fn validate_registration(request: &RegistrationRequest) -> ValidationResult {
    todo!()
}
```

## Step 2: Write Tests (RED)

```rust
#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn valid_registration_returns_valid() {
        let request = RegistrationRequest {
            name: "Alice".into(),
            email: "[email protected]".into(),
            password: "SecureP@ss1".into(),
        };
        assert!(matches!(validate_registration(&request), ValidationResult::Valid));
    }

    #[test]
    fn blank_name_returns_invalid() {
        let request = RegistrationRequest {
            name: "".into(),
            email: "[email protected]".into(),
            password: "SecureP@ss1".into(),
        };
        match validate_registration(&request) {
            ValidationResult::Invalid(errors) => {
                assert!(errors.contains(&"Name is required".to_string()));
            }
            ValidationResult::Valid => panic!("expected Invalid"),
        }
    }

Read the full file on GitHub · 309 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 · 309 lines · 28 tokens per session scan A dc474e6373e2

Subscribe to this mod's changes

rust-test is a command published in the GitHub repository multiplex-ai/muggle-ai-teams (2 stars, last pushed 1mo ago), licensed MIT. It adds 28 tokens to every session and 1,691 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to rust-test, differing in 0 lines, and is treated as a copy.

Related

rust-test compared with commands from other repositories

rust-test next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rust-testmultiplex-ai/muggle-ai-teamsCommand21mo agoMITA28Claude Code
rust-testaffaan-m/ECCCommand313k7d agoMITA9Claude Code, OpenCode
rust-testsifxprime/kodelyth-eccCommand12todayMITA28Claude Code
rust-testFmarzochi/EGCCommand70yesterdayApache-2.0A9Claude Code, OpenCode
rust-testDekaPrayoga/AurixAgentCommand624mo agononeA28Claude Code
rust-testYaomeng1749/claude-code-digital-nomad-config-packCommand47mo agononeA28Claude Code
rust-testsejongjeong/runai-mcpCommand08mo agononeA28Claude Code