tdd-workflows-tdd-red
Skill1 starsChanged 10 months agoMITView on GitHub
Generate failing tests for the TDD red phase to define expected behavior and edge cases.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- ai4brands-design/claude-skillsword for word, first seen Mar 22, 2026
- xfstudio/skillsword for word, first seen Jan 22, 2026
Other versions2 projects use a version of this.
Word for word · 2
- xfstudio/skills★ 9100% same
- ai4brands-design/claude-skills★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository57 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- api-design-principlesSkill
- architect-reviewSkill
- architecture-decision-recordsSkill
- architecture-patternsSkill
- architectureSkill
- c4-architectureSkill
- c4-codeSkill
- c4-componentSkill
- c4-containerSkill
- c4-contextSkill
- clean-codeSkill
- mermaid-diagramsSkill
- mermaid-expertSkill
- tdd-orchestratorSkill
- tdd-workflowSkill
- tdd-workflows-tdd-cycleSkill
- tdd-workflows-tdd-greenSkill
- tdd-workflows-tdd-refactorSkill
- test-driven-developmentSkill
- api-design-principlesSkill
- architect-reviewSkill
- architecture-decision-recordsSkill
- architecture-patternsSkill
- architectureSkill
- auth-securitySkill
- billing-saasSkill
- c4-architectureSkill
- c4-codeSkill
- c4-componentSkill
- c4-containerSkill
- c4-contextSkill
- clean-codeSkill
- design-consistencySkill
- disciplined-devSkill
- gurusup-workflowSkill
- hardening-interviewerSkill
- linkedin-contentSkill
- mermaid-diagramsSkill
- mermaid-expertSkill
- mobile-first-ui-librarySkill
- mvp-automationSkill
- mvp-generatorSkill
- observabilitySkill
- parallel-integrationSkill
- prd-workflowSkill
- production-readinessSkill
- shape-upSkill
- spec-interviewerSkill
- tdd-orchestratorSkill
- tdd-workflowSkill
- tdd-workflows-tdd-cycleSkill
- tdd-workflows-tdd-greenSkill
- tdd-workflows-tdd-redSkill
- tdd-workflows-tdd-refactorSkill
- tech-advisorSkill
- test-driven-developmentSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 6
Write comprehensive failing tests following TDD red phase principles.
- Distinctive: line 26
Ensure failures are due to missing behavior, not setup errors.
- Distinctive: line 27
Document how to run tests and verify failures.
- Distinctive: line 31
Keep test data isolated and avoid production environments.
- Distinctive: line 32
Avoid flaky external dependencies in the red phase.
- Very specific: line 72
Use @testing-library for React components
- Very specific: line 83
Use testify/assert for cleaner assertions
- Distinctive: line 125
Run tests - confirm they fail
- Distinctive: line 126
Verify helpful failure messages
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Write comprehensive failing tests following TDD red phase principles.
[Extended thinking: Generates failing tests that properly define expected behavior using test-automator agent.]
Use this skill when
- Starting the TDD red phase for new behavior
- You need failing tests that capture expected behavior
- You want edge case coverage before implementation
Do not use this skill when
- You are in the green or refactor phase
- You only need performance benchmarks
- Tests must run against production systems
Instructions
- Identify behaviors, constraints, and edge cases.
- Generate failing tests that define expected outcomes.
- Ensure failures are due to missing behavior, not setup errors.
- Document how to run tests and verify failures.
Safety
- Keep test data isolated and avoid production environments.
- Avoid flaky external dependencies in the red phase.
Role
Generate failing tests using Task tool with subagent_type="unit-testing::test-automator".
Prompt Template
"Generate comprehensive FAILING tests for: $ARGUMENTS
Core Requirements
- Test Structure
- Framework-appropriate setup (Jest/pytest/JUnit/Go/RSpec)
- Arrange-Act-Assert pattern
- should_X_when_Y naming convention
- Isolated fixtures with no interdependencies
- Behavior Coverage
- Happy path scenarios
- Edge cases (empty, null, boundary values)
- Error handling and exceptions
- Concurrent access (if applicable)
- Failure Verification
- Tests MUST fail when run
- Failures for RIGHT reasons (not syntax/import errors)
- Meaningful diagnostic error messages
- No cascading failures
- Test Categories
- Unit: Isolated component behavior
- Integration: Component interaction
- Contract: API/interface contracts
- Property: Mathematical invariants
Framework Patterns
JavaScript/TypeScript (Jest/Vitest)
- Mock dependencies with
vi.fn()orjest.fn() - Use
@testing-libraryfor React components - Property tests with
fast-check
Python (pytest)
- Fixtures with appropriate scopes
- Parametrize for multiple test cases
- Hypothesis for property-based tests
Go
- Table-driven tests with subtests
t.Parallel()for parallel execution- Use
testify/assertfor cleaner assertions
Ruby (RSpec)
letfor lazy loading,let!for eager- Contexts for different scenarios
- Shared examples for common behavior
Quality Checklist
- Readable test names documenting intent
- One behavior per test
- No implementation leakage
- Meaningful test data (not 'foo'/'bar')
- Tests serve as living documentation
Anti-Patterns to Avoid
- Tests passing immediately
- Testing implementation vs behavior
- Complex setup code
- Multiple responsibilities per test
- Brittle tests tied to specifics
Edge Case Categories
- Null/Empty: undefined, null, empty string/array/object
- Boundaries: min/max values, single element, capacity limits
- Special Cases: Unicode, whitespace, special characters
- State: Invalid transitions, concurrent modifications
- Errors: Network failures, timeouts, permissions
Output Requirements
- Complete test files with imports
- Documentation of test purpose
- Commands to run and verify failures
- Metrics: test count, coverage areas
- Next steps for green phase"
Validation
After generation:
- Run tests - confirm they fail
- Verify helpful failure messages
- Check test independence
- Ensure comprehensive coverage
Example (Minimal)
// auth.service.test.ts
describe('AuthService', () => {
let authService: AuthService;
let mockUserRepo: jest.Mocked<UserRepository>;
beforeEach(() => {
mockUserRepo = { findByEmail: jest.fn() } as any;
authService = new AuthService(mockUserRepo);
});
it('should_return_token_when_valid_credentials', async () => {
const user = { id: '1', email: 'test@example.com', passwordHash: 'hashed' };
mockUserRepo.findByEmail.mockResolvedValue(user);
const result = await authService.authenticate('test@example.com', 'pass');
expect(result.success).toBe(true);
expect(result.token).toBeDefined();
});
it('should_fail_when_user_not_found', async () => {
mockUserRepo.findByEmail.mockResolvedValue(null);
const result = await authService.authenticate('none@example.com', 'pass');
expect(result.success).toBe(false);
expect(result.error).toBe('INVALID_CREDENTIALS');
});
});Test requirements: $ARGUMENTS
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

