dev-tdd-backend

Implement a TDD workflow for C#/.NET using xUnit, NSubstitute, and event sourcing.

7|3|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/eriklieben/agentic-dev-workflow --skill dev-tdd-backend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dev-tdd-backend
Source: https://github.com/eriklieben/agentic-dev-workflow/tree/main/.claude/skills/dev-tdd-backend
Command: npx skills add https://github.com/eriklieben/agentic-dev-workflow --skill dev-tdd-backend

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the challenge of maintaining high code quality and reliability in complex C#/.NET backends by enforcing a strict Test-Driven Development (TDD) cycle that ensures business logic is verified before implementation.

Core Features & Use Cases

  • Structured TDD Cycle: Enforces the RED-GREEN-REFACTOR loop using xUnit and NSubstitute to ensure minimal, high-quality code.
  • Event Sourcing & Specification Testing: Provides specialized patterns for testing aggregate state via event streams and validating domain specifications.
  • Runtime Verification: Integrates with Aspire to catch DI, configuration, and projection errors that unit tests might miss.

Quick Start

Use the dev-tdd-backend skill to guide the implementation of a new domain service by writing a failing test for the primary operation first.

Frequently Asked Questions about dev-tdd-backend

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

FAQPage Schema
How do I implement a strict TDD workflow for C#/.NET backend domain logic?

To implement TDD for C#/.NET backends, enforce a structured RED-GREEN-REFACTOR cycle using xUnit and NSubstitute, ensuring minimal code is written to pass failing tests for robust domain logic.

How does event sourcing testing work for aggregate state in .NET?

Event sourcing testing works by applying specialized patterns to verify aggregate state via event streams and validating domain specifications, ensuring your complex backend architectures maintain correct state transitions.

Can I use xUnit and NSubstitute to test domain specifications in a .NET backend?

Yes, you can use xUnit and NSubstitute to test domain specifications by adhering to nested test class patterns, which facilitate rigorous verification of aggregate behavior and projection logic within complex backend architectures.

Does Aspire integration help catch dependency injection and projection errors in .NET tests?

Yes, Aspire integration provides runtime verification to catch dependency injection, configuration, and projection errors that standard unit tests might miss, ensuring comprehensive health checks for backend architectures.

What is the best way to structure xUnit tests for aggregate state verification in event sourcing?

The best way to structure xUnit tests for aggregate state is by using nested test class patterns that facilitate rigorous verification of event streams and domain specifications throughout the TDD cycle.

When do I need event sourcing patterns for testing C#/.NET applications?

You need event sourcing patterns when maintaining high code quality and reliability in complex C#/.NET backends, as it enforces strict TDD cycles that verify business logic through event streams before implementation.