agentsclimarketplace

Php architecture action based

Skill ekut/claude-code-php-toolkit/skills/php-architecture-action-based

Action-Based / ADR architecture for PHP — single-action controllers, invokable handlers, Command/Query separation, Action-Domain-Responder pattern.From its SKILL.md

Install
npx -y skills add ekut/claude-code-php-toolkit --skill php-architecture-action-based

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.5 KB, as published. Nobody here has run it

Action-Based / ADR Architecture

Action-Based architecture organizes code around single-responsibility actions: each class handles exactly one use case. Instead of a controller with 7 methods, you have 7 small classes with one __invoke() method each. This maps naturally to how HTTP works — one URL, one handler.

The pattern is also known as ADR (Action-Domain-Responder), an alternative to MVC proposed by Paul M. Jones. ADR separates the HTTP-specific action from the domain logic and the response formatting, giving each responsibility a dedicated class.

When to Use

  • The application is request-response oriented — web APIs, HTTP services, queue workers
  • Each endpoint does one distinct thing — no complex multi-step wizards sharing state
  • The team prefers small, focused classes over large controllers with many methods
  • You want CQRS-lite without the full DDD ceremony — separate read and write paths
  • The project is an API-first application or a set of microservices
  • You value high testability through small, isolated units
  • The team finds large controller classes hard to navigate and review

Module Index

TopicFileUse when…
Core Principlescore-principles.mdExplaining one-class-one-action, __invoke(), no god services
Directory Structuredirectory-structure.mdSetting up a new project; choosing standard layout vs ADR variant
Building Blocksbuilding-blocks.mdImplementing actions, command/query handlers, ADR responders, route registration
Cross-Cuttingcross-cutting.mdLogging, auth, validation, and error handling in an action-based context
Anti-Patternsanti-patterns.mdCode review, migration decisions, "When to Migrate Away", checklist

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.