python-architecture-patterns

Community

Build testable Python architecture by default

Authorhoesler
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps you design, implement, and review Python code that stays testable, decoupled, and easy to change by avoiding common architecture mistakes like god objects, leaky abstractions, and hardcoded dependencies.

Core Features & Use Cases

  • Architecture Guidance: Plan modules, services, class hierarchies, and boundaries using proven principles such as SOLID, separation of concerns, and composition over inheritance.
  • Code Review Support: Spot red flags like deep mock chains, Law of Demeter violations, missing type hints, and side effects hidden in constructors.
  • Refactoring Direction: Turn mixed-concern code into cleaner designs with dependency injection, repositories, adapters, and focused service layers.
  • Practical Python Conventions: Use dataclasses for data objects, Protocols or ABCs for abstractions, and functions for stateless behavior.
  • Use Case: If a Python service directly opens databases, reaches through multiple object layers, or becomes impossible to test without real infrastructure, this Skill shows how to restructure it.

Quick Start

Ask the python-architecture-patterns skill to review your Python codebase and recommend a cleaner, more testable architecture for the specific module or pull request you are working on.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: python-architecture-patterns
Download link: https://github.com/hoesler/agent-stuff/archive/main.zip#python-architecture-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 536,000+ vetted skills library on demand.