csharp

Routes C# tasks to sub-skills covering modern coding standards and MSTest unit testing.

3|Updated Aug 8, 2026
One-click install
npx skills add https://github.com/Jose-Polanco-Oxte/Echos-Live-Music-Visualizer --skill csharp-jose-polanco-oxte
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp
Source: https://github.com/Jose-Polanco-Oxte/Echos-Live-Music-Visualizer/tree/main/.agents/skills/csharp
Command: npx skills add https://github.com/Jose-Polanco-Oxte/Echos-Live-Music-Visualizer --skill csharp-jose-polanco-oxte

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When working on C#/.NET code, it is hard to know which conventions and testing practices to apply for a given task. This Skill acts as a router that directs the agent to the right sub-skill—modern C# coding standards or MSTest unit testing—so only the relevant guidance is loaded. ## Core Features & Use Cases - Sub-skill routing: Lists available sub-skills under sub-skills/ and explains when to load each one, keeping context usage minimal. - Modern C# Coding Standards: Covers records, readonly record struct value objects, pattern matching, nullable reference types, async/await with CancellationToken, Span<T>/Memory<T>, API design, and Result-type error handling. - MSTest Best Practices: Covers MSTest 3.x/4.x assertions, data-driven tests with DataRow/DynamicData, TestContext, lifecycle, parallelization, and conditional execution. - Use Case: When asked to refactor a C# service class, load the modern-csharp-coding-standards sub-skill; when asked to add unit tests, load the csharp-mstest sub-skill instead. ## Quick Start Ask the agent to write or refactor C# code or MSTest unit tests, and it will load the matching sub-skill for the task.

Frequently Asked Questions about csharp

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

FAQPage Schema
How do I write modern C# code with records and pattern matching?

Use record types for immutable DTOs and domain entities, readonly record struct for value objects, and switch expressions with property and relational patterns for branching logic. The modern-csharp-coding-standards sub-skill provides detailed examples of each pattern.

How do I write data-driven unit tests with MSTest?

Use [DataRow] attributes for inline test cases or [DynamicData] with IEnumerable of ValueTuple or TestDataRow for type-safe test data. The csharp-mstest sub-skill covers MSTest 3.x/4.x assertions, lifecycle, and TestContext usage.

When should I use Span<T> versus Memory<T> in C#?

Use Span<T> for synchronous, zero-allocation operations on buffers, and Memory<T> when data must cross await boundaries in async methods. Use ArrayPool<T> for large temporary buffers to reduce GC pressure.

Should I use exceptions or a Result type for error handling in C#?

Use a Result<TValue, TError> type for expected errors like validation failures and business rule violations, and reserve exceptions for unexpected failures such as network errors or programming bugs. The coding standards sub-skill includes a full Result type implementation.

Does this skill cover test parallelization and flaky test retries in MSTest?

Yes, the csharp-mstest sub-skill covers assembly-level parallelization with [Parallelize], [DoNotParallelize] for sequential classes, [Retry] for flaky tests in MSTest 3.9+, and OS/CI conditional execution attributes.