garrettw/php-arch-skills

A shared library of AI agent skills to help you build better PHP apps through better architecture.

11Stars on the repository
14Mods indexed here, across every type
1mo agoLast push, which is what freshness is scored on
MPL-2.0Licence, which decides whether bodies are shown

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when building server-side web/HTTP request handling, controllers, views, or templates in PHP frameworks, or when a framework's "MVC" terminology causes confusion about where logic belongs. Triggers on questions about controllers, the Web MVC pattern, Action-Domain-Responder, view/template separation, or…

not rated 11 1mo ago A 77 tokens original MPL-2.0

application-layer

02

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when writing controllers, structuring use cases, or implementing Service Layer / Application Layer and Command/Query/Handler (CQRS) patterns in PHP applications. Triggers on questions about thin controllers, handler responsibilities, service definition, or DTO usage.

not rated 11 1mo ago A 55 tokens original MPL-2.0

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when refactoring legacy PHP code toward a cleaner architecture. Provides guidance on incremental migrations (Strangler Fig), vertical slicing, writing characterization tests, and managing temporary compatibility shims.

not rated 11 1mo ago A 42 tokens original MPL-2.0

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when choosing a system-level architecture (monolith, modular monolith, microservices, event-driven, serverless, clean/hexagonal, or DDD) for a new or growing PHP application, or when weighing a premature move to a more distributed style. Provides a decision guide and the common pitfalls that cause…

not rated 11 1mo ago A 77 tokens original MPL-2.0

bounded-contexts

05

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when designing system boundaries, discovering or defining bounded contexts, deciding where code belongs, or defining shared kernel and context map relationships in a PHP monolith.

not rated 11 1mo ago A 37 tokens original MPL-2.0

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when wiring dependencies, configuring a DI container, designing plugin/extension points, or migrating away from legacy service locators in PHP. Triggers on questions about constructor injection, interface registration, swapping implementations, or testing without booting the container.

not rated 11 1mo ago A 55 tokens original MPL-2.0

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when designing remote interfaces or APIs, deciding how coarse-grained an endpoint or operation should be, or shaping data that crosses a process or network boundary. Covers Remote Facade and DTO (Data Transfer Object). Triggers on questions about REST/GraphQL/gRPC endpoint design, exposing use cases…

not rated 11 1mo ago A 91 tokens original MPL-2.0

domain-events

08

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when introducing domain events, deciding how to decouple side-effects, or implementing the record-then-publish pattern in PHP apps. Triggers on questions about event naming, payloads, or cross-context ownership.

not rated 11 1mo ago A 48 tokens original MPL-2.0

domain-modeling

09

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when deciding whether to use rich domain objects vs lean ORM entities, choosing Transaction Script vs Table Module vs a Domain Model, identifying real business objects, or evaluating the cost-benefit of full DDD vs lean structure in a PHP application.

not rated 11 1mo ago A 54 tokens original MPL-2.0

event-sourcing

10

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when evaluating or implementing Event Sourcing in a PHP application. Triggers on questions about event stores, aggregates, projections, snapshots, event replay, temporal queries, CQRS with event sourcing, or PHP event-sourcing libraries (Ecotone, Prooph, EventSauce, Patchlevel). Distinguishes Event…

not rated 11 1mo ago A 86 tokens original MPL-2.0

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when applying clean-architecture, DDD, or hexagonal patterns inside a specific PHP framework. Provides framework-specific port mapping, adapter patterns, and pitfalls to avoid for Laravel, Symfony, Slim, CakePHP, CodeIgniter, Yii, Laminas, Mezzio, Zend Framework, and legacy/maintenance-mode frameworks.…

not rated 11 1mo ago A 91 tokens original MPL-2.0

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when integrating third-party APIs, SDKs, or infrastructure services (like search engines or email). Provides rules for designing provider adapters/gateways, handling webhooks, and preventing vendor lock-in.

not rated 11 1mo ago A 47 tokens original MPL-2.0

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when implementing database persistence, choosing a data source pattern, managing repository interfaces, writing mappers, or splitting large repositories. Assumes the decision between a rich domain model and a lean ORM model has already been made by the domain-modeling skill.

not rated 11 1mo ago A 57 tokens original MPL-2.0

testing-strategy

14

garrettw/php-arch-skills

Skill Claude CodeCodex

Use this skill when writing tests for a PHP application. Provides layer-specific guidance to choose the right testing style (unit, integration, feature) for domain objects, mappers, repositories, handlers, and controllers.

not rated 11 1mo ago A 46 tokens original MPL-2.0

At most 3 mods per repository are shown here, and a mod shipped inside a plugin is left to that plugin's page — the rest are on their repository pages: