tdd

A test-first development workflow for .NET 10. Test-driven development means writing a failing test first, adding the smallest implementation that passes it, and then improving the code.

In plain words
What is it for?
Use it to develop features, reproduce and fix bugs, and add behavior with xUnit tests, real HTTP integration tests, containerized databases, snapshot comparisons, and controlled time.
Why use it?
It provides evidence that a feature or bug fix works before it is considered finished, while keeping the implementation tied to expected behavior.

Skill for Claude CodeCodex

Part of the dotnet-claude-kit plugin — 44 skills, 10 agents, 2 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/codewithmukesh/dotnet-claude-kit/tdd
Any agent
npx skills add codewithmukesh/dotnet-claude-kit --skill tdd
Clone the repo
git clone --depth 1 https://github.com/codewithmukesh/dotnet-claude-kit

Made for: Claude Code, Codex.

Or install dotnet-claude-kit, the plugin that ships this one along with the rest of its 44 skills, 10 agents, 2 hooks, 1 MCP server.

Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,271 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00081 $0.01271
Opus 5 $0.00041 $0.00635
Sonnet 5 $0.00016 $0.00254
Haiku 4.5 $0.00008 $0.00127

Measured 3d ago against content hash 6d33aa1c3995, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

tdd scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/tdd/SKILL.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/tdd -- Red-Green-Refactor for .NET

What

Guides a strict test-driven development cycle for .NET features. Instead of writing implementation first and bolting on tests after, this command flips the order: write a failing test that defines the desired behavior, implement the minimum code to make it pass, then refactor with confidence.

Every cycle uses the .NET testing stack:

  • xUnit v3 -- Test framework with [Fact] and [Theory]
  • WebApplicationFactory -- Integration tests against the real HTTP pipeline
  • Testcontainers -- Real databases (PostgreSQL, SQL Server) in tests
  • Verify -- Snapshot testing for complex response structures
  • FakeTimeProvider -- Deterministic time in tests

When

  • User says "TDD", "test-driven", "let's TDD this", "write the test first"
  • Building a new feature with clear acceptance criteria
  • Fixing a bug (write a test that reproduces the bug first, then fix)
  • Adding behavior to an existing feature (test the new behavior first)
  • Any time the user wants proof that code works before it ships

Skip TDD for: Trivial config changes, scaffolding without logic, documentation.

How

Cycle: Red -> Green -> Refactor

Each feature goes through one or more TDD cycles. A cycle covers one discrete behavior.

Step 1: Red -- Write the Failing Test

Write a test that describes the desired behavior. The test MUST fail because the implementation does not exist yet.

[Fact]
public async Task CreateOrder_WithValidItems_Returns201WithOrderId()
{
    // Arrange
    var client = _factory.CreateClient();
    var request = new CreateOrderRequest([
        new OrderItemRequest("SKU-001", 2, 29.99m)
    ]);

    // Act
    var response = await client.PostAsJsonAsync("/api/orders", request);

    // Assert — plain xUnit Assert (FluentAssertions v8+ requires a commercial license)
    Assert.Equal(HttpStatusCode.Created, response.StatusCode);
    var result = await response.Content.ReadFromJsonAsync<CreateOrderResponse>();
    Assert.NotNull(result);
    Assert.NotEqual(Guid.Empty, result.OrderId);
}

Read the full file on GitHub · 165 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 165 lines · 81 tokens per session scan A 6d33aa1c3995

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository codewithmukesh/dotnet-claude-kit (689 stars, last pushed 26d ago), licensed MIT. It adds 81 tokens to every session and 1,271 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

test-driven-development

Drives .NET/C# development with tests — RED/GREEN/REFACTOR with xUnit (v2 or v3) or MSTest, the Prove-It Pattern for bug fixes, the test pyramid with WebApplicationFactory for integration and Playwright/Avalonia.Headless for E2E. Supports both VSTest and Microsoft.Testing.Platform (MTP) runners. Use when implementing…

peterblazejewicz/claude-plugins · 103 tokens

tdd

Test-Driven Development para .NET Core. Usar cuando se implemente codigo nuevo o se modifique existente. Ciclo RED-GREEN-REFACTOR con persistencia automatica del progreso en .harness-state.json para retomar tras interrupcion. Organizacion: una carpeta por clase, un archivo .cs por metodo con todos sus escenarios…

DevelopmentAgentSDD/MCP-JiraCloud · 83 tokens

dotnet-tdd

.NET Core TDD workflow using xUnit, Moq, and FluentAssertions. Guides the Plan-Test-Implement-Review cycle for C# code. Use when user says "write tests first", "TDD", "Red-Green-Refactor", "unit test this handler", or asks to implement a feature test-driven. Do NOT use for integration tests, E2E tests, BDD/Gherkin…

cuongtl1992/vibe-skills · 108 tokens

csharp-tdd-develop

TDD 기반 C#/.NET 개발. 테스트 먼저 작성 후 구현. Red-Green-Refactor 순서 강제. 서브에이전트에 위임.

JeongHeonK/c-sharp-custom-marketplace · 43 tokens

agui-dotnet-streaming-chat

Get started with the AG-UI .NET SDK: bootstrap and run your first streaming-chat app (client + server) with the AG-UI .NET NuGet packages (AGUI.Client, AGUI.Server, AGUI.Formatting, AGUI.Abstractions). USE FOR: which packages to install and how to wire them; constructing an AGUIChatClient against an endpoint and…

ag-ui-protocol/ag-ui · 223 tokens

agui-dotnet-shared-state

Share structured, evolving state between an AG-UI agent and its client with the AG-UI .NET SDK — the client seeds state on the request, the server reads it, mutates it, and streams the updated state back as snapshots or deltas alongside the chat. USE FOR: sending initial/working state from the client via…

ag-ui-protocol/ag-ui · 215 tokens