KS
Killer-Skills

write-unit-tests — how to use write-unit-tests how to use write-unit-tests, write-unit-tests for .NET, generate unit tests for C#, write-unit-tests alternative, write-unit-tests setup guide, write-unit-tests install

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/6/2026

Quality Score

Top 5%
44
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add klemensms/mcp-consultant-tools/write-unit-tests

Agent Capability Analysis

The write-unit-tests MCP Server by klemensms is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use write-unit-tests, write-unit-tests for .NET, generate unit tests for C#.

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 MCP Server

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
Project
SKILL.md
3.1 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
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.

Related Skills

Looking for an alternative to write-unit-tests or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

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
Communication

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
Communication