software-csharp-backend
Apply practical C# and .NET backend engineering standards for service implementation, refactoring, and backend-focused code reviews. Use when building or reviewing backend services for language best practices, project and layer boundaries, data-access patterns, resilience controls, observability, security baselines, and common backend anti-pattern detection. For deep NUnit fixture design use $qa-testing-nunit, for NUKE pipeline target work use $ops-nuke-cicd, and for deterministic logging rewrites use $dev-structured-logs.
What this skill does
# C# Backend ## Quick Reference - Start by defining boundary: API, application service, domain logic, infrastructure, or background worker. - Select runtime profile early: controller API, minimal API, background worker, or mixed host. - For systems with evolving domain boundaries, prefer modular architecture over premature service splits. - Apply C# language rules first: clarity, nullability, immutability, explicit failures, cancellation-aware async. - Keep dependency direction inward and keep I/O at boundaries. - Choose persistence per use case: Dapper for query-heavy SQL paths, EF Core for aggregate-heavy relational writes, Mongo for document-first modules. - Treat reliability, observability, and security as default behavior, not follow-up work. - Use iterative quality loop: `code -> build -> run tests -> fix -> repeat`. - If deep controller/CQRS endpoint design is required, switch to `$csharp-api-cqrs` and use its MediatR + FluentResults handler template. - If the task is primarily NUnit fixture design, WireMock/Testcontainers setup, or flake reduction, switch to `$qa-testing-nunit`. - If the task is primarily `nuke/Build.cs`, CI target sequencing, or artifact publication, switch to `$ops-nuke-cicd`. - If the task is primarily legacy `ILogger` or Serilog rewrite automation, switch to `$dev-structured-logs`. ## Workflow 1. Classify the requested change (new feature, refactor, bug fix, review). 2. Choose runtime shape before implementation details. Load `references/scenario-guides.md` and, for HTTP services, `references/aspnet-core-api-patterns.md`. 3. Apply language and coding standards. Load `references/csharp-language-practices.md` and `references/dotnet-coding-standards.md`. 4. Confirm architecture and boundaries before editing internals. Load `references/backend-architecture-principles.md` and `references/modular-architecture-principles.md`. 5. Choose persistence and consistency strategy from query/write shape. Load `references/data-access-patterns.md`; if EF Core is selected, load `references/efcore-persistence-patterns.md`. 6. Add resilience behavior for outbound I/O and long-running work. Load `references/reliability-and-resilience.md` and `references/resilience-policy-defaults.md`. 7. Define tests by risk and boundary. Load `references/testing-practices.md`. 8. Add logs, traces, metrics, health probes, and operability defaults. Load `references/observability-standards.md`, and for API/runtime deployment defaults load `references/runtime-ops-checklist.md`. 9. Validate auth, validation, and secrets handling. Load `references/security-baseline.md`. 10. Run feedback loop validation for changed behavior. For NUKE-based repositories, run `BuildAll`, `LocalUnitTest`, `ApiTest` (when relevant), and `TestAll`; use `$ops-nuke-cicd` for pipeline-target edits. 11. Run final review against anti-pattern checklist. Load `references/code-review-checklist.md`. ## Decision Tree - If the issue is naming, nullability, exception usage, or async flow, read `references/csharp-language-practices.md`. - If the issue is project layout, DI, configuration, or layering, read `references/dotnet-coding-standards.md`. - If the issue is service boundaries or clean architecture drift, read `references/backend-architecture-principles.md`. - If the issue is module boundaries, composition hosts, or modular-monolith tradeoffs, read `references/modular-architecture-principles.md`. - If the issue is API style, middleware ordering, validation behavior, health/readiness, or graceful shutdown, read `references/aspnet-core-api-patterns.md`. - If the issue is SQL/Mongo/EF access, pagination, transactions, idempotency, or N+1, read `references/data-access-patterns.md`. - If EF Core is selected for relational persistence, also read `references/efcore-persistence-patterns.md`. - If the issue is system profile specific (high-throughput API, event-driven worker, multi-tenant service), read `references/scenario-guides.md`. - If the issue is retry/timeout/circuit behavior, cancellation propagation, or worker reliability, read `references/reliability-and-resilience.md` and `references/resilience-policy-defaults.md`. - If the issue is container/runtime readiness, startup config validation, caching defaults, or deployment reliability gates, read `references/runtime-ops-checklist.md`. - If the issue is target framework constraints, package/API compatibility, multi-targeting, or migration between `.NET Framework`/`netstandard2.0` and modern `.NET`, read `references/version-compatibility-notes.md`. - If the issue is flaky tests or weak coverage strategy, read `references/testing-practices.md`. - If the issue is logs/traces/metrics/health checks, read `references/observability-standards.md`. - If the issue is input validation, auth boundaries, secret handling, or secure defaults, read `references/security-baseline.md`. - If the task is reviewing a PR for backend quality risks, read `references/code-review-checklist.md`. - If the task is designing or fixing build-test pipeline loop behavior, use `$ops-nuke-cicd`. - If the task needs deep HTTP controller + CQRS error-contract design, use `$csharp-api-cqrs` with MediatR + FluentResults conventions. ## Do / Avoid **Do** - Keep application services small and explicit about dependencies. - Return deterministic domain/application results for expected failures. - Pass `CancellationToken` through every async layer and external call. - Model options with validation and fail fast on invalid startup config. - Choose API style intentionally and keep middleware ordering explicit. - Keep persistence choices aligned to use-case shape, not team habit. - Make telemetry and security checks part of definition of done. **Avoid** - Coupling domain logic directly to HTTP, DB driver types, or framework-specific classes. - Using retries without timeout and idempotency guarantees. - Swallowing exceptions or replacing root causes with vague error messages. - Mixing unit and integration concerns in the same test fixture. - Using `async void` outside event handlers. - Sharing one `DbContext` instance across concurrent operations/threads. - Captive dependencies (singleton depending on scoped service). - Shipping endpoints without structured logs, traces, metrics, and health signals. ## Resources - [C# Language Practices](references/csharp-language-practices.md) - [Dotnet Coding Standards](references/dotnet-coding-standards.md) - [Backend Architecture Principles](references/backend-architecture-principles.md) - [Modular Architecture Principles](references/modular-architecture-principles.md) - [ASP.NET Core API Patterns](references/aspnet-core-api-patterns.md) - [Data Access Patterns](references/data-access-patterns.md) - [EF Core Persistence Patterns](references/efcore-persistence-patterns.md) - [Scenario Guides](references/scenario-guides.md) - [Reliability and Resilience](references/reliability-and-resilience.md) - [Resilience Policy Defaults](references/resilience-policy-defaults.md) - [Testing Practices](references/testing-practices.md) - [Observability Standards](references/observability-standards.md) - [Runtime Ops Checklist](references/runtime-ops-checklist.md) - [Version Compatibility Notes](references/version-compatibility-notes.md) - [Security Baseline](references/security-baseline.md) - [Code Review Checklist](references/code-review-checklist.md) - [Skill Data](Data/data.json): curated Microsoft references plus modular-architecture example context. ## Templates - [Service Class Template](assets/service-class-template.cs) - [Options Configuration Template](assets/options-configuration-template.cs) - [Resilient HTTP Client Template](assets/resilient-http-client-template.cs) - [Dapper Query Handler Template](assets/dapper-query-handler-template.cs) - [Mongo Repository Template](assets/mongo-repository-template.cs) - [Test Data Builder Template](assets/test-data-builder-template.cs) - [Pull Request Checklist Template](assets/pull-request-checklist-template.md)
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.