Development

Enforce test-driven development through the RED-GREEN-REFACTOR cycle.

3|1|Updated Jun 23, 2024
One-click install
npx skills add https://github.com/channingwalton/dotfiles --skill development-channingwalton
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Development
Source: https://github.com/channingwalton/dotfiles/tree/main/.claude/skills/development
Command: npx skills add https://github.com/channingwalton/dotfiles --skill development-channingwalton

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured, disciplined approach to software development using Test-Driven Development (TDD), helping you build higher-quality code, reduce bugs, and maintain a clear development workflow.

Core Features & Use Cases

  • Strict TDD Enforcement: Guides you through the non-negotiable RED-GREEN-REFACTOR cycle, ensuring tests are written before any production code.
  • Incremental Progress: Focuses on writing one test for one behavior at a time, making complex features manageable.
  • Integrated Quality & Version Control: Connects with code-reviewer for quality checks and commit-helper for meaningful commits, promoting best practices at every step.
  • Use Case: When implementing a new feature or fixing a bug, this skill automates the TDD process, prompting you to write failing tests, minimum passing code, and then refactor, ensuring a robust and well-tested solution.

Quick Start

Implement a new 'add' function that takes two numbers and returns their sum, using the test-driven development methodology.

Frequently Asked Questions about Development

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

FAQPage Schema
How do I write tests before code using test-driven development?

Test-driven development (TDD) means writing a failing test first, then writing minimal code to pass it, then refactoring. This Skill guides you through the RED-GREEN-REFACTOR cycle, ensuring tests drive your implementation and catch bugs early.

What's the best way to structure tests for new features?

Follow the AAA pattern: Arrange (set up inputs), Act (execute the behavior), Assert (verify the result). Write one test per behavior, keeping tests focused and independent so failures pinpoint exactly what broke.

Can I use TDD when fixing bugs?

Yes. TDD works for bug fixes by writing a failing test that reproduces the bug, then fixing the code to pass it. This ensures the fix is correct and prevents regression.

How does TDD improve code quality?

TDD enforces incremental progress and comprehensive test coverage, reducing bugs and making refactoring safer. Tests document behavior and catch regressions before production, maintaining higher code quality throughout development.

Does this work with version control and code review workflows?

Yes. This Skill integrates with commit-helper for meaningful commits and code-reviewer for quality checks, embedding best practices into your entire workflow from test to review.

Why write one test per behavior instead of testing everything at once?

One behavior per test keeps failures clear and actionable. You know exactly which behavior broke, making debugging faster and encouraging incremental, verifiable progress through each feature.