rust-testing

rust-testing is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 57 tokens per session (1,076 once invoked), scanned A, original, Apache-2.0.

A testing guide for Rust services, including small tests for individual functions, integration tests for public interfaces, HTTP tests, and database tests. Rust is a programming language; the guide uses tools such as Tokio, SQLx, and test doubles where appropriate.

In plain words
What is it for?
Use it when testing Rust service code, including domain logic, service dependencies, HTTP routes, database queries, and migrations.
Why use it?
It helps test business behaviour and the parts the compiler cannot verify, such as HTTP wiring, data conversion, and SQL queries. It also gives a test-first workflow: write a failing test, then make it pass with the smallest change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when testing Rust service code, including domain logic, service dependencies, HTTP routes, database queries, and migrations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/rust-testing
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.

Any agent
npx skills add makifbaysal/tasktrooper --skill rust-testing
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

Made for: Claude Code, Codex.

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-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/rust-testing/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/rust-testing)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/rust-testing"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/rust-testing/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-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/rust-testing"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/rust-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,076 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.00057 $0.01076
Opus 5.5 $0.00023 $0.00430
Sonnet 5.5 $0.00011 $0.00215
Haiku 4.5 $0.00006 $0.00108

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

Security

Grade A, and why

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

catalog/agents/backend-developer/skills/rust-testing/SKILL.md · 91 lines

How it starts

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

Rust Testing

Overview

Test-first, same discipline as everywhere (see tdd-workflow): write the failing test, watch it fail, minimal code to pass. This skill is the Rust mechanics for a service.

Core principle: the type system already rules out a lot; tests cover behaviour, invariants and the boundaries the compiler cannot see — HTTP wiring, serialization and SQL.

Test levels

Level What it covers Tools
Unit Domain types and pure functions #[cfg(test)] mod tests in the same file, #[test]
Unit with fakes Service, its port traits faked a hand-written fake struct, or mockall where the repository uses it
HTTP Routing, extractors, status codes, error body the Router called with tower::ServiceExt::oneshot — no port
Persistence sqlx queries and migrations #[sqlx::test]: a fresh database per test with migrations applied

Integration tests that use the crate's public API go in tests/.

Unit and service tests

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

    #[test]
    fn title_rejects_blank_and_overlong() {
        for bad in ["", "   ", &"x".repeat(201)] {
            assert!(TaskTitle::try_from(bad.to_string()).is_err(), "{bad:?} should be rejected");
        }
        assert!(TaskTitle::try_from("x".repeat(200)).is_ok());
    }

    #[tokio::test]
    async fn create_stores_the_task() {
        let repo = FakeTaskRepo::default();
        let service = TaskService::new(repo.clone());
        let task = service.create(UserId::new(1), TaskTitle::try_from("Report".into()).unwrap()).await.unwrap();
        assert_eq!(repo.stored(), vec![task]);
    }
}

unwrap() is fine in tests: a panic is a failure with a line number.

HTTP without a port

#[tokio::test]
async fn blank_title_is_400_in_the_problem_shape() {
    let app = router(test_state());
    let res = app
        .oneshot(Request::post("/tasks").header("content-type", "application/json")
            .header("authorization", test_token(1)).body(Body::from(r#"{"title":""}"#)).unwrap())
        .await
        .unwrap();
    assert_eq!(res.status(), StatusCode::BAD_REQUEST);
    let body: serde_json::Value = serde_json::from_slice(&res.into_body().collect().await.unwrap().to_bytes()).unwrap();
    assert!(body["errors"]["title"].is_string());
}

Read the full file on GitHub · 91 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 · 91 lines · 57 tokens per session scan A b5649df3b24d

Subscribe to this mod's changes

rust-testing is a skill published in the GitHub repository makifbaysal/tasktrooper (123 stars, last pushed today), licensed Apache-2.0. It adds 57 tokens to every session and 1,076 once invoked, about $0.0002 per session on Opus 5.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-10-17.

Related

rust-testing compared with skills from other repositories

rust-testing next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rust-testingmakifbaysal/tasktrooperSkill123todayApache-2.0A57Claude Code, Codex
agent-testerruvnet/rufloSkill83ktodayMITA15Claude Code
temporal-python-testingwshobson/agentsSkill43k5d agoMITA45Claude Code
python-testingmicrosoft/agent-frameworkSkill15k13d agoMITA29Claude Code, Codex
nemo-automodel-model-onboardingNVIDIA/skillsSkill4.2k2d agoApache-2.0A33Claude Code
cuequivariance-jaxNVIDIA/skillsSkill4.2k2d agoApache-2.0A38Claude Code, Codex
cuequivariance-torchNVIDIA/skillsSkill4.2k2d agoApache-2.0A37Claude Code, Codex