architecture-patterns
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design.
Skill by Mr-Wolv
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/mr-wolv-architecture-patterns
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/architecture-patterns
What's inside
- Skill 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.
- License
- MIT
- Instructions
- 169 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- advanced-patterns.md · references/
- details.md · references/
SKILL.md (first lines)
# Architecture Patterns
Master proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design to build maintainable, testable, and scalable systems.
**Given:** a service boundary or module to architect.
**Produces:** layered structure with clear dependency rules, interface definitions, and test boundaries.
## When to Use This Skill
- Designing new backend services or microservices from scratch
- Refactoring monolithic applications where business logic is entangled with ORM models or HTTP concerns
- Establishing bounded contexts before splitting a system into services
- Debugging dependency cycles where infrastructure code bleeds into the domain layer
- Creating testable codebases where use-case tests do not require a running database
- Implementing domain-driven design tactical patterns (aggregates, value objects, domain events)
## Boundary
Use this skill for architecture synthesis and implementation patterns: selecting and applying structural patterns such as Clean Architecture, Hexagonal Architecture, and DDD in real system design or refactoring work.
Do not use this skill as the primary workflow for reviewing whether an existing architecture is good. For that, use `architecture-review`.
Do not use this skill for reviewing a narrower proposed solution shape such as one interface, workflow, or module design. For that, use `design-review`.
## Core Concepts
### 1. Clean Architecture (Uncle Bob)
**Layers (dependency flows inward):**
- **Entities**: Core business models, no framework imports
- **Use Cases**: Application business rules, orchestrate entities
- **Interface Adapters**: Controllers, presenters, gateways — translate between use cases and external formats
- **Frameworks & Drivers**: UI, database, external services — all at the outermost ring
**Key Principles:**
- Dependencies point inward only; inner layers know nothing about outer layers
- Business logic is independent of frameworks, databases, and delivery mechanisms
- Every layer boundary is crossed via an abstract interface
- Testable without UI, database, or external services
### 2. Hexagonal Architecture (Ports and Adapters)
**Components:**
- **Domain Core**: Business logic lives here, framework-free
- **Ports**: Abstract interfaces that define how the core interacts with the outside world (driving and driven)
- **Adapters**: Concrete implementations of ports (PostgreSQL adapter, Stripe adapter, REST adapter)
**Benefits:**
- Swap implementations without touching the core (e.g., replace PostgreSQL with DynamoDB)
- Use in-memory adapters in tests — no Docker required
- Technology decisions deferred to the edges
### 3. Domain-Driven Design (DDD)
**Strategic Patterns:**
- **Bounded Contexts**: Isolate a coherent model for one subdomain; avoid sharing a single model across the whole system
- **Context Mapping**: Define how contexts relate (Anti-Corruption Layer, Shared Kernel, Open Host Service)
- **Ubiquitous Language**: Every term in code matches the term used by domain experts
**Tactical Patterns:**
- **Entities**: Objects with stable identity that change over time
- **Value Objects**: Immutable objects identified by their attributes (Email, Money, Address)
- **Aggregates**: Consistency boundaries; only the root is accessible from outside
- **Repositories**: Persist and reconstitute aggregates; abstract over the storage mechanism
- **Domain Events**: Capture things that happened inside the domain; used for cross-aggregate coordination
## Detailed patterns and worked examples
Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.
## Testing — In-Memory Adapters
The hallmark of correctly applied Clean Architecture is that every use case can be exercised in a plain unit test with no real database, no Docker, and no network:
```python
# tests/unit/test_create_user.py
import asyncio
from typing import Dict, Optional
from domain.entities.user import User
from domain.interfaces.user_repository import IUserRepository
from use_cases.create_user import CreateUserUseCase, CreateUserRequest
class InMemoryUserRepository(IUserRepository):
def __init__(self):
self._store: Dict[str, User] = {}
async def find_by_id(self, user_id: str) -> Optional[User]:
return self._store.get(user_id)
async def find_by_email(self, email: str) -> Optional[User]:
return next((u for u in self._store.values() if u.email == email), None)
async def save(self, user: User) -> User:
self._store[user.id] = user
return user
async def delete(self, user_id: str) -> bool:
return self._store.pop(user_id, None) is not None
async def test_create_user_succeeds():
repo = InMemoryUserRepository()
use_case = CreateUserUseCase(user_repository=repo)
response = await use_case.execute(CreateUserRequest(email="alice@example.com", name="Alice"))
assert response.success
assert response.user.email == "alice@example.com"
assert response.user.id is not None
async def test_duplicate_email_rejected():From Mr-Wolv/Skill_Playground_Bakr101_2026, MIT.
More from Mr-Wolv/Skill_Playground_Bakr101_2026
- 0.476score
api-contract-testing
Mr-Wolv
Verify API contracts between services to ensure compatibility and prevent breaking changes.
SkillCFreshness: CClaude Code +9 - 0.474score
architecture-review
Mr-Wolv
Review an existing or proposed architecture against requirements, boundaries, risks, operability, and tradeoffs.
SkillCFreshness: CClaude Code +9 - 0.474score
architecture-decision-records
Mr-Wolv
Write and maintain formal Architecture Decision Records (ADRs) for significant technical decisions.
SkillCFreshness: CClaude Code +9 - 0.474score
assumption-and-bias-check
Mr-Wolv
Surface hidden assumptions, cognitive biases, blind spots, and overconfidence before a decision or output stands.
SkillCFreshness: CClaude Code +9 - 0.472score
skill-playground
Mr-Wolv
Curated collection of 241 skills — testing, architecture, DevOps, documentation, code quality, and engineering mindset — mirrored with global skill store
SkillCFreshness: CClaude Code +9 - 0.471score
adjacent-disciplines
Mr-Wolv
Systems engineering, HCI, cognitive psychology, game theory, control theory, organizational behavior, technical leadership
SkillCFreshness: CClaude Code +9 - 0.469score
api-documenter
Mr-Wolv
Generate API documentation from code, specifications, and endpoint definitions
SkillCFreshness: CClaude Code +9 - 0.469score
analytical-thinking-patterns
Mr-Wolv
First-principles reasoning, systems thinking, tradeoff analysis, decision frameworks
SkillCFreshness: CClaude Code +9 - 0.469score
api-tester
Mr-Wolv
Quick API endpoint testing using curl with structured output
SkillCFreshness: CClaude Code +9 - 0.469score
autonomous-learner
Mr-Wolv
Self-directed knowledge acquisition guided by analytical frameworks and learning objectives
SkillCFreshness: CClaude Code +9 - 0.463score
aws-cloud-architecture
Mr-Wolv
Comprehensive guide to AWS cloud architecture covering compute, storage, databases, networking, security, serverless, and cost optimization with…
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jul 7, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from Mr-Wolv
- 0.476score
api-contract-testing
Mr-Wolv
Verify API contracts between services to ensure compatibility and prevent breaking changes.
SkillCFreshness: CClaude Code +9 - 0.474score
architecture-review
Mr-Wolv
Review an existing or proposed architecture against requirements, boundaries, risks, operability, and tradeoffs.
SkillCFreshness: CClaude Code +9 - 0.474score
architecture-decision-records
Mr-Wolv
Write and maintain formal Architecture Decision Records (ADRs) for significant technical decisions.
SkillCFreshness: CClaude Code +9 - 0.474score
assumption-and-bias-check
Mr-Wolv
Surface hidden assumptions, cognitive biases, blind spots, and overconfidence before a decision or output stands.
SkillCFreshness: CClaude Code +9 - 0.472score
skill-playground
Mr-Wolv
Curated collection of 241 skills — testing, architecture, DevOps, documentation, code quality, and engineering mindset — mirrored with global skill store
SkillCFreshness: CClaude Code +9 - 0.471score
adjacent-disciplines
Mr-Wolv
Systems engineering, HCI, cognitive psychology, game theory, control theory, organizational behavior, technical leadership
SkillCFreshness: CClaude Code +9
Cite this page
architecture-patterns skill. Agent Mart. https://agentmart.dev/skills/mr-wolv-architecture-patterns (last updated 2026-10-24)