write-unit-tests — write-unit-tests for .NET write-unit-tests, mcp-consultant-tools, community, write-unit-tests for .NET, ide skills, generate unit tests for C#, write-unit-tests install, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Ideal for C#-focused AI Agents needing automated unit test generation for .NET projects. write-unit-tests is a skill that analyzes C# source code files and generates complete unit test files following defined testing patterns and standards.

Features

Generates unit tests for C# source code files
Follows testing patterns and standards defined in the project's testing instructions
Covers business scenarios, edge cases, and error conditions
Extends or tweaks existing unit tests using defined standards
Supports .NET testing specialists and developers

# Core Topics

klemensms klemensms
[0]
[0]
Updated: 3/8/2026

Agent Capability Analysis

The write-unit-tests skill by klemensms is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for write-unit-tests for .NET, generate unit tests for C#, write-unit-tests install.

Ideal Agent Persona

Ideal for C#-focused AI Agents needing automated unit test generation for .NET projects.

Core Value

Empowers agents to generate comprehensive unit tests covering business scenarios, edge cases, and error conditions, utilizing C# source code analysis and adhering to project-defined testing patterns and standards.

Capabilities Granted for write-unit-tests

Generating unit tests for .NET applications
Automating test coverage for C# source code
Validating error conditions and edge cases in .NET projects

! Prerequisites & Limits

  • Requires C# source code files
  • .NET testing specialists' input for testing instructions
  • Version 1.0 compatibility
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

write-unit-tests

Install write-unit-tests, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

version: "1.0" author: Michal Sobieraj

Unit Test Generation Prompt

Role

You are an expert .NET testing specialist. Analyze C# source code files and generate comprehensive unit tests following the testing patterns and standards defined in the project's testing instructions.

Task

Generate complete unit test files that cover all business scenarios, edge cases, and error conditions for the given source code.

Additional instructions

When extending or tweaking existing unit tests, use this SKILL.md document and follow the existing conventions in the file.

When creating new unit tests for a new class or project: YOU MUST first read the file .claude/skills/write-unit-tests/write-unit-tests-instructions.md before proceeding. This file contains comprehensive testing patterns, AAA structure examples, assertion patterns, and framework-specific configurations that are essential for generating proper unit tests.

Analysis Requirements

1. Project Type Identification

Determine the project type to apply correct testing patterns:

  • Domain (.NET 8.0): Business logic, services, validators → NUnit + FakeItEasy
  • Infrastructure (.NET 8.0): Dataverse repositories → NUnit + FakeXrmEasy (Commercial)
  • Plugin (.NET 4.8): Dataverse plugins → NUnit + FakeXrmEasy (NonCommercial)

2. Test Scenario Coverage

For each public method, generate tests for:

  • Happy Path: Valid inputs, successful operations
  • Input Validation: Null checks, empty values, invalid formats, boundary conditions
  • Business Logic: Domain rules, calculations, state transitions, conditional branches
  • Error Handling: Exceptions, error results, failure recovery
  • Dependencies: Mock behavior, call verification, failure scenarios
  • Integration: External services, database operations (mark with [Category("Integration")])

Critical Requirements

Must Follow Testing Instructions

  • AAA Pattern: Strict Arrange-Act-Assert structure with clear section separation
  • NUnit Constraint Model: Use Assert.That() - NEVER classic Assert methods
  • Naming: MethodName_Scenario_ExpectedResult pattern
  • Framework Versions: Use exact versions specified in testing instructions

Output Requirements

1. Complete Test File

  • Full test class with proper namespace and using statements
  • All required NuGet packages listed in comments
  • Proper test lifecycle setup ([SetUp], [OneTimeSetUp])
  • Helper methods for test data creation

2. Test Coverage Summary

  • Number of test methods generated
  • Scenarios covered per method
  • Dependencies mocked
  • Special considerations

3. Setup Instructions

  • Required NuGet packages for the test project
  • Any additional configuration needed
  • Integration test requirements

Process

  1. Analyze source code structure and identify project type
  2. Extract all testable methods and business logic
  3. Generate comprehensive test methods using established patterns
  4. Verify all scenarios are covered with proper assertions
  5. Provide complete, maintainable test file

Generate tests that follow the project's testing standards and would pass senior developer review.

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is write-unit-tests?

Ideal for C#-focused AI Agents needing automated unit test generation for .NET projects. write-unit-tests is a skill that analyzes C# source code files and generates complete unit test files following defined testing patterns and standards.

How do I install write-unit-tests?

Run the command: npx killer-skills add klemensms/mcp-consultant-tools/write-unit-tests. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for write-unit-tests?

Key use cases include: Generating unit tests for .NET applications, Automating test coverage for C# source code, Validating error conditions and edge cases in .NET projects.

Which IDEs are compatible with write-unit-tests?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for write-unit-tests?

Requires C# source code files. .NET testing specialists' input for testing instructions. Version 1.0 compatibility.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add klemensms/mcp-consultant-tools/write-unit-tests. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use write-unit-tests immediately in the current project.

Related Skills

Looking for an alternative to write-unit-tests or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI