tdd-rust

tdd-rust is a skill for Claude Code from FlorianBruniaux/ccboard. It costs 0 tokens per session (1,329 once invoked), scanned A, original, MIT.

A workflow for Rust development based on Test-Driven Development (TDD): write a failing test, add the smallest code that passes it, then improve the code.

In plain words
What is it for?
Use it when adding or changing Rust functions and want to test the expected behavior first, run the test, implement the change, and then refactor.
Why use it?
It gives implementation work a clear order and checks each behavior with tests before the code is refined.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Not installable on its own: it reads a path above its own folder, which only exists inside its repository. The line is let fixture = include_str!("../tests/fixtures/stats-cache.json");.

Part of the ccboard plugin — 14 skills, 2 commands, 10 agents, 4 hooks, 2 MCP servers shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add FlorianBruniaux/ccboard
Claude Code
/plugin install ccboard

Made for: Claude Code.

Or install ccboard, the plugin that ships this one along with the rest of its 14 skills, 2 commands, 10 agents, 4 hooks, 2 MCP servers.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/florianbruniaux/ccboard/tdd-rust.svg)](https://agentmods.dev/skills/florianbruniaux/ccboard/tdd-rust)
Your own site
<a href="https://agentmods.dev/skills/florianbruniaux/ccboard/tdd-rust"><img src="https://agentmods.dev/badge/skills/florianbruniaux/ccboard/tdd-rust.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,329 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.1 $0.00000 $0.01329
Opus 5 $0.00000 $0.00665
Sonnet 5 $0.00000 $0.00266
Haiku 4.5 $0.00000 $0.00133

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

Security

Grade A, and why

tdd-rust 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 6d 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.

.claude/skills/tdd-rust/SKILL.md · 238 lines

How it starts

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

TDD Workflow for Rust Projects

Enforce strict Test-Driven Development: Red → Green → Refactor

Workflow Steps

1. RED: Write failing test first

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

    #[test]
    fn test_parse_session_metadata() {
        let path = Path::new("tests/fixtures/session.jsonl");
        let metadata = extract_metadata(path).unwrap();

        assert_eq!(metadata.message_count, 42);
        assert!(metadata.first_timestamp < metadata.last_timestamp);
    }
}

Run test to verify failure:

cargo test test_parse_session_metadata
# Expected: FAILED (function doesn't exist yet)

2. GREEN: Implement minimal code to pass

pub fn extract_metadata(path: &Path) -> anyhow::Result<SessionMetadata> {
    // Minimal implementation
    Ok(SessionMetadata {
        message_count: 42, // Hardcoded for first pass
        first_timestamp: Utc::now(),
        last_timestamp: Utc::now(),
        // ...
    })
}

Run test again:

cargo test test_parse_session_metadata
# Expected: PASSED

3. REFACTOR: Improve implementation

pub fn extract_metadata(path: &Path) -> anyhow::Result<SessionMetadata> {
    let file = File::open(path).context("Failed to open session file")?;
    let reader = BufReader::new(file);

    let mut first_line: Option<SessionLine> = None;
    let mut last_line: Option<SessionLine> = None;
    let mut count = 0;

    for line in reader.lines() {
        let line = line?;
        if let Ok(parsed) = serde_json::from_str::<SessionLine>(&line) {
            if first_line.is_none() {
                first_line = Some(parsed.clone());
            }
            last_line = Some(parsed);
            count += 1;
        }
    }

    Ok(SessionMetadata {
        message_count: count,
        first_timestamp: first_line.map(|l| l.timestamp).unwrap_or_else(Utc::now),
        last_timestamp: last_line.map(|l| l.timestamp).unwrap_or_else(Utc::now),
        // ...
    })
}

Final verification:

cargo test test_parse_session_metadata
cargo clippy --all-targets

Read the full file on GitHub · 238 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. 6d ago First seen · 238 lines · 0 tokens per session scan A d880b225be08

Subscribe to this mod's changes

tdd-rust is a skill published in the GitHub repository FlorianBruniaux/ccboard (97 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,329 tokens. 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 skills, from other repositories

coding

编写并运行 Python 代码,验证脚本逻辑和输出。.

bojieli/ai-agent-book · 18 tokens

python-architecture

Activate when creating new modules, refactoring class hierarchies, introducing design patterns, or making changes spanning 3+ files in the APM CLI codebase.

microsoft/apm · 37 tokens

create-gsd-extension

Create, debug, and iterate on GSD extensions (TypeScript modules adding tools, commands, event hooks, custom UI, and providers). Use when asked to build an extension, add a tool the LLM can call, register a slash command, hook into GSD events, create custom TUI components, or modify GSD behavior. Triggers on…

open-gsd/gsd-pi · 101 tokens

rpce-swift-6-concurrency-migration

Plan, inventory, stage, execute, or review RepoPrompt CE's project-wide migration to Swift 6.2 concurrency checking and Swift 6 language mode. Use when auditing packages, targets, settings, diagnostics, unsafe escape hatches, migration phases, blockers, or validation evidence across the root and provider packages. Do…

repoprompt/repoprompt-ce · 90 tokens

rpce-swift-concurrency-fix

Diagnose and repair a bounded set of Swift concurrency compiler errors or warnings in RepoPrompt CE, including actor isolation, Sendable crossings, task captures, continuations, cancellation, global mutable state, and Objective-C interoperability. Use for a specific diagnostic, file, target, or coherent diagnostic…

repoprompt/repoprompt-ce · 93 tokens

capability

Creates or modifies a capability class in domain/capabilities/ and its corresponding Has interface in domain/tools/contracts.ts. Use when adding a new tool runtime behavior (agents, skills, commands, rules, mcp, hooks, settings, plugins), changing the constructor params of an existing capability class, or wiring a new…

ai-driven-dev/framework · 122 tokens