Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.
Add this skill
npx mdskills install sickn33/software-architectureProvides clear architectural principles but lacks trigger conditions and actionable steps
1---2name: software-architecture3description: Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.4---56# Software Architecture Development Skill78This skill provides guidance for quality focused software development and architecture. It is based on Clean Architecture and Domain Driven Design principles.910## Code Style Rules1112### General Principles1314- **Early return pattern**: Always use early returns when possible, over nested conditions for better readability15- Avoid code duplication through creation of reusable functions and modules16- Decompose long (more than 80 lines of code) components and functions into multiple smaller components and functions. If they cannot be used anywhere else, keep it in the same file. But if file longer than 200 lines of code, it should be split into multiple files.17- Use arrow functions instead of function declarations when possible1819### Best Practices2021#### Library-First Approach2223- **ALWAYS search for existing solutions before writing custom code**24 - Check npm for existing libraries that solve the problem25 - Evaluate existing services/SaaS solutions26 - Consider third-party APIs for common functionality27- Use libraries instead of writing your own utils or helpers. For example, use `cockatiel` instead of writing your own retry logic.28- **When custom code IS justified:**29 - Specific business logic unique to the domain30 - Performance-critical paths with special requirements31 - When external dependencies would be overkill32 - Security-sensitive code requiring full control33 - When existing solutions don't meet requirements after thorough evaluation3435#### Architecture and Design3637- **Clean Architecture & DDD Principles:**38 - Follow domain-driven design and ubiquitous language39 - Separate domain entities from infrastructure concerns40 - Keep business logic independent of frameworks41 - Define use cases clearly and keep them isolated42- **Naming Conventions:**43 - **AVOID** generic names: `utils`, `helpers`, `common`, `shared`44 - **USE** domain-specific names: `OrderCalculator`, `UserAuthenticator`, `InvoiceGenerator`45 - Follow bounded context naming patterns46 - Each module should have a single, clear purpose47- **Separation of Concerns:**48 - Do NOT mix business logic with UI components49 - Keep database queries out of controllers50 - Maintain clear boundaries between contexts51 - Ensure proper separation of responsibilities5253#### Anti-Patterns to Avoid5455- **NIH (Not Invented Here) Syndrome:**56 - Don't build custom auth when Auth0/Supabase exists57 - Don't write custom state management instead of using Redux/Zustand58 - Don't create custom form validation instead of using established libraries59- **Poor Architectural Choices:**60 - Mixing business logic with UI components61 - Database queries directly in controllers62 - Lack of clear separation of concerns63- **Generic Naming Anti-Patterns:**64 - `utils.js` with 50 unrelated functions65 - `helpers/misc.js` as a dumping ground66 - `common/shared.js` with unclear purpose67- Remember: Every line of custom code is a liability that needs maintenance, testing, and documentation6869#### Code Quality7071- Proper error handling with typed catch blocks72- Break down complex logic into smaller, reusable functions73- Avoid deep nesting (max 3 levels)74- Keep functions focused and under 50 lines when possible75- Keep files focused and under 200 lines of code when possible76
Full transparency — inspect the skill content before installing.