agentleFS
voly-codesvoly-codes/voly/.cursor/skills/software-architecture/SKILL.md

software-architecture

Skill17 starsChanged 5 months agoApache-2.0View on GitHub

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 (.NET/C#).

15 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use code-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

20 rules. 0 are common, 19 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 19

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Early return pattern: Always use early returns when possible, over nested conditions for better readability

    line 14
  2. Distinctive:

    Avoid code duplication through creation of reusable functions and modules

    line 15
  3. Distinctive:

    Use arrow functions (lambda functions) instead of function declarations when possible

    line 17
  4. Distinctive:

    Check npm for existing libraries that solve the problem

    line 24
  5. Distinctive:

    Consider third-party APIs for common functionality

    line 26
  6. Very specific:

    Use libraries instead of writing your own utils or helpers.

    line 27
  7. Distinctive:

    When external dependencies would be overkill

    line 31
  8. Distinctive:

    When existing solutions don't meet requirements after thorough evaluation

    line 33
  9. Distinctive:

    Follow domain-driven design and ubiquitous language

    line 38
  10. Distinctive:

    Keep business logic independent of frameworks

    line 40
  11. Distinctive:

    Follow bounded context naming patterns

    line 45
  12. Distinctive:

    Do NOT mix business logic with UI components

    line 48
  13. Distinctive:

    Keep database queries out of controllers

    line 49
  14. Distinctive:

    Ensure proper separation of responsibilities

    line 51
  15. Distinctive:

    Don't build custom auth when Microsoft EntraID or https://github.com/AzureAD/microsoft-authentication-library-for-dotnet or …

    line 56
  16. Distinctive:

    Don't write custom state management instead of using Redux/Zustand (front-end)

    line 57
  17. Distinctive:

    Don't create custom form validation instead of using established libraries

    line 58
  18. Distinctive:

    Avoid deep nesting (max 3 levels)

    line 73
  19. Distinctive:

    Keep functions focused and under 50 lines when possible

    line 74
  20. Distinctive:

    Keep files focused and under 200 lines of code when possible

    line 75

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Software Architecture Development Skill

This skill provides guidence for quality focused software development and architecture. It is based on Clean Architecture and Domain Driven Design principles.

Code Style Rules

General Principles

  • Early return pattern: Always use early returns when possible, over nested conditions for better readability
  • Avoid code duplication through creation of reusable functions and modules
  • 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.
  • Use arrow functions (lambda functions) instead of function declarations when possible

Best Practices

Library-First Approach

  • ALWAYS search for existing solutions before writing custom code
    • Check npm for existing libraries that solve the problem
    • Evaluate existing services/SaaS solutions
    • Consider third-party APIs for common functionality
  • Use libraries instead of writing your own utils or helpers. For example, use https://www.nuget.org/packages/Microsoft.Extensions.Http.Resilience instead of writing your own retry logic.
  • When custom code IS justified:
    • Specific business logic unique to the domain
    • Performance-critical paths with special requirements
    • When external dependencies would be overkill
    • Security-sensitive code requiring full control
    • When existing solutions don't meet requirements after thorough evaluation

Architecture and Design

  • Clean Architecture & DDD Principles:
    • Follow domain-driven design and ubiquitous language
    • Separate domain entities from infrastructure concerns
    • Keep business logic independent of frameworks
    • Define use cases clearly and keep them isolated
  • Naming Conventions:
    • AVOID generic names: utils, helpers, common, shared
    • USE domain-specific names: OrderCalculator, UserAuthenticator, InvoiceGenerator
    • Follow bounded context naming patterns
    • Each module should have a single, clear purpose
  • Separation of Concerns:
    • Do NOT mix business logic with UI components
    • Keep database queries out of controllers
    • Maintain clear boundaries between contexts
    • Ensure proper separation of responsibilities

Anti-Patterns to Avoid

  • NIH (Not Invented Here) Syndrome:
  • Poor Architectural Choices:
    • Mixing business logic with UI components
    • Database queries directly in controllers
    • Lack of clear separation of concerns
  • Generic Naming Anti-Patterns:
    • utils.js or utils.cs with 50 unrelated functions
    • helpers/misc.js or helpers/misc.cs as a dumping ground
    • common/shared.js / common/shared.cs with unclear purpose
  • Remember: Every line of custom code is a liability that needs maintenance, testing, and documentation

Code Quality

  • Proper error handling with typed catch blocks
  • Break down complex logic into smaller, reusable functions
  • Avoid deep nesting (max 3 levels)
  • Keep functions focused and under 50 lines when possible
  • Keep files focused and under 200 lines of code when possible

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.