agentleFS
hybridlabor-apihybridlabor-api/aos/skills/global_config/software-architecture/SKILL.md

software-architecture

Skill9 starsChanged 24 days agoApache-2.0View on GitHub

Quality-focused architecture guidance (Clean Architecture, DDD). Use when designing architecture, writing or analyzing code in projects.

38 other projects use a version of this, 13 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use backend-engineering, backend-dev-guidelines and 5 more.

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.
  • yuexueyuSkill

    backend-engineering

    后端资深工程师技能 - 架构设计、服务端开发、中间件、错误处理、日志、配置管理、部署运维。当你涉及后端服务开发、Go/Python/Node/Java/PHP后端代码、中间件配置、服务间通信、配置管理、日志策略、进程管理、交叉编译、部署流程时必须使用此技能。即使用户只是说"写个接口"或"后端加个功能",也应触发。

    Also in 3 projects that use this

  • weirdgmeSkill

    backend-dev-guidelines

    Comprehensive backend development guide for Node.js/Express/TypeScript microservices. Use when creating routes, controllers, services, repositories, middleware, or working with Express APIs, Prisma database access, Sentry error tracking, Zod validation, unifiedConfig, dependency injection, or async patterns. Covers layered architecture (routes → controllers → services → repositories), BaseController pattern, error handling, performance monitoring, testing strategies, and migration from legacy patterns.

    Also in 3 projects that use this

  • AJBcodingSkill

    sql-optimization-patterns

    Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    git-workflow

    Squad branching model: dev-first workflow with insiders preview channel

    Also in 4 projects that use this

  • SentrySkill

    skill-creator

    Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.

    Also in 9 projects that use this

  • 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 5 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. 0 are common, 22 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 33 edited versions we read keep these.

  • 22

    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 30
  2. Distinctive:

    Avoid code duplication through creation of reusable functions and modules

    line 31
  3. Distinctive:

    Use arrow functions instead of function declarations when possible

    line 33
  4. Distinctive:

    Check npm for existing libraries that solve the problem

    line 40
  5. Distinctive:

    Consider third-party APIs for common functionality

    line 42
  6. Very specific:

    Use libraries instead of writing your own utils or helpers.

    line 43
  7. Distinctive:

    When external dependencies would be overkill

    line 47
  8. Distinctive:

    When existing solutions don't meet requirements after thorough evaluation

    line 49
  9. Distinctive:

    Follow domain-driven design and ubiquitous language

    line 54
  10. Distinctive:

    Keep business logic independent of frameworks

    line 56
  11. Distinctive:

    Follow bounded context naming patterns

    line 61
  12. Distinctive:

    Do NOT mix business logic with UI components

    line 64
  13. Distinctive:

    Keep database queries out of controllers

    line 65
  14. Distinctive:

    Ensure proper separation of responsibilities

    line 67
  15. Distinctive:

    Don't build custom auth when Auth0/Supabase exists

    line 72
  16. Distinctive:

    Don't write custom state management instead of using Redux/Zustand

    line 73
  17. Distinctive:

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

    line 74
  18. Distinctive:

    Avoid deep nesting (max 3 levels)

    line 89
  19. Distinctive:

    Keep functions focused and under 50 lines when possible

    line 90
  20. Distinctive:

    Keep files focused and under 200 lines of code when possible

    line 91
  21. Distinctive:

    Use this skill only when the task clearly matches the scope described above.

    line 97
  22. Distinctive:

    Do not treat the output as a substitute for environment-specific validation, testing, or expert review.

    line 98
  23. Distinctive:

    Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

    line 99

“Common” is measured: kept by at least 6 in 10 of the 33 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 guidance for quality focused software development and architecture. It is based on Clean Architecture and Domain Driven Design principles.

Plan first

Design work starts from the architecture template — diagram, data model, trade-offs:

aos-plan-canvas new architecture <plan-dir>                     # scaffold the plan folder
aos-plan-canvas open <plan-dir> --mode bdb-plan-builder  # render and open in the browser
aos-plan-canvas await <plan-dir>/plan.mdx                # keep listening until the verdict

On approve, aos-plan-canvas trail <plan-dir> derives the agenttrail map. The full loop: the plan-canvas skill — a plain CLI, identical on every harness.

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 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 cockatiel 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:
    • Don't build custom auth when Auth0/Supabase exists
    • Don't write custom state management instead of using Redux/Zustand
    • Don't create custom form validation instead of using established libraries
  • 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 with 50 unrelated functions
    • helpers/misc.js as a dumping ground
    • common/shared.js 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

When to Use

This skill is applicable to execute the workflow or actions described in the overview.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

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.