Agent skill · Testing & QA

tdd-feature

Red-green-refactor scaffold for building new features with TDD. Write failing tests first, then implement to pass. Use when building new features test-first.

rshankrasgithub.com/rshankrasGitHub ↗
claude-codecan modify filesMIT
Install
npx skills add rshankras/claude-code-apple-skills --skill tdd-feature --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 9 KB
Bundled scripts: none
Allowed tools: ReadWriteEditGlobGrepBashAskUserQuestion
Path: skills/testing/tdd-feature/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 589
Language: Swift

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# TDD Feature Build new features using the red-green-refactor cycle. Tests define the spec, AI generates the implementation, tests verify correctness. ## When This Skill Activates Use this skill when the user: - Wants to "TDD a new feature" or "build test-first" - Says "I want tests before code" - Asks for "red-green-refactor" workflow - Wants AI to generate code that's provably correct - Is building a new module, service, or feature from scratch ## Why TDD for New Features with AI ``` Traditional: AI generates code → You hope it's correct → Ship → Find bugs TDD with AI: You write tests (spec) → AI generates code to pass → Proven correct ``` The test is your **acceptance criteria in code form**. AI excels at going from failing test to passing implementation — it's a concrete, unambiguous target. ## Process ### Phase 1: Define the Feature Before writing any code or tests, understand: 1. **What does this feature do?** (user story or requirement) 2. **What are the inputs?** (parameters, user actions, data) 3. **What are the outputs?** (return values, state changes, UI updates) 4. **What are the edge cases?** (empty, nil, error, boundary) 5. **What dependencies does it need?** (network

What's inside
Steps it walks through
  1. When This Skill Activates
  2. Why TDD for New Features with AI
  3. Process
  4. Phase 1: Define the Feature
  5. Phase 2: Design the API Surface
  6. Phase 3: RED — Write Failing Tests
  7. Phase 4: GREEN — Implement to Pass
  8. Phase 5: REFACTOR
  9. Phase 6: Integration
  10. TDD Rhythm
  11. Test Categories by Feature Type
  12. ViewModel Feature
  13. Data Layer Feature
  14. Business Logic Feature
Ships with 1 file
  • rules/swiftlint.yml
Commands it runs
xcodebuild test -scheme YourApp \
More from claude-code-apple-skills
All skills →
About this skill
What does the tdd-feature skill do?

Red-green-refactor scaffold for building new features with TDD. Write failing tests first, then implement to pass. Use when building new features test-first.

How do I install it?

Run `npx skills add rshankras/claude-code-apple-skills --skill tdd-feature --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From rshankras/claude-code-apple-skills, a repository with 589 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going