architecture-patterns skill (wshobson): Clean Architecture, Hexagonal and DDD for backend code
Gives your agent Clean Architecture, Hexagonal Architecture and Domain-Driven Design patterns for backend services.
- Installs
- 24.7K
- on skills.sh
- Stars
- 42.1K
- on GitHub
- Files
- 2
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
architecture-patterns is a guidance skill by Seth Hobson from the wshobson/agents collection. It loads when you design a new backend service, untangle business logic from ORM models, or fix dependency cycles. It produces a layered structure with dependency rules, interfaces and test boundaries.
Its examples are in Python. Two reference files add a full project tree, an Anti-Corruption Layer, a context map, dependency injection wiring and a transactional outbox for domain events. The skill bundles no scripts.
Good for
- Backend developers starting a new service who want a clean layout
- Teams refactoring a monolith where business logic is tangled with the database
- Developers learning DDD patterns such as aggregates and value objects
Install architecture-patterns
Claude Code
- 1
Copy this prompt.
Install the architecture-patterns skill in Claude Code. Run this command: npx skills add https://github.com/wshobson/agents --skill architecture-patterns Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
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.
Sections in SKILL.md
- When to Use This Skill
- Core Concepts
- 1. Clean Architecture (Uncle Bob)
- 2. Hexagonal Architecture (Ports and Adapters)
- 3. Domain-Driven Design (DDD)
- Detailed patterns and worked examples
- Testing — In-Memory Adapters
- Troubleshooting
- Use case tests require a running database
- Circular imports between layers
- Framework decorators appearing in domain entities
- All logic ending up in controllers
- Value objects raising errors too late
- Context bleed across bounded contexts
- Advanced Patterns
- Related Skills
Key facts
- Installs on skills.sh
- 24,683 (data from 2026-11-02)
- Last repo commit
- 2026-10-30
What it includes
Entities, use cases, adapters, frameworks, dependencies point inward
Four layers with the rule that inner layers know nothing about outer ones, and every boundary crossed through an interface.
Try: “Restructure this service into Clean Architecture layers.”
Read ·
Clean ArchitectureDomain core with ports and adapters
Lets you swap storage or payment providers without touching the core, and use in-memory adapters in tests.
Read ·
Hexagonal ArchitectureBounded contexts, aggregates, value objects, domain events
Strategic patterns (contexts, context mapping, ubiquitous language) and tactical ones (entities, value objects, aggregates, repositories, events).
Try: “Model an Order aggregate with value objects for Money and Address.”
Read ·
Domain-Driven DesignTest use cases with no database, Docker or network
A worked Python example with an InMemoryUserRepository and two async tests.
Write ·
In-memory adapter testingSix common problems and their fixes
Covers use case tests that need a database, circular imports, framework code in entities, fat controllers, late value-object errors and context bleed.
Read ·
TroubleshootingDirectory structure and full worked implementation
Clean Architecture layout, a user use case, Postgres repository, controller, Hexagonal ports and a Stripe adapter, plus DDD value objects and aggregates.
Read ·
references/details.mdMulti-service tree, ACL, context map, DI wiring, outbox
Onion vs Clean Architecture, Anti-Corruption Layer, aggregate design heuristics, and domain events with a transactional outbox.
Read ·
references/advanced-patterns.md
From the official docs
Questions
What does the architecture-patterns skill do?
It teaches your agent to structure backend code with Clean Architecture, Hexagonal Architecture and DDD. The output is a layered design with clear dependency rules, interfaces and tests.
How do I install it in Claude Code?
Use the install box at the top of this page. The wshobson/agents README also documents a skills-only route with npx skills add or gh skill install.
Which language does it use?
The code examples are Python. The ideas apply to other languages, but you will need your agent to translate the examples.
Does it need any other skills?
No. SKILL.md has a Related Skills list (microservices-patterns, cqrs-implementation, saga-orchestration, event-store-design) that says when each one pairs with it, and it does not say they are required.
Is it safe?
It is instructions and example code with no scripts. Your agent may create and move files in your project when you ask for a refactor, so use a git branch and review the diff.
When is it overkill?
SKILL.md's use list covers new services, refactoring monoliths with entangled business logic, bounded contexts and testable use cases. It says nothing about small projects. As our own judgement, a small script or CRUD app may not need this many layers.
Information
updated Nov 2, 2026
- Repository
- wshobson/agents
- Folder
plugins/backend-development/skills/architecture-patterns
Sources
Docs, issue trackers and discussions this page is built from.
Show all 3Hide
- architecture-patterns SKILL.md · github.com
- architecture-patterns details.md · github.com
- architecture-patterns advanced-patterns.md · github.com