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.
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.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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
- When This Skill Activates
- Why TDD for New Features with AI
- Process
- Phase 1: Define the Feature
- Phase 2: Design the API Surface
- Phase 3: RED — Write Failing Tests
- Phase 4: GREEN — Implement to Pass
- Phase 5: REFACTOR
- Phase 6: Integration
- TDD Rhythm
- Test Categories by Feature Type
- ViewModel Feature
- Data Layer Feature
- Business Logic Feature
xcodebuild test -scheme YourApp \
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.
