agentleFS
karim-bhalwanikarim-bhalwani/agent-skills-collection/skills/software-architecture/SKILL.md

software-architecture

Skill0 starsChanged 10 months agoMITView on GitHub

Guide for quality focused software architecture. Use when designing software systems, reviewing architecture, analyzing code structure, planning refactors, or mentoring on architectural patterns.

30 other projects use a version of this, 8 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use backend-engineering, backend-dev-guidelines and 6 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.
  • rogue-dev-studioSkill

    backend-engineering

    Expert backend application engineering: layered architecture, domain services, validation, transactions, caching boundaries, background jobs, and framework idioms (e.g. Laravel/Node) without leaking business rules into controllers. Use when implementing or refactoring server-side features, services, form requests/DTOs, policies, queues, or integrating persistence with APIs.

    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

  • AnthropicSkill

    documentation

    Write and maintain technical documentation. Trigger with "write docs for", "document this", "create a README", "write a runbook", "onboarding guide", or when the user needs help with any form of technical writing — API docs, architecture docs, or operational runbooks.

    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

  • nilssonrSkill

    seo

    Full SEO workflow for auditing pages and creating SEO-optimized content. Provides checklists with educational explanations aligned with Google Search Central documentation.

    Also in 3 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 8 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 26 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 22
  2. Distinctive:

    Avoid code duplication through creation of reusable functions and modules

    line 23
  3. Distinctive:

    Use arrow functions instead of function declarations when possible

    line 25
  4. Distinctive:

    Check npm for existing libraries that solve the problem

    line 32
  5. Distinctive:

    Consider third-party APIs for common functionality

    line 34
  6. Very specific:

    Use libraries instead of writing your own utils or helpers.

    line 35
  7. Distinctive:

    When external dependencies would be overkill

    line 39
  8. Distinctive:

    When existing solutions don't meet requirements after thorough evaluation

    line 41
  9. Distinctive:

    Follow domain-driven design and ubiquitous language

    line 46
  10. Distinctive:

    Keep business logic independent of frameworks

    line 48
  11. Distinctive:

    Follow bounded context naming patterns

    line 53
  12. Distinctive:

    Do NOT mix business logic with UI components

    line 56
  13. Distinctive:

    Keep database queries out of controllers

    line 57
  14. Distinctive:

    Ensure proper separation of responsibilities

    line 59
  15. Distinctive:

    Don't build custom auth when Auth0/Supabase exists

    line 64
  16. Distinctive:

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

    line 65
  17. Distinctive:

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

    line 66
  18. Distinctive:

    Avoid deep nesting (max 3 levels)

    line 81
  19. Distinctive:

    Keep functions focused and under 50 lines when possible

    line 82
  20. Distinctive:

    Keep files focused and under 200 lines of code when possible

    line 83

“Common” is measured: kept by at least 6 in 10 of the 26 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.

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

Outputs & Deliverables

  • Primary Output: Architecture guidance documents, decision records, and recommended module boundaries
  • Secondary Output: Sample directory layouts and interface contract templates
  • Success Criteria: Clear, implementable architecture with trade-offs documented and no ambiguous module responsibilities
  • Quality Gate: Review by architect and implementer prior to implementation

Constraints

  • Technical Constraints: Provide design guidance only; do not implement or refactor existing code directly
  • Scope Constraints: Focus on architecture and high-level design; low-level implementation details belong to implementer
  • Governance Constraints: Major changes require orchestrator sign-off when they touch cross-cutting concerns

Common Pitfalls

  • Mixing Layers: Business logic in API handlers, database queries in controllers. Respect Clean Architecture boundaries.
  • Generic Naming: utils.js, helpers, common are dumping grounds. Use domain-specific names like OrderCalculator, UserAuthenticator.
  • Missing Abstraction Levels: Low-level technical details in high-level domains. Create proper abstractions between layers.
  • Ignoring the Implicit Contract: Changing a module's interface breaks callers. Always version APIs; communicate breaking changes.
  • Over-Optimizing: Choosing performance-first architecture before measuring. Start simple; optimize when data shows bottlenecks.
  • Too Much Coupling: Direct imports between distant modules create a tangled dependency graph. Use dependency injection.

Integration Points

PhaseInput FromOutput ToContext
Design InputRequirements, constraintsArchitecture guidanceRecommend module boundaries and patterns
Decision RecordingArchitecture decisionsstate-managerLog decisions in decisions.md for future reference
HandoffArchitecture definedimplementerProvide clear module contracts and responsibilities
EvolutionChanging requirementsArchitecture reviewUpdate design when new constraints emerge

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.