python-clean-architecture-codex

A Codex CLI skill to scaffold, review, and refactor Python/FastAPI projects with clean architecture.

Codex CLI Python FastAPI Clean Architecture Design Patterns

Install

$skill-installer install https://github.com/MKToronto/python-clean-architecture-codex

Codex will ask you to approve a few steps — say yes each time. Then restart Codex.

What It Does

Provides principles-driven design guidance, 25 Pythonic design patterns, and three-layer FastAPI architecture scaffolding directly inside Codex CLI. Inspired by Arjan Codes' methodology.

7 Design Principles

Cohesion, coupling, abstractions, composition, creation/use separation, data-first design, simplicity.

25 Pythonic Patterns

Strategy, Registry, Pub/Sub, CQRS, Repository, Builder, Adapter, Facade, and more — all implemented the Pythonic way.

22 Code Quality Rules

Naming, nesting, types, error handling, imports, structure — with a code review checklist.

Three-Layer Architecture

Routers → Operations → Database with Protocol-based dependency injection.

Workflows

Links