[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EMQ0MXE2QW2SHKFS7YD66T":3,"skill-same:01M7EMQ0MXE2QW2SHKFS7YD66T":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7EMQ0MXE2QW2SHKFS7YD66T","ams-csharp-pro",null,"TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-csharp-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: csharp-pro\ndescription: Idiomatic modern C#: nullable reference types, records, async\u002Fawait, LINQ, and .NET project structure. Use when writing, reviewing, or structuring C# applications.\ncategory: development\n---\n\n# C# Pro\n\n## Overview\n\nModern C# (10–13) with .NET is a **high-productivity, high-performance platform**: nullable\nreference types bring compile-time null safety, records simplify immutable data, async\u002Fawait is\nfirst-class, and minimal APIs plus strong tooling make everything from CLIs to cloud services\npleasant. Professional C# means enabling the safety features, modeling with the modern type\ntoolbox, writing async correctly, and using LINQ as a query language — not a cleverness contest.\n\nThe through-line: turn on every safety feature, model precisely, and let the runtime's maturity\ndo the heavy lifting.\n\n## When to use\n\n- Writing or reviewing C# for modern idiom (.NET 6+).\n- Structuring .NET solutions (projects, layering, DI).\n- Designing async code, data models, or APIs.\n- Enabling nullable reference types or modernizing legacy C#.\n- Setting up testing (xUnit\u002FNUnit), analyzers, and CI.\n\n## Core concepts\n\n- **Nullable reference types ON.** `\u003CNullable>enable\u003C\u002FNullable>` — nullability becomes part of the\n  type system (`string` vs `string?`). The migration is the value: every warning fixed is a\n  potential NullReferenceException eliminated. Treat warnings as errors in CI for new code.\n- **Records for immutable data.** `record` \u002F `record struct` for DTOs, messages, value objects —\n  value equality and non-destructive mutation (`with`) built in. Classes for behavior + identity,\n  structs for small hot-path values.\n- **Async all the way.** `async`\u002F`await` end-to-end; never `.Result`\u002F`.Wait()` (deadlocks under\n  synchronization contexts); `ConfigureAwait(false)` in libraries; `ValueTask` for hot paths where\n  the result is often already available. `IAsyncEnumerable\u003CT>` for async streams.\n- **LINQ as a query language.** Declarative transforms (`Where`\u002F`Select`\u002F`GroupBy`) over data —\n  but materialize deliberately (`ToList()` when multiple enumeration would re-run queries or\n  re-hit the DB), and watch for N+1 in EF Core (eager load with `Include`, project with `Select`).\n- **Dependency injection as the composition model.** Constructor injection, explicit lifetimes\n  (transient\u002Fscoped\u002Fsingleton — and know why scoped services can't live in singletons), and\n  `IOptions\u003CT>` for configuration. The container is not a service locator.\n- **Pattern matching + switch expressions.** Exhaustive, expression-based control flow over\n  `if\u002Felse` chains. Combined with records and discriminated-union-style hierarchies, it brings\n  much of the functional modeling power to C#.\n\n## Practical workflow\n\n1. **Scaffold the solution.** `dotnet new sln`; projects per boundary (`Api`, `Application`,\n   `Domain`, `Infrastructure`); nullable + ImplicitUsings + latest LangVersion enabled;\n   `.editorconfig` for style; TreatWarningsAsErrors for new projects.\n2. **Model the domain.** Records for data, small focused classes for behavior, exceptions for\n   exceptional cases (custom domain exceptions with context), validation at boundaries.\n3. **Write async services.** Inject dependencies via constructor; `CancellationToken` parameters\n   on async methods (and honor them); avoid `async void` (only event handlers).\n4. **Data access with EF Core deliberately.** DbContext per unit of work (scoped), compiled or\n   split queries for hot paths, migrations in source control, database constraints backing up\n   application validation.\n5. **Test in layers.** xUnit + FluentAssertions + NSubstitute\u002FMoq for unit tests; WebApplicationFactory\n   for API integration tests with a real test database (Testcontainers); a few end-to-end tests\n   for critical journeys.\n6. **Analyzers in CI.** `dotnet build -warnaserror`, Roslyn analyzers (Microsoft defaults +\n   curated ruleset), and format enforcement (`dotnet format --verify-no-changes`).\n\nIdiomatic snippets:\n\n```csharp\n\u002F\u002F Record + pattern matching + nullable enabled\npublic abstract record PaymentResult;\npublic sealed record PaymentOk(string TransactionId) : PaymentResult;\npublic sealed record PaymentFailed(string Reason) : PaymentResult;\n\nstring Describe(PaymentResult r) => r switch {\n    PaymentOk(var id)      => $\"Paid: {id}\",\n    PaymentFailed(var why) => $\"Failed: {why}\",\n    _ => throw new UnreachableException(),\n};\n\n\u002F\u002F Async with cancellation, no .Result in sight\npublic async Task\u003COrder> PlaceAsync(PlaceOrder cmd, CancellationToken ct = default) {\n    await using var tx = await _db.Database.BeginTransactionAsync(ct);\n    \u002F\u002F ...\n}\n```\n\n## Common pitfalls\n\n- **Nullable disabled or warning-suppressed.** `#nullable disable` or `!` sprinkled to silence\n  the compiler reintroduces the billion-dollar mistake. Fix the nullability model instead.\n- **`.Result` \u002F `.Wait()` deadlocks.** Blocking on async code, especially in ASP.NET (classic) or\n  UI contexts. Async all the way down; it's viral by design.\n- **Captive dependencies.** Singleton holding a scoped service (like DbContext) — works until it\n  spectacularly doesn't. Respect lifetime boundaries; the container validates scopes in dev — listen.\n- **LINQ multiple enumeration.** Passing `IEnumerable\u003CT>` around and enumerating it three times,\n  re-running a DB query each time. Materialize once when the source is expensive.\n- **EF Core N+1 and client evaluation.** Lazy-loading loops and untranslatable LINQ silently\n  dragging tables into memory. Profile queries; `Include`\u002Fprojection deliberately.\n- **God Startup \u002F god Program.cs.** Hundreds of service registrations with no organization.\n  Extension methods per area (`AddOrderServices()`), and keep composition readable.\n- **Exceptions for control flow.** Throwing for expected outcomes (validation failures, \"not found\"\n  in normal operation). Use result types or return values for expected cases; exceptions for the\n  exceptional.\n","# C# Pro\n\n## Overview\n\nModern C# (10–13) with .NET is a **high-productivity, high-performance platform**: nullable\nreference types bring compile-time null safety, records simplify immutable data, async\u002Fawait is\nfirst-class, and minimal APIs plus strong tooling make everything from CLIs to cloud services\npleasant. Professional C# means enabling the safety features, modeling with the modern type\ntoolbox, writing async correctly, and using LINQ as a query language — not a cleverness contest.\n\nThe through-line: turn on every safety feature, model precisely, and let the runtime's maturity\ndo the heavy lifting.\n\n## When to use\n\n- Writing or reviewing C# for modern idiom (.NET 6+).\n- Structuring .NET solutions (projects, layering, DI).\n- Designing async code, data models, or APIs.\n- Enabling nullable reference types or modernizing legacy C#.\n- Setting up testing (xUnit\u002FNUnit), analyzers, and CI.\n\n## Core concepts\n\n- **Nullable reference types ON.** `\u003CNullable>enable\u003C\u002FNullable>` — nullability becomes part of the\n  type system (`string` vs `string?`). The migration is the value: every warning fixed is a\n  potential NullReferenceException eliminated. Treat warnings as errors in CI for new code.\n- **Records for immutable data.** `record` \u002F `record struct` for DTOs, messages, value objects —\n  value equality and non-destructive mutation (`with`) built in. Classes for behavior + identity,\n  structs for small hot-path values.\n- **Async all the way.** `async`\u002F`await` end-to-end; never `.Result`\u002F`.Wait()` (deadlocks under\n  synchronization contexts); `ConfigureAwait(false)` in libraries; `ValueTask` for hot paths where\n  the result is often already available. `IAsyncEnumerable\u003CT>` for async streams.\n- **LINQ as a query language.** Declarative transforms (`Where`\u002F`Select`\u002F`GroupBy`) over data —\n  but materialize deliberately (`ToList()` when multiple enumeration would re-run queries or\n  re-hit the DB), and watch for N+1 in EF Core (eager load with `Include`, project with `Select`).\n- **Dependency injection as the composition model.** Constructor injection, explicit lifetimes\n  (transient\u002Fscoped\u002Fsingleton — and know why scoped services can't live in singletons), and\n  `IOptions\u003CT>` for configuration. The container is not a service locator.\n- **Pattern matching + switch expressions.** Exhaustive, expression-based control flow over\n  `if\u002Felse` chains. Combined with records and discriminated-union-style hierarchies, it brings\n  much of the functional modeling power to C#.\n\n## Practical workflow\n\n1. **Scaffold the solution.** `dotnet new sln`; projects per boundary (`Api`, `Application`,\n   `Domain`, `Infrastructure`); nullable + ImplicitUsings + latest LangVersion enabled;\n   `.editorconfig` for style; TreatWarningsAsErrors for new projects.\n2. **Model the domain.** Records for data, small focused classes for behavior, exceptions for\n   exceptional cases (custom domain exceptions with context), validation at boundaries.\n3. **Write async services.** Inject dependencies via constructor; `CancellationToken` parameters\n   on async methods (and honor them); avoid `async void` (only event handlers).\n4. **Data access with EF Core deliberately.** DbContext per unit of work (scoped), compiled or\n   split queries for hot paths, migrations in source control, database constraints backing up\n   application validation.\n5. **Test in layers.** xUnit + FluentAssertions + NSubstitute\u002FMoq for unit tests; WebApplicationFactory\n   for API integration tests with a real test database (Testcontainers); a few end-to-end tests\n   for critical journeys.\n6. **Analyzers in CI.** `dotnet build -warnaserror`, Roslyn analyzers (Microsoft defaults +\n   curated ruleset), and format enforcement (`dotnet format --verify-no-changes`).\n\nIdiomatic snippets:\n\n```csharp\n\u002F\u002F Record + pattern matching + nullable enabled\npublic abstract record PaymentResult;\npublic sealed record PaymentOk(string TransactionId) : PaymentResult;\npublic sealed record PaymentFailed(string Reason) : PaymentResult;\n\nstring Describe(PaymentResult r) => r switch {\n    PaymentOk(var id)      => $\"Paid: {id}\",\n    PaymentFailed(var why) => $\"Failed: {why}\",\n    _ => throw new UnreachableException(),\n};\n\n\u002F\u002F Async with cancellation, no .Result in sight\npublic async Task\u003COrder> PlaceAsync(PlaceOrder cmd, CancellationToken ct = default) {\n    await using var tx = await _db.Database.BeginTransactionAsync(ct);\n    \u002F\u002F ...\n}\n```\n\n## Common pitfalls\n\n- **Nullable disabled or warning-suppressed.** `#nullable disable` or `!` sprinkled to silence\n  the compiler reintroduces the billion-dollar mistake. Fix the nullability model instead.\n- **`.Result` \u002F `.Wait()` deadlocks.** Blocking on async code, especially in ASP.NET (classic) or\n  UI contexts. Async all the way down; it's viral by design.\n- **Captive dependencies.** Singleton holding a scoped service (like DbContext) — works until it\n  spectacularly doesn't. Respect lifetime boundaries; the container validates scopes in dev — listen.\n- **LINQ multiple enumeration.** Passing `IEnumerable\u003CT>` around and enumerating it three times,\n  re-running a DB query each time. Materialize once when the source is expensive.\n- **EF Core N+1 and client evaluation.** Lazy-loading loops and untranslatable LINQ silently\n  dragging tables into memory. Profile queries; `Include`\u002Fprojection deliberately.\n- **God Startup \u002F god Program.cs.** Hundreds of service registrations with no organization.\n  Extension methods per area (`AddOrderServices()`), and keep composition readable.\n- **Exceptions for control flow.** Throwing for expected outcomes (validation failures, \"not found\"\n  in normal operation). Use result types or return values for expected cases; exceptions for the\n  exceptional.\n",{},"main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-csharp-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill ams-csharp-pro",{"tool":37,"command":38},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill ams-csharp-pro",{"tool":40,"command":41},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill ams-csharp-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-csharp-pro\u002FSKILL.md",true,[],[46,53,61,68,75,82],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":57,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]