secondsky avatar

Architecture Patterns

This one walks you through Clean Architecture, Hexagonal Architecture, and DDD with actual code examples in Python. You get the full layer breakdowns (entities, use cases, adapters), directory structures, and working implementations showing how to separate your domain logic from framework dependencies. The examples are practical: user repositories, order services, value objects, and how to wire up ports and adapters so you can swap databases or mock things for testing. It's comprehensive enough to use as a reference when refactoring a monolith or setting up architecture standards for a team. The code samples are clear and show the dependency flow you actually need to maintain to make these patterns work.

skills.sh installs
508
GitHub stars
248
last updated
Aug 21, 2026

Install

$ npx -y skills add secondsky/claude-skills --skill architecture-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Architecture Patterns

Master proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design to build maintainable, testable, and scalable systems.

When to Use This Skill

  • Designing new backend systems from scratch
  • Refactoring monolithic applications for better maintainability
  • Establishing architecture standards for your team
  • Migrating from tightly coupled to loosely coupled architectures
  • Implementing domain-driven design principles
  • Creating testable and mockable codebases
  • Planning microservices decomposition

Core Concepts

1. Clean Architecture (Uncle Bob)

Layers (dependency flows inward):

  • Entities: Core business models
  • Use Cases: Application business rules
  • Interface Adapters: Controllers, presenters, gateways
  • Frameworks & Drivers: UI, database, external services

Key Principles:

  • Dependencies point inward
  • Inner layers know nothing about outer layers
  • Business logic independent of frameworks
  • Testable without UI, database, or external services

2. Hexagonal Architecture (Ports and Adapters)

Sponsors

Details

Repository
github.com/secondsky/claude-skills
Categories
Backend & APIs, Code Review & Quality, Design & UI/UX
First seen
Jun 3, 2026

More from secondsky/claude-skills

All 146
1hkuds avatarcli-anything-slay-the-spire-iihkuds/cli-anythingCommand-line interface for Slay the Spire 2 - Control the real game through a local bridge mod HTTP API. Reads normalized game state and sends action commands f506skills.sh installs
2hugorcd avatarcreate-evlog-framework-integrationhugorcd/evlogCreate a new evlog framework integration to add automatic wide-event logging to an HTTP framework. Use when adding middleware/plugin support for a framework (e.503skills.sh installs
3jezweb avatartanstack-tablejezweb/claude-skillsBuild headless data tables with TanStack Table v8. Server-side pagination, filtering, sorting, and virtualization for Cloudflare Workers + D1. Prevents 12 docum502skills.sh installs
4aj-geddes avatarcode-documentationaj-geddes/useful-ai-promptsWrite comprehensive code documentation including JSDoc, Python docstrings, inline comments, function documentation, and API comments. Use when documenting code,500skills.sh installs
5bobmatnyc avataraxumbobmatnyc/claude-mpm-skillsAxum (Rust) web framework patterns for production APIs: routers/extractors, state, middleware, error handling, tracing, graceful shutdown, and testing500skills.sh installs
6openzeppelin avatarupgrade-solidity-contractsopenzeppelin/openzeppelin-skillsUpgrade Solidity smart contracts using OpenZeppelin proxy patterns. Use when users need to: (1) make contracts upgradeable with UUPS, Transparent, or Beacon pro500skills.sh installs