tdd-workflows-tdd-cycle

sickn33/antigravity-awesome-skills · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill tdd-workflows-tdd-cycle
0 commentsdiscussion
summary

Execute a comprehensive Test-Driven Development (TDD) workflow with strict red-green-refactor discipline:

skill.md

Use this skill when

  • Working on tdd workflows tdd cycle tasks or workflows
  • Needing guidance, best practices, or checklists for tdd workflows tdd cycle

Do not use this skill when

  • The task is unrelated to tdd workflows tdd cycle
  • You need a different domain or tool outside this scope

Instructions

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open resources/implementation-playbook.md.

Execute a comprehensive Test-Driven Development (TDD) workflow with strict red-green-refactor discipline:

[Extended thinking: This workflow enforces test-first development through coordinated agent orchestration. Each phase of the TDD cycle is strictly enforced with fail-first verification, incremental implementation, and continuous refactoring. The workflow supports both single test and test suite approaches with configurable coverage thresholds.]

Configuration

Coverage Thresholds

  • Minimum line coverage: 80%
  • Minimum branch coverage: 75%
  • Critical path coverage: 100%

Refactoring Triggers

  • Cyclomatic complexity > 10
  • Method length > 20 lines
  • Class length > 200 lines
  • Duplicate code blocks > 3 lines

Phase 1: Test Specification and Design

1. Requirements Analysis

  • Use Task tool with subagent_type="comprehensive-review::architect-review"
  • Prompt: "Analyze requirements for: $ARGUMENTS. Define acceptance criteria, identify edge cases, and create test scenarios. Output a comprehensive test specification."
  • Output: Test specification, acceptance criteria, edge case matrix
  • Validation: Ensure all requirements have corresponding test scenarios

2. Test Architecture Design

  • Use Task tool with subagent_type="unit-testing::test-automator"
  • Prompt: "Design test architecture for: $ARGUMENTS based on test specification. Define test structure, fixtures, mocks, and test data strategy. Ensure testability and maintainability."
  • Output: Test architecture, fixture design, mock strategy
  • Validation: Architecture supports isolated, fast, reliable tests

Phase 2: RED - Write Failing Tests

3. Write Unit Tests (Failing)

  • Use Task tool with subagent_type="unit-testing::test-automator"
  • Prompt: "Write FAILING unit tests for: $ARGUMENTS. Tests must fail initially. Include edge cases, error scenarios, and happy paths. DO NOT implement production code."
  • Output: Failing unit tests, test documentation
  • CRITICAL: Verify all tests fail with expected error messages

4. Verify Test Failure

  • Use Task tool with subagent_type="tdd-workflows::code-reviewer"
  • Prompt: "Verify that all tests for: $ARGUMENTS are failing correctly. Ensure failures are for the right reasons (missing implementation, not test errors). Confirm no false positives."
  • Output: Test failure verification report
  • GATE: Do not proceed until all tests fail appropriately

Phase 3: GREEN - Make Tests Pass

5. Minimal Implementation

  • Use Task tool with subagent_type="backend-development::backend-architect"
  • Prompt: "Implement MINIMAL code to make tests pass for: $ARGUMENTS. Focus only on making tests green. Do not add extra features or optimizations. Keep it simple."
  • Output: Minimal working implementation
  • Constraint: No code beyond what's needed to pass tests

6. Verify Test Success

  • Use Task tool with subagent_type="unit-testing::test-automator"
  • Prompt: "Run all tests for: $ARGUMENTS and verify they pass. Check test coverage metrics. Ensure no tests were accidentally broken."
  • Output: Test execution report, coverage metrics
  • GATE: All tests must pass before proceeding

Phase 4: REFACTOR - Improve Code Quality

7. Code Refactoring

  • Use Task tool with subagent_type="tdd-workflows::code-reviewer"
  • Prompt: "Refactor implementation for: $ARGUMENTS while keeping tests green. Apply SOLID principles, remove duplication, improve naming, and optimize performance. Run tests after each refactoring."
  • Output: Refactored code, refactoring report
  • Constraint: Tests must remain green throughout

8. Test Refactoring

  • Use Task tool with subagent_type="unit-testing::test-automator"
  • Prompt: "Refactor tests for: $ARGUMENTS. Remove test duplication, improve test names, extract common fixtures, and enhance test readability. Ensure tests still provide same coverage."
  • Output: Refactored tests, improved test structure
  • Validation: Coverage metrics unchanged or improved

Phase 5: Integration and System Tests

9. Write Integration Tests (Failing First)

  • Use Task tool with subagent_type="unit-testing::test-automator"
  • Prompt: "Write FAILING integration tests for: $ARGUMENTS. Test component interactions, API contracts, and data flow. Tests must fail initially."
  • Output: Failing integration tests
  • Validation: Tests fail due to missing integration logic

10. Implement Integration

  • Use Task tool with subagent_type="backend-development::backend-architect"
  • Prompt: "Implement integration code for: $ARGUMENTS to make integration tests pass. Focus on component interaction and data flow."
  • Output: Integration implementation
  • Validation: All integration tests pass

Phase 6: Continuous Improvement Cycle

11. Performance and Edge Case Tests

  • Use Task tool with subagent_type="unit-testing::test-automator"
  • Prompt: "Add performance tests and additional edge case tests for: $ARGUMENTS. Include stress tests, boundary tests, and error recovery tests."
  • Output: Extended test suite
  • Metric: Increased test coverage and scenario coverage

12. Final Code Review

  • Use Task tool with subagent_type="comprehensive-review::architect-review"
  • Prompt: "Perform comprehensive review of: $ARGUMENTS. Verify TDD process was followed, check code quality, test quality, and coverage. Suggest improvements."
  • Output: Review report, improvement suggestions
  • Action: Implement critical suggestions while maintaining green tests

Incremental Development Mode

For test-by-test development:

  1. Write ONE failing test
  2. Make ONLY that test pass
  3. Refactor if needed
  4. Repeat for next test

Use this approach by adding --incremental flag to focus on one test at a time.

Test Suite Mode

For comprehensive test suite development:

  1. Write ALL tests for a feature/module (failing)
  2. Implement code to pass ALL tests
  3. Refactor entire module
  4. Add integration tests

Use this approach by adding --suite flag for batch test development.

Validation Checkpoints

RED Phase Validation

  • All tests written before implementation
  • All tests fail with meaningful error messages
  • Test failures are due to missing implementation
  • No test passes accidentally

GREEN Phase Validation

  • All tests pass
  • No extra code beyond test requirements
  • Coverage meets minimum thresholds
  • No test was modified to make it pass

REFACTOR Phase Validation

  • All tests still pass after refactoring
  • Code complexity reduced
  • Duplication eliminated
  • Performance improved or maintained
  • Test readability improved

Coverage Reports

Generate coverage reports after each phase:

  • Line coverage
  • Branch coverage
  • Function coverage
  • Statement coverage

Failure Recovery

If TDD discipline is broken:

  1. STOP immediately
  2. Identify which phase was violated
  3. Rollback to last valid state
  4. Resume from correct phase
  5. Document lesson learned

TDD Metrics Tracking

Track and report:

  • Time in each phase (Red/Green/Refactor)
  • Number of test-implementation cycles
  • Coverage progression
  • Refactoring frequency
  • Defect escape rate

Anti-Patterns to Avoid

  • Writing implementation before tests
  • Writing tests that already pass
  • Skipping the refactor phase
  • Writing multiple features without tests
  • Modifying tests to make them pass
  • Ignoring failing tests
  • Writing tests after implementation

Success Criteria

  • 100% of code written test-first
  • All tests pass continuously
  • Coverage exceeds thresholds
  • Code complexity within limits
  • Zero defects in covered code
  • Clear test documentation
  • Fast test execution (< 5 seconds for unit tests)

Notes

  • Enforce strict RED-GREEN-REFACTOR discipline
  • Each phase must be completed before moving to next
  • Tests are the specification
  • If a test is hard to write, the design needs improvement
  • Refactoring is NOT optional
  • Keep test execution fast
  • Tests should be independent and isolated

TDD implementation for: $ARGUMENTS

how to use tdd-workflows-tdd-cycle

How to use tdd-workflows-tdd-cycle on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add tdd-workflows-tdd-cycle
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill tdd-workflows-tdd-cycle

The skills CLI fetches tdd-workflows-tdd-cycle from GitHub repository sickn33/antigravity-awesome-skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/tdd-workflows-tdd-cycle

Reload or restart Cursor to activate tdd-workflows-tdd-cycle. Access the skill through slash commands (e.g., /tdd-workflows-tdd-cycle) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.662 reviews
  • Aanya Farah· Dec 20, 2024

    Registry listing for tdd-workflows-tdd-cycle matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Dhruvi Jain· Dec 16, 2024

    tdd-workflows-tdd-cycle has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Alexander Mensah· Dec 16, 2024

    Keeps context tight: tdd-workflows-tdd-cycle is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Pratham Ware· Dec 12, 2024

    tdd-workflows-tdd-cycle is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Harper Khan· Nov 19, 2024

    Keeps context tight: tdd-workflows-tdd-cycle is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Min Zhang· Nov 15, 2024

    tdd-workflows-tdd-cycle fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Aditi Martinez· Nov 11, 2024

    tdd-workflows-tdd-cycle is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Nikhil Liu· Nov 11, 2024

    tdd-workflows-tdd-cycle reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Oshnikdeep· Nov 7, 2024

    Solid pick for teams standardizing on skills: tdd-workflows-tdd-cycle is focused, and the summary matches what you get after install.

  • Diya Bansal· Nov 7, 2024

    I recommend tdd-workflows-tdd-cycle for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

showing 1-10 of 62

1 / 7