software-architecture

Guides code writing and architecture design using Clean Architecture and Domain Driven Design principles.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/manhthien2005/PM_REVIEW --skill software-architecture-manhthien2005
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: software-architecture
Source: https://github.com/manhthien2005/PM_REVIEW/tree/main/tooling/.windsurf-template/shared/skills/TongQuan/skills/software-architecture
Command: npx skills add https://github.com/manhthien2005/PM_REVIEW --skill software-architecture-manhthien2005

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers often produce codebases with tangled business logic, generic naming, duplicated utilities, and reinvented wheels. This Skill provides a concrete rulebook for writing maintainable code and designing architectures grounded in Clean Architecture and Domain Driven Design. ## Core Features & Use Cases - Code Style Enforcement: Applies early return patterns, function/file size limits (50/200 lines), arrow functions, and a maximum nesting depth of 3 levels. - Architecture Guidance: Enforces separation of domain entities from infrastructure, isolated use cases, bounded context naming, and avoidance of generic names like utils or helpers. - Library-First Decision Making: Directs evaluation of existing npm packages and SaaS solutions before writing custom code, with explicit criteria for when custom code is justified. - Use Case: When asked to design a new order-processing module, the AI will structure it with domain-specific names like OrderCalculator, keep business logic out of controllers, and recommend existing libraries such as cockatiel for retry logic instead of custom implementations. ## Quick Start Review my project structure and refactor the order module following 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 to my code?▼

Separate domain entities from infrastructure concerns, keep business logic independent of frameworks, and define isolated use cases. Keep database queries out of controllers and never mix business logic with UI components.

What naming conventions should I use in Domain Driven Design?▼

Use domain-specific names like OrderCalculator, UserAuthenticator, or InvoiceGenerator instead of generic names like utils, helpers, or common. Follow bounded context naming so each module has a single, clear purpose.

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

Write custom code only for domain-specific business logic, performance-critical paths, security-sensitive code, or when existing solutions fail evaluation. Otherwise prefer established libraries, such as cockatiel for retry logic.

What are the recommended function and file size limits?▼

Keep functions under 50 lines and files under 200 lines where possible. Decompose components longer than 80 lines into smaller units, and avoid nesting deeper than 3 levels by using early returns.

What is NIH syndrome and how do I avoid it?▼

NIH (Not Invented Here) syndrome means rebuilding existing solutions, like custom auth instead of Auth0 or custom state management instead of Redux. Avoid it by searching npm and evaluating SaaS options before writing any custom utility.