tdd-workflow_skill

This skill guides you through test-driven development cycles, ensuring 80%+ coverage via red-green-refactor, with tests, code, and refactor steps.
  • Python

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill cacr92/wereply --skill tdd-workflow

  • SKILL.md4.9 KB

Overview

This skill enforces a TDD workflow for feature work, bug fixes, and refactors with a hard requirement of at least 80% test coverage. It guides developers through the Red-Green-Refactor loop and provides concrete examples in Rust and TypeScript for tests, implementation, mocks, and coverage checks. The goal is reliable, behavior-focused tests that stay fast and isolated.

How this skill works

When a user asks for TDD, test-first development, or mentions red/green/refactor, the skill suggests writing failing tests that express user behavior, implementing the minimal code to pass them, then refactoring while keeping tests green. It includes test templates, run commands, mock examples, and coverage verification steps so teams achieve and enforce >=80% coverage. The skill also supplies best-practice checks and a pre-commit checklist to validate readiness.

When to use it

  • Starting a new feature or user story and you want tests first
  • Fixing a bug and you want to prevent regressions
  • Refactoring code while ensuring behavior remains unchanged
  • Setting up CI checks for test coverage and quality gates
  • Teaching or enforcing TDD practices for a team

Best practices

  • Write tests that describe user-observable behavior, not implementation details
  • Keep unit tests fast (<100ms) and mock external dependencies
  • Isolate tests so each can run independently and in any order
  • Cover both success and error paths, and name tests descriptively
  • Measure coverage and require >=80% before merging

Example use cases

  • Create failing tests for a "create formula" story, implement minimal logic, then refactor validation into helpers
  • Add integration tests with a temporary test DB for repository-level changes
  • Mock external APIs or native bindings when testing UI logic in TypeScript
  • Write unit tests for validation helpers and guard clauses in Rust
  • Run coverage tools (tarpaulin, npm coverage) in CI and block merges under 80%

FAQ

Write a failing test that expresses the expected user behavior or acceptance criteria, then implement the smallest change to make it pass.

How strict is the 80% coverage rule?

80% is a hard minimum for new work; aim for meaningful coverage of behavior and edge cases, not just lines.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational