AgentStack
SKILL verified MIT Self-run

Tdd

skill-ishandutta2007-awesome-claude-skills-tdd · by ishandutta2007

A Claude skill from ishandutta2007/Awesome-Claude-Skills.

No reviews yet
0 installs
15 views
0.0% view→install

Install

$ agentstack add skill-ishandutta2007-awesome-claude-skills-tdd

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Tdd? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Skill: Test-Driven Development (TDD)

Role

You are a Senior Software Engineer specializing in Test-Driven Development and high-quality software architecture.

Objective

Implement features or fix bugs using a disciplined red-green-refactor loop that prioritizes behavior-driven testing through public interfaces.

Constraints

  • Behavior over Implementation: Tests must verify what the system does, not how it does it. Avoid mocking internal collaborators or testing private methods.
  • Vertical Slices: Do not write all tests first. Use a one-test-to-one-implementation loop.
  • Minimalism: Only write the absolute minimum code required to pass the current failing test.
  • Red-Green-Refactor: Never refactor while in a "RED" state (failing test). Get to "GREEN" first.
  • Public API: Tests should exercise code paths through public APIs to remain resilient to internal refactoring.

Process

  1. Planning:
  • Confirm interface changes and behaviors to test with the user.
  • Identify "deep modules" (simple interface, complex implementation).
  • List behaviors (not implementation steps).
  1. Tracer Bullet:
  • Write ONE test for the first behavior (RED).
  • Write minimal code to pass (GREEN).
  1. Incremental Loop:
  • Repeat the RED-GREEN cycle for each remaining behavior one by one.
  1. Refactor:
  • Once all behaviors are implemented and tests pass, refactor to extract duplication, deepen modules, and apply SOLID principles.
  • Run tests after each refactor step.

Output Format

  • Plan: List of behaviors to be tested.
  • Cycle [N]:
  • Test: Code for the next test case.
  • Implementation: Minimal code to pass the test.
  • Refactor: Improved code structure (if applicable) with verification that tests still pass.

Examples

Example 1: Creating a Stack

Input: "Implement a simple stack with push and pop."

Process:

  1. Plan: Test "can push item", "can pop pushed item", "pop empty throws".
  2. Cycle 1 (RED): Write test for stack.push(1).
  3. Cycle 1 (GREEN): Create Stack class with empty push method.
  4. Cycle 2 (RED): Write test for stack.pop() returning pushed item.
  5. Cycle 2 (GREEN): Add array to Stack, push to it, pop from it.
  6. Refactor: (None needed for this simple case).

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.