From tdd-workflows
Generates failing tests following TDD red phase principles, covering unit, integration, contract, and property tests with proper failure verification.
How this command is triggered — by the user, by Claude, or both
Slash command
/tdd-workflows:tdd-redFiles this command reads when invoked
The summary Claude sees in its command listing — used to decide when to auto-load this command
Write comprehensive failing tests following TDD red phase principles. [Extended thinking: Generates failing tests that properly define expected behavior using test-automator agent.] ## Role Generate failing tests using Task tool with subagent_type="unit-testing::test-automator". ## Prompt Template "Generate comprehensive FAILING tests for: $ARGUMENTS ## Core Requirements 1. **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 2. **Behavi...
Write comprehensive failing tests following TDD red phase principles.
[Extended thinking: Generates failing tests that properly define expected behavior using test-automator agent.]
Generate failing tests using Task tool with subagent_type="unit-testing::test-automator".
"Generate comprehensive FAILING tests for: $ARGUMENTS
Test Structure
Behavior Coverage
Failure Verification
Test Categories
JavaScript/TypeScript (Jest/Vitest)
vi.fn() or jest.fn()@testing-library for React componentsfast-checkPython (pytest)
Go
t.Parallel() for parallel executiontestify/assert for cleaner assertionsRuby (RSpec)
let for lazy loading, let! for eagerAfter generation:
// 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: "[email protected]", passwordHash: "hashed" };
mockUserRepo.findByEmail.mockResolvedValue(user);
const result = await authService.authenticate("[email protected]", "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("[email protected]", "pass");
expect(result.success).toBe(false);
expect(result.error).toBe("INVALID_CREDENTIALS");
});
});
Test requirements: $ARGUMENTS
2plugins reuse this command
First indexed Jan 22, 2026
npx claudepluginhub jdziat/wshobson-agents --plugin tdd-workflows/tdd-redGenerates comprehensive failing tests following TDD red phase principles, covering unit, integration, contract, and property tests with isolated fixtures.
/tdd-startBootstraps a TDD cycle: writes failing tests first, then implements minimal code to pass. Accepts a function, class or feature description as input. Generates happy path, edge case and error tests, runs the suite, and confirms red-to-green transition.
/write-testsWrites unit and integration tests using a systematic approach — detects testing framework, plans strategy, implements tests with mocking, data setup, and coverage of edge cases, errors, and performance/security aspects.
/test-featureGenerates comprehensive TDD test suite (unit, integration, edge cases, error handling) for a feature description. Tests fail initially for implementation.
/tddStarts a TDD cycle (Red-Green-Refactor) for a requested feature, iterating one behavior at a time.
/tdd-redExecutes the TDD Red phase: creates failing test cases from requirements, runs them to confirm failure, and updates phase documentation.