software-architecture

Guides .NET/C# code design using Clean Architecture and Domain-Driven Design principles.

25|4|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/thangchung/agent-engineering-experiment --skill software-architecture-thangchung
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: software-architecture
Source: https://github.com/thangchung/agent-engineering-experiment/tree/main/foundry-local-agent-fx/.github/skills/software-architecture
Command: npx skills add https://github.com/thangchung/agent-engineering-experiment --skill software-architecture-thangchung

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing maintainable .NET/C# code requires consistent architectural decisions, and without clear guidance teams end up with tangled business logic, generic helper dumping grounds, and reinvented wheels. This Skill provides concrete rules for structuring code with Clean Architecture and Domain-Driven Design. ## Core Features & Use Cases - Architecture Guidance: Enforces Clean Architecture and DDD principles such as separating domain entities from infrastructure and keeping business logic out of controllers and UI components. - Code Style Rules: Defines conventions for early returns, function and file length limits, naming patterns, and avoiding deep nesting. - Library-First Decision Making: Directs developers to evaluate existing NuGet packages and services (e.g., Microsoft.Extensions.Http.Resilience, MSAL) before writing custom utilities. - Use Case: When designing a new order-processing service in C#, use this Skill to structure bounded contexts, name domain-specific classes like OrderCalculator, and reuse existing libraries instead of building custom retry or authentication logic. ## Quick Start Review my C# order service code and suggest improvements based on Clean Architecture and DDD principles.

Frequently Asked Questions about software-architecture

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

FAQPage Schema
How do I apply Clean Architecture principles in a .NET/C# project?▼

Separate domain entities from infrastructure concerns, keep business logic independent of frameworks, and define isolated use cases. Follow bounded context naming so each module has a single clear purpose, and keep database queries out of controllers.

When should I write custom code instead of using a NuGet library?▼

Write custom code only for domain-specific business logic, performance-critical paths, security-sensitive code, or when existing solutions fail evaluation. For common needs like retry logic, use Microsoft.Extensions.Http.Resilience instead of custom implementations.

What naming conventions should I avoid in C# projects?▼

Avoid generic names like utils, helpers, common, and shared, which become dumping grounds for unrelated functions. Use domain-specific names such as OrderCalculator, UserAuthenticator, or InvoiceGenerator that reflect bounded contexts.

Does this guidance apply to front-end code as well as C#?▼

Yes, several rules apply broadly, such as avoiding custom state management in favor of Redux or Zustand and using established form validation libraries. However, the primary focus and examples target .NET/C# development.

How long should functions and files be in a clean codebase?▼

Keep functions under 50 lines and files under 200 lines when possible, decomposing anything longer into smaller units. Avoid nesting deeper than 3 levels and prefer early returns over nested conditions.