rtk-tdd

Enforce test-first Rust development with Red-Green-Refactor guidance and cargo gates.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/Star1131/smart_insole --skill rtk-tdd-star1131
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rtk-tdd
Source: https://github.com/Star1131/smart_insole/tree/main/.claude/skills/rtk-master/.claude/skills/rtk-tdd
Command: npx skills add https://github.com/Star1131/smart_insole --skill rtk-tdd-star1131

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill stops Rust changes from drifting into ad hoc implementation by forcing a test-first workflow before production code is written.

Core Features & Use Cases

  • Red-Green-Refactor guidance for new features, bug fixes, and refactors.
  • Rust-idiomatic testing patterns for assertions, error paths, panic cases, and file-backed tests.
  • Pre-commit quality gates that end with formatting, linting, and test runs.
  • Use it when adding a parser, tightening validation, or fixing a regression that should be captured by a reproducible test.

Quick Start

Ask the AI to apply the RTK TDD workflow to your Rust change, beginning with a failing test in the same module and then implementing only the minimum code needed to pass.

Frequently Asked Questions about rtk-tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce test-first TDD workflow for Rust development?

To enforce test-first Rust development, apply a strict Red-Green-Refactor workflow that requires writing a failing test in the same module before implementing production code for features, bug fixes, or refactors.

What is the best way to fix a regression in Rust using a reproducible test?

The best way to fix a Rust regression is to write a failing test that reproduces the bug, verify it fails, and then implement only the minimum code needed to pass that test.

How do I write Rust-idiomatic tests for error paths and panic cases?

Write Rust-idiomatic tests by placing same-module tests that cover assertions, error paths, panic cases, and file-backed tests, ensuring deterministic validation before running quality gates.

Do I need to run cargo fmt and clippy before committing Rust changes?

Yes, you need to run cargo fmt and clippy as pre-commit quality gates to ensure Rust changes are formatted and linted, finishing with a final cargo test run to verify all tests pass.

Can I use this TDD workflow for adding a parser or tightening validation in Rust?

Yes, you can use this TDD workflow for adding a parser or tightening validation in Rust, as it provides deterministic Red-Green-Refactor guidance specifically suited for these tasks.