From csharp-write-tests
This skill should be used when the user asks to 'write tests', 'generate tests', 'create unit tests', or 'add tests' for a C# class or file.
How this skill is triggered — by the user, by Claude, or both
Slash command
/csharp-write-tests:write-testsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Read the target file(s), understand all its public methods and behaviors, then generate a comprehensive test class following the conventions below.
Read the target file(s), understand all its public methods and behaviors, then generate a comprehensive test class following the conventions below.
.UTest suffix.UTest inserted after the project name.TestHelpers class in the root of the .UTest project for helper methods and test data generation.TestHelpers class should always have a Gen<T>() method for generating random values of any type of the form public static T Gen<T>() => Fixture.Create<T>();.GlobalUsings.cs file in the root of the .UTest project with using statements for all the testing specific namespaces. It should have a global using static TestHelpers.<ClassName>Tests.<MethodName>_Should<ExpectedBehavior>_When<Conditions>._When<Conditions> if there are no unique conditions.// given, // when, // then.// given section.Assert.That syntax for all assertions.Assert.Multiple.[TestCase] attribute when testing multiple scenarios for the same method.Gen<T>() for values unless the value has an important meaning.Create<ClassName>() methods to create and setup these mock objects at the bottom of the test class.TestHelpers class at the root of the UTest project.Mock.Get to get the underlying mock when Verify is needed.sut as a variable name use a meaningful name.UTest project for patterns and available test helpersTestHelpers for Gen() and Create methods common to multiple tests.dotnet build <TestProject>.csprojdotnet test <TestProject>.csproj --filter "FullyQualifiedName~<TestClassName>"npx claudepluginhub dhaub/readable --plugin csharp-write-testsCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.