# Design Maintainable Backend Architectures

Complex backend systems become difficult to test and change when dependencies cross domain boundaries. This skill applies Clean Architecture, Hexagonal Architecture, and DDD patterns.

## Install

```bash
npx skillstore add sickn33/architecture-patterns
```

## Metadata

- Status: approved
- Slug: sickn33-architecture-patterns
- Skillstore revision: r2
- Version status: missing
- Tree hash: 64bd7ae5411d960288a5154fb7a14bcef27d540c863d3f859bd592f6590eee24
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/architecture-patterns
- Ref: 86d877f219e2131f05dd5b37c5e329c71c7b8ec4
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: env\_access, external\_commands
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/sickn33-architecture-patterns
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-architecture-patterns/manifest

## Capabilities

- Explains Clean Architecture layers and inward dependency rules.
- Maps Hexagonal Architecture ports, adapters, domain services, and infrastructure boundaries.
- Applies DDD concepts including bounded contexts, entities, value objects, aggregates, repositories, and domain events.
- Provides illustrative Python structures for use cases, repositories, controllers, payment adapters, and domain models.
- Creates migration steps, module boundaries, interfaces, and validation checks from stated constraints.

## Use Cases

- Design a new backend: Select a pattern and define boundaries for a new service with clear domain rules and infrastructure adapters.
- Plan monolith decomposition: Map coupling, identify bounded contexts, and create incremental migration steps for an established application.
- Set team standards: Create shared dependency rules, interface conventions, and review checks for consistent backend architecture.

## Prompt Templates

### Choose a pattern

```
I am building [system] with [requirements]. Compare Clean Architecture, Hexagonal Architecture, and DDD, then recommend the simplest suitable approach.
```

### Define system boundaries

```
Analyze this backend: [context]. Define layers, modules, interfaces, dependency directions, and infrastructure adapters. Explain each boundary.
```

### Plan a migration

```
Create an incremental migration plan for [current architecture]. Identify coupling risks, extraction order, compatibility measures, tests, and rollback checks.
```

### Review an architecture

```
Review [architecture description] against Clean Architecture, Hexagonal Architecture, and DDD. Find boundary violations, justify tradeoffs, and propose prioritized corrections with validation criteria.
```

## Limitations

- Focuses on backend architecture and does not cover frontend system design.
- Provides illustrative Python snippets, not a complete or directly executable project.
- References additional guides and assets that are not included in the packaged files.
- Requires project-specific requirements, testing, and expert validation before production adoption.

## Best Practices

- Start with domain constraints and quality targets before selecting a pattern.
- Keep dependencies pointing toward domain logic and isolate frameworks behind interfaces.
- Migrate incrementally and verify behavior with unit, integration, contract, and rollback checks.

## Anti Patterns

- Applying full DDD to simple CRUD systems without domain complexity.
- Moving business rules into controllers, ORM models, or external service adapters.
- Creating abstractions without a concrete boundary, substitution need, or testability benefit.

## Security Audit

- Audited at: 2026-07-23T20:14:17.204\+00:00
- Summary: All 13 static findings are false positives in documentation and illustrative Python examples. API-key references use dependency injection, SQL uses placeholders, and backticks format Markdown; no malicious intent or prompt injection was found.

## Stats

- Views: 120
- Downloads: 8
- Favorites: 0
- Popularity score: 0
