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-patternsCommand selected. Copy it manually.
- 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
Phase 01Choose pattern and boundaries
Pick Clean, Hexagonal or DDD for the situation, draw bounded contexts and align on a ubiquitous language.
Phase 02Layer and define interfaces
Separate entities, use cases, interface adapters and frameworks, crossing every layer boundary through an abstract interface.
Phase 03Apply tactical patterns
Use aggregates, value objects, repositories and domain events, validating value-object invariants in the constructor.
Phase 04Test with in-memory adapters
Every use case should run in a plain unit test with no real database, Docker or network.
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)
| Capability | Needed | Details |
|---|---|---|
| File writes | Required | Creates or refactors layered code structure, interface definitions and unit tests. |
| Command execution | Not required | The skill does not call for running commands. |
| Network outbound | Not required | No network access. |
SKILL.md frontmatter (YAML)
---
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.
---