---
name: Implement
slug: implement-4
category: Quality
description: "Implement follows a TDD flow for Rust code: analyze the change, run pre-run gates, then iterate RED, GREEN, and REFACTOR before verify and review. Use it when adding implementation work that must be test-driven and validated."
github: "https://github.com/mag123c/toktrack/tree/main/.claude/skills/implement"
language: Rust
stars: 188
forks: 20
install: "npx degit https://github.com/mag123c/toktrack/tree/main/.claude/skills/implement ~/.claude/skills/implement"
installs_to: ~/.claude/skills/implement
source_path: .claude/skills/implement/SKILL.md
collection_size: 6
category_size: 1745
collection_url: "https://dirskills.com/collections/mag123c/toktrack"
added: 2026-09-06T05:20:00.746Z
last_synced: 2026-09-06T05:20:00.746Z
canonical_url: "https://dirskills.com/skills/implement-4"
---

# Implement

Implement follows a TDD flow for Rust code: analyze the change, run pre-run gates, then iterate RED, GREEN, and REFACTOR before verify and review. Use it when adding implementation work that must be test-driven and validated.

**Install:**

```bash
npx degit https://github.com/mag123c/toktrack/tree/main/.claude/skills/implement ~/.claude/skills/implement
```

## README

# Implement

## Flow
```
Analysis → Gate pre-run → TDD(RED→GREEN→REFACTOR) → /verify → /review → /wrap
```

## Execution

1. **Analysis**: Review plan, identify affected modules

2. **Gate pre-run (MUST — before coding)**
   Run the PLAN's `[unverified-gate: probe=…]` / Phase 0 probes before RED. Fail → halt + report (don't build on a falsified assumption). Map Acceptance/DoD → RED tests; mark unverifiable as `[unverified-gate]` to carry to verify/wrap. Detail → `references/gates.md` (tag vocab: `../clarify/references/provenance.md`).

   Rust-specific probes:
   - `cargo check` — whether it compiles
   - `cargo test -- --list` — verify test targets exist
   - `make check` — unified fmt + clippy + test gate

3. **TDD Cycle**:
   - RED: Write failing test first
   - GREEN: Minimal code to pass
   - REFACTOR: Clean up (keep tests passing)
4. **Auto-call `/verify`**: On implementation complete
5. **Auto-call `/review`**: On verify pass
6. **Auto-call `/wrap`**: On review PASS

## Commands
```bash
cargo test
cargo clippy -- -D warnings
cargo fmt --check
```

## Rules
- No implementation without test
- On verify fail → fix and retry
- On review FAIL → fix and retry
- Complete full chain without stopping
