CRITICAL: When the user asks to implement/build/add a feature or mentions feature development, invoke this skill FIRST (BEFORE invoking feature-dev or any other feature development workflow). This establishes test-driven development requirements and ensures tests are written early and explicitly planned as separate steps. Do NOT wait until feature-dev is already running - invoke this BEFORE starting any feature development workflow.
From tdd-feature-devnpx claudepluginhub dhughes/claude-marketplace --plugin tdd-feature-devThis skill uses the workspace's default tool permissions.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Guides idea refinement into designs: explores context, asks questions one-by-one, proposes approaches, presents sections for approval, writes/review specs before coding.
This skill augments feature development workflows to ensure test-driven development (TDD) practices are consistently followed. It emphasizes writing tests early, planning them as explicit steps, and maintaining high test coverage.
When implementing features, tests should not be an afterthought. This skill ensures that:
IMPORTANT: This skill should be invoked BEFORE any feature development workflow begins (such as feature-dev). The intended flow is:
Do NOT invoke this skill after feature-dev has already started - it will be too late to integrate TDD principles into the planning phase.
Apply these guidelines when:
Tests are the foundation of code quality. Write tests early in the development process, not as a final step.
TDD-ish Approach: For core business logic, write tests alongside implementation:
This is not strict TDD (test-first always), but rather a pragmatic approach that ensures tests are written while the implementation context is fresh.
When creating implementation plans or TODO lists:
❌ WRONG:
- Implement user authentication service (including tests)
- Add password hashing
- Create login endpoint
✅ CORRECT:
- Design user authentication service interface
- Write tests for user authentication service
- Implement user authentication service
- Write tests for password hashing
- Add password hashing functionality
- Write tests for login endpoint
- Create login endpoint
- Run all tests and verify 80% coverage
Each test-writing activity should be a separate, explicit TODO item so it's tracked and not forgotten.
Tests should verify WHAT the code does (behavior/features), not HOW it does it (implementation details).
This is one of the most important testing principles. Tests should:
Good Examples:
authenticateUser() returns a valid token for correct credentialsBad Examples:
authenticateUser() calls specific internal helper methods_hashPassword() function is invokedIf the implementation changes but the behavior stays the same, tests should still pass.
Never write tests for private/internal functions or methods.
Test only the public API and observable behavior. Private functions are implementation details that:
If a private function feels like it needs its own tests, consider:
The solution is better design, not testing private functions.
Target 80% code coverage as a baseline for quality. This ensures most code paths are exercised without requiring 100% coverage on trivial code.
When understanding requirements, consider:
When evaluating approaches, consider:
Prefer architectures that enable easy testing. Code that's hard to test is often poorly designed.
CRITICAL: When creating the implementation plan and TODO list:
For example, when implementing a new API endpoint:
- Design endpoint interface and response schema
- Write tests for successful request case
- Write tests for validation errors
- Write tests for authentication failures
- Implement endpoint handler
- Run tests and verify they pass
NOT:
- Implement endpoint
- Add tests later
Verify:
This skill does NOT specify:
This skill DOES specify:
When creating an implementation plan:
This ensures tests are visible, tracked, and completed alongside implementation rather than being forgotten or delayed until the end.
By following these guidelines, feature development naturally incorporates testing as a first-class activity, resulting in higher quality, more maintainable code with fewer bugs.