MR
Mayur Rathi
@mayurrathi
⭐ 40.7k GitHub stars

Tdd Workflows Tdd Red

Tdd Workflows Tdd Red is an productivity AI skill with a core value of Generate failing tests for the TDD red phase to define expected behavior and edge cases. It helps developers solve real-world problems in the productivity domain, boosting efficiency, automating repetitive tasks, and optimizing workflows.

Generate failing tests for the TDD red phase to define expected behavior and edge cases.

Last verified on: 2026-07-07

Quick Facts

Category productivity
Works With Claude
Source sickn33/antigravity-awesome-skills
Stars ⭐ 40.7k
Last Verified 2026-07-07
Risk Level Low
mkdir -p ./skills/tdd-workflows-tdd-red && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/tdd-workflows-tdd-red/SKILL.md -o ./skills/tdd-workflows-tdd-red/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

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


1. Identify behaviors, constraints, and edge cases.

2. Generate failing tests that define expected outcomes.

3. Ensure failures are due to missing behavior, not setup errors.

4. 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


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. **Behavior Coverage**

- Happy path scenarios

- Edge cases (empty, null, boundary values)

- Error handling and exceptions

- Concurrent access (if applicable)


3. **Failure Verification**

- Tests MUST fail when run

- Failures for RIGHT reasons (not syntax/import errors)

- Meaningful diagnostic error messages

- No cascading failures


4. **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()` or `jest.fn()`

- Use `@testing-library` for 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/assert` for cleaner assertions


**Ruby (RSpec)**

- `let` for 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:

1. Run tests - confirm they fail

2. Verify helpful failure messages

3. Check test independence

4. Ensure comprehensive coverage


Example (Minimal)


typescript
// 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);

    c

🎯 Best For

  • QA engineers
  • Developers writing unit tests
  • Developers scaffolding new projects
  • Prototype builders
  • Claude users

💡 Use Cases

  • Generating test cases for edge conditions
  • Writing integration test suites
  • Bootstrapping React components
  • Creating API route handlers

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Tdd Workflows Tdd Red to Your Work

    Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.

  4. 4

    Review and Refine

    Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.

❓ Frequently Asked Questions

Does this generate test mocks?

Many testing skills include mock generation. Check the install command and skill content for details.

Can I customize the generated output?

Yes — modify the skill's prompt instructions to match your project conventions and coding style.

How do I install Tdd Workflows Tdd Red?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/tdd-workflows-tdd-red/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Not testing edge cases

AI tends to generate happy-path tests. Manually review for boundary conditions.

Using generated code without understanding

Understand what generated code does before shipping it to production.

Not reading the full skill

Skills contain important context and edge cases beyond the quick start.

🔗 Related Skills