write-tests

Installation
SKILL.md

Overview

Based on "Test Driven Development By Example" by Kent Beck. Beck's core insight: tests are not a tax on development - they are the way you design. Writing the test first forces you to think about the interface before the implementation. Code written test-first tends to be more modular, more focused, and easier to change.

The TDD cycle: Red - Green - Refactor

  • Red: Write a failing test that defines desired behavior
  • Green: Write the minimum code to make the test pass
  • Refactor: Clean up the code without changing behavior. Tests prove you haven't broken anything.

Workflow

Step 1: Identify what to test

For a given function or module, list the behaviors to test:

  • The happy path (valid inputs - correct output)
  • Invalid inputs (what should fail gracefully)
  • Boundary conditions (empty, null, max, min)
  • Edge cases (concurrent calls, large data, unexpected types)

Don't write tests for implementation details - test behavior.

Installs
1
GitHub Stars
19
First Seen
6 days ago
write-tests — qa-aman/claude-skills