agentleFS
vortegvorteg/swagentics/.github/skills/architecture-patterns/SKILL.md

architecture-patterns

Skill1 starsChanged 7 months agoMITView on GitHub

Software architecture and design patterns. Use when: designing system architecture, choosing patterns, creating ADRs, defining interfaces, structuring modules, applying SOLID principles, choosing between monolith/microservices/modular.

34 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use python-resource-management, error-handling-patterns and 10 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.
  • Aver005Skill

    python-resource-management

    Python resource management with context managers, cleanup patterns, and streaming. Use when managing connections, file handles, implementing cleanup logic, or building streaming responses with accumulated state.

    Also in 3 projects that use this

  • xfstudioSkill

    error-handling-patterns

    Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

    Also in 6 projects that use this

  • CodeWithBehnamSkill

    python-type-safety

    Python type safety with type hints, generics, protocols, and strict type checking. Use when adding type annotations, implementing generic classes, defining structural interfaces, or configuring mypy/pyright.

    Also in 3 projects that use this

  • xfstudioSkill

    python-testing-patterns

    Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.

    Also in 6 projects that use this

  • Aver005Skill

    python-project-structure

    Python project organization, module architecture, and public API design. Use when setting up new projects, organizing modules, defining public interfaces with __all__, or planning directory layouts.

    Also in 3 projects that use this

  • AJBcodingSkill

    python-performance-optimization

    Profile and optimize Python code using cProfile, memory profilers, and performance best practices. Use when debugging slow Python code, optimizing bottlenecks, or improving application performance.

    Also in 4 projects that use this

  • +2 more from Aver005
  • +4 more from xfstudio

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 30 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Interface Segregation: Keep interfaces small and focused — clients should not depend on methods they don't use.

    line 16

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

Architecture Patterns

When to Use

  • Designing a new module, service, or system boundary
  • Choosing between architectural patterns (Clean Architecture, Hexagonal, CQRS)
  • Creating an Architecture Decision Record (ADR)
  • Defining interfaces, contracts, or ports

Core Principles

  • Contract-First: Define inputs and outputs (interfaces/schemas) before implementation.
  • Interface Segregation: Keep interfaces small and focused — clients should not depend on methods they don't use.
  • Dependency Inversion: Depend on abstractions, not concretions. Core business logic should not import infrastructure.
  • High Cohesion, Low Coupling: Group related functionality together. Minimize dependencies between modules.

Pattern Selection Guide

ScenarioPatternWhy
CRUD with simple domainLayered (Controller → Service → Repository)Low overhead, familiar
Complex business rulesClean Architecture (Domain → Application → Infrastructure)Isolates domain logic
Event-driven workflowsCQRS + Event SourcingSeparates reads from writes
Multiple external integrationsHexagonal / Ports & AdaptersSwappable infrastructure
Rapid prototypingVertical SlicesFeature-based grouping, fast iteration

ADR Template

# ADR-NNN: [Title]

## Status: [Proposed | Accepted | Deprecated | Superseded by ADR-NNN]

## Context
[What forces are at play? What is the problem?]

## Decision
[What is the change being proposed?]

## Consequences
[What are the tradeoffs? What becomes easier/harder?]

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.