Skills DirectoryCurated open-source Skills from GitHub

architecture-patternscommit 0f73766SKILL.md · Architecture

Backend Architecture Patterns

Applies Clean Architecture, Hexagonal Architecture and DDD to give a service layered structure, dependency rules, interfaces and test boundaries.

npx skills add wshobson/agents --skill architecture-patterns
Permissions
  • read-repo
  • write-files
  • shell
  • network
Compatible with
Claude Code, Codex, Cursor, Copilot, OpenCode
GitHub
42.1k
Source
Community · Seth Hobson
Status
Scan passed
License
MIT
Category
Architecture

Core rule

Dependencies point inward only; inner layers know nothing about outer layers.

Execution Phases

  1. Phase 01Choose pattern and boundaries

    Pick Clean, Hexagonal or DDD for the situation, draw bounded contexts and align on a ubiquitous language.

  2. Phase 02Layer and define interfaces

    Separate entities, use cases, interface adapters and frameworks, crossing every layer boundary through an abstract interface.

  3. Phase 03Apply tactical patterns

    Use aggregates, value objects, repositories and domain events, validating value-object invariants in the constructor.

  4. Phase 04Test with in-memory adapters

    Every use case should run in a plain unit test with no real database, Docker or network.

  5. Phase 05Troubleshoot

    Fix circular imports between layers, framework decorators on entities, bloated controllers and context bleed, adding an Anti-Corruption Layer where needed.

Permissions (summarised from SKILL.md)

CapabilityNeededDetails
File writesRequiredCreates or refactors layered code structure, interface definitions and unit tests.
Command executionNot requiredThe skill does not call for running commands.
Network outboundNot requiredNo network access.

SKILL.md frontmatter (YAML)

SKILL.md frontmatter (YAML)commit 0f73766
---
name: architecture-patterns
description: Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.
---

Related skills

A rule scan cannot catch every risk. Read this skill's SKILL.md and check its permissions before installing.