1. Habit
  2. Skills
  3. RTK TDD Rust skill
rtk-ai · 1K installs

RTK TDD Rust skill
Runs by itself, new filter requested.

Every new filter proves its savings.

Install the RTK TDD Rust skill and make it a habit: follow https://gethabit.dev/skills/rtk-ai/tdd-rust.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

1K installs84K starsApache-2.0 licenceSource on GitHub ↗

RTK TDD Rust

by rtk-ai · 1K installs

The skill

The RTK TDD Rust skill enforces red-green-refactor for RTK filter development: real command fixtures, a 20% token savings test, insta snapshots, edge case tests and a fmt, clippy and test gate.

Only when you ask.

The habit

Every new filter proves its savings.

↻ Runs by itselfnew filter requested

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after one filter and 2 gate retries per run.

  1. 01

    Capture a fixture

    Your agent saves real command output as tests/fixtures/<command>_raw.txt.

  2. 02

    Write red tests

    It writes snapshot, 20% savings, empty and malformed input tests and runs cargo test to see them fail.

  3. 03

    Go green

    It writes the minimum filter_<cmd> returning Result<String>.

  4. 04

    Accept the snapshot

    It runs the snapshot test and cargo insta review.

  5. 05

    Wire it in

    It adds a run() with fallback and registers it in the main.rs Commands enum.

  6. 06

    Run the gate

    It runs cargo fmt --all, cargo clippy --all-targets and cargo test.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the RTK TDD Rust skill helps.

Use it when

  • ✓ You add a new RTK filter
  • ✓ You write tests for a filter
  • ✓ A filter test fails

Skip it when

  • – You work outside RTK
  • – You change docs only

Questions

RTK TDD Rust skill, answered.

Can I use made-up test data?

No. The skill requires real captured command output.

What savings are required?

At least 20% fewer tokens than the raw output.

How do I install the RTK TDD Rust skill?

Copy the prompt at the top into your agent. It installs the skill from rtk-ai/rtk and sets up the habit. Or run npx skills add rtk-ai/rtk --skill tdd-rust.

Is the RTK TDD Rust skill free?

Yes. It is published under Apache-2.0. Habit is free too.

RTK TDD Rust. Now as a habit.

Install the RTK TDD Rust skill and make it a habit: follow https://gethabit.dev/skills/rtk-ai/tdd-rust.md

  • Free
  • No account
  • Undo in one line

All rtk-ai skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by rtk-ai, published under Apache-2.0. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.