.NET Development Patterns
Write and review idiomatic C# with Muse: records and immutability, async/await with cancellation tokens, dependency injection, Options pattern, Result pattern, EF Core repositories, minimal APIs, guard clauses.
- What
- Write and review idiomatic C# with Muse: records and immutability, async/await with cancellation tokens, dependency injection, Options pattern, Result pattern, EF Core repositories, minimal APIs, guard clauses.
- Cost
- Free
- Needs
- Use ".NET Development Patterns" with your Muse.
- Install
- Copy the installer prompt below into your Muse — your agent does the rest.
Curated by Skill Harbor: an idiomatic .NET pattern guide that makes Muse write and review C# the way experienced .NET developers do. Core principles first: prefer immutability with sealed records and init-only properties, be explicit about nullability and access modifiers, and depend on abstractions with interface-based services registered in the DI container. Async guidance is strict: async all the way with CancellationToken threaded through, Task.WhenAll for independent parallel operations, and never .Result or .Wait on the happy path because of deadlock risk. The Options pattern binds config sections to strongly-typed objects via IOptions, the Result pattern returns explicit success or failure records instead of throwing for expected failures, and the EF Core repository pattern shows Include plus AsNoTracking for read paths. It also covers a request-timing middleware example, organized minimal APIs with MapGroup, RequireAuthorization, and TypedResults, guard clauses that keep the happy path un-nested with ArgumentNullException.ThrowIfNull and range checks, and a sharp anti-pattern table: async void, empty catch blocks, new Service in constructors, public fields, dynamic in business logic, mutable static state, and string.Format in loops, each with its fix. By @affaan-m, listed here with credit to its creator. From the affaan-m/ECC repository (MIT). Honest caveats: modern C# idioms assumed (records, required members), adapt if you maintain older frameworks; guidance, not a compiler. Skill Harbor never reviews the code, review it yourself before use.
Version:
Install
Copy the install package below, then paste it into MuseThe install prompt below already includes the vetting steps: your agent follows the community checklist before installing anything with executable code. Want more?
Use ".NET Development Patterns" with your Muse. Prerequisites: none to install. Pure guidance; a C# .NET project helps. 1. Open the skill: https://github.com/affaan-m/ECC/blob/main/skills/dotnet-patterns/SKILL.md and copy the full SKILL.md text. 2. Paste it into a chat with Muse and add: "Review this C# code against the .NET patterns: [paste code]." 3. Ask follow-ups like "convert this to the Result pattern" or "find the blocking .Result calls and the missing cancellation tokens." Tip: tell Muse whether you target ASP.NET Core, a worker service, or a library so the conventions match. Safety: a skill is plain-text instructions; it runs nothing by itself. Review generated commands before running them.
Saved to your recent installs. Find it anytime on /connect.
Questions
How do I install a build?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the build up for you — no manual configuration.
Where does my money go?
Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.
What does the ✓ next to a creator’s name mean?
It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a build before installing it.