TDD-разработка на Rust с циклом Red-Green-Refactor
testing
rtk-tdd is a Claude Code skill that enforces the TDD (Red-Green-Refactor) methodology for Rust development, auto-triggering on implementation, testing, refactoring, and bug-fixing tasks. The workflow is strict: write a failing test inside `#[cfg(test)] mod tests` of the same file, implement only the minimum production code to make it pass, then refactor while keeping `cargo test` green — skipping the red phase is explicitly prohibited. Built-in patterns cover Arrange-Act-Assert structure, `anyhow`/`thiserror` integration, error-path assertions via `is_err()`, `Result<()>`-returning tests with the `?` operator, and `tempfile::NamedTempFile` for filesystem-dependent code. A mandatory pre-commit gate runs `cargo fmt --all --check`, `cargo clippy --all-targets`, and `cargo test` in sequence — all three must pass with no exceptions. Designed for Rust developers and teams who want TDD discipline built directly into their Claude Code workflow.
- #rust
- #tdd
- #testing
- #red-green-refactor
- #unit-tests