agentleFS
SrejonKhanSrejonKhan/agent-skills/skills/software_architecture/SKILL.md

software_architecture

Skill3 starsChanged 2 months agoMITView on GitHub

Guide for quality-focused software architecture. Use this when designing architecture, writing code, or analyzing software systems.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    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.

    line 12
  2. Distinctive:

    ALWAYS search for existing solutions before writing custom code.

    line 15
  3. Distinctive:

    Use libraries for common problems (retry logic, state management, validation).

    line 16
  4. Very specific:

    AVOID generic names (utils, helpers, common, shared).

    line 20
  5. Very specific:

    USE domain-specific names (OrderCalculator, InvoiceGenerator).

    line 21
  6. Distinctive:

    Do NOT mix business logic with UI components.

    line 23
  7. Distinctive:

    Keep database queries out of controllers.

    line 24
  8. Distinctive:

    NIH (Not Invented Here) Syndrome: Don't build custom auth when Auth0 exists.

    line 34
  9. Very specific:

    Dumping Grounds: Don't create utils.js or shared.js with lots of unrelated functions.

    line 35
  10. Distinctive:

    Document every architectural decision with trade-offs.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

This skill provides guidance for quality-focused software development and architecture. It focuses on Clean Architecture and Domain-Driven Design principles.

Core Rules & Principles

  1. Early Return Pattern: Always use early returns when possible over nested conditions.
  2. Decompose Components: Break down components longer than 80 lines and split files larger than 200 lines.
  3. Library-First Approach:
    • ALWAYS search for existing solutions before writing custom code.
    • Use libraries for common problems (retry logic, state management, validation).
  4. Clean Architecture & DDD:
    • Separate domain entities from infrastructure. Keep business logic independent of frameworks.
  5. Naming & Bounded Contexts:
    • AVOID generic names (utils, helpers, common, shared).
    • USE domain-specific names (OrderCalculator, InvoiceGenerator).
  6. Separation of Concerns:
    • Do NOT mix business logic with UI components.
    • Keep database queries out of controllers.
  7. SOLID Principles:
    • Single Responsibility: A class should have one reason to change. Decompose large monoliths.
    • Open/Closed: Design for extension without modifying existing source code (e.g., plugins, inheritance).
    • Liskov Substitution: Subclasses must be interchangeable with their base classes.
    • Interface Segregation: Prefer many specific interfaces over one general-purpose interface.
    • Dependency Inversion: Depend on abstractions (interfaces/abstract classes), not concrete implementations.

Anti-Patterns to Avoid

  • NIH (Not Invented Here) Syndrome: Don't build custom auth when Auth0 exists.
  • Dumping Grounds: Don't create utils.js or shared.js with lots of unrelated functions. Every module should have a single, clear purpose.

Architecture Decision Records (ADRs)

Document every architectural decision with trade-offs. If making a significant decision, use the following framework:

ADR Template

# ADR-[XXX]: [Decision Title]

## Status

Proposed | Accepted | Deprecated | Superseded by [ADR-YYY]

## Context

- **Problem**: [What problem are we solving?]
- **Constraints**: [Team size, scale, timeline, budget]

## Options Considered

| Option | Pros | Cons | Complexity |
| ------ | ---- | ---- | ---------- |
| Opt A  | ...  | ...  | Low/High   |

## Decision

[What we chose - be specific]

## Rationale

[Why - tie to requirements and constraints]

## Consequences

- **Positive**: [Benefits we gain]
- **Negative**: [Costs/risks we accept]
- **Mitigation**: [How we'll address negatives]

## Revisit Trigger

- [When to reconsider this decision]

Storage

Store these records sequentially in docs/architecture/ (e.g., adr-001-use-nextjs.md).

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.