MODE_Backend_TDD

Automate Red-Green-Refactor TDD cycles for NestJS backends with Clean Architecture.

Updated Apr 5, 2023
One-click install
npx skills add https://github.com/edneyreis999/zord-project --skill mode-backend-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: MODE_Backend_TDD
Source: https://github.com/edneyreis999/zord-project/tree/main/service_financial-claude/skills/MODE_Backend_TDD
Command: npx skills add https://github.com/edneyreis999/zord-project --skill mode-backend-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Transform backend development from waterfall to iterative TDD, driving design through tests and enabling Clean Architecture.

Core Features & Use Cases

  • Red-Green-Refactor cycles with interfaces/contracts before implementations.
  • Ensure coverage ≥80%, complexity <10%, server architecture alignment.
  • Metrics reporting (coverage, complexity, execution time).

Quick Start

Start with a use case: write a failing unit test, implement minimal code to pass, and iterate.

Frequently Asked Questions about MODE_Backend_TDD

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement test-driven development for NestJS backends?

Test-driven development for NestJS involves writing failing unit tests first, then implementing minimal code to pass them using the Red-Green-Refactor cycle. This Skill automates that workflow, enforcing interface-driven design, dependency injection, and Clean Architecture patterns to achieve ≥80% test coverage while maintaining code quality gates.

What is Clean Architecture and why does it matter for backend testing?

Clean Architecture separates your backend into distinct domain, application, and infrastructure layers. This layered approach enables testable contracts and interface-driven design, making it easier to isolate and test business logic independently of frameworks and external dependencies.

Can I use TDD with NestJS dependency injection?

Yes. TDD with NestJS dependency injection works through contract-first modeling—define service interfaces before implementations, then inject dependencies. This Skill applies DI-based wiring and interface-driven design to ensure your tests drive architecture decisions and maintain strict testability.

How do I measure test coverage and code complexity in a NestJS project?

This Skill automates metrics reporting including test coverage percentage, complexity scores, and execution time. It enforces coverage ≥80% and complexity <10% as quality gates, surfacing metrics so you can refactor critical services and maintain standards throughout development.

When should I apply TDD to backend development?

TDD is essential for MVP development under mandatory quality standards, refactoring critical services, or projects requiring high test coverage and architecture alignment. Use it when design quality, maintainability, and risk mitigation justify the upfront investment in tests-first cycles.