architecture

Enforce Laravel 12 clean architecture using Actions, DTOs, and Policies.

1|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/aronpc/ai --skill architecture-aronpc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture
Source: https://github.com/aronpc/ai/tree/main/skills/architecture
Command: npx skills add https://github.com/aronpc/ai --skill architecture-aronpc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Arquitetura de código fragmentada em projetos Laravel, oferecendo um blueprint de arquitetura limpa com Actions, DTOs e Policies para manter responsabilidades claras.

Core Features & Use Cases

  • Estrutura de pastas clara (Actions, DataObjects/DTOs, Policies) para separação de responsabilidades.
  • Controller thin orchestration com validação delegada a Form Requests e políticas de autorização.
  • Guia de padrões de codificação e convenções para Laravel 12, PHP 8.5+.

Quick Start

Crie rapidamente uma Action inicial com um DTO correspondente e conecte-a à política de autorização para iniciar a feature.

Frequently Asked Questions about architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce clean architecture in a Laravel project using Actions and DTOs?

To enforce clean architecture in Laravel, this blueprint prescribes separating concerns using Actions for business logic, immutable DTOs for data transfer, and Policies for authorization, keeping controllers thin and delegating validation to Form Requests.

What is the best way to structure Laravel controllers to maintain separation of concerns?

The best way to maintain separation of concerns in Laravel is using thin controller orchestration, delegating validation to Form Requests, authorization to Policies, and business logic to Actions, ensuring controllers only coordinate the workflow.

Does this Laravel clean architecture blueprint require specific PHP and framework versions?

Yes, this clean architecture blueprint requires adherence to PHP 8.5+ and Laravel 12 conventions, enforcing modern coding standards, immutable data objects, and policy-driven authorization across your project structure.

How do I start implementing a new feature with Actions and DTOs in Laravel?

To start implementing a feature, create an initial Action with a corresponding DTO, connect it to the relevant authorization Policy, and orchestrate them from a thin controller to ensure clear responsibility separation.

When should I use immutable DTOs instead of standard Eloquent models for data transfer in Laravel?

You should use immutable DTOs instead of standard Eloquent models when transferring data across architectural layers in Laravel, ensuring data integrity and strict separation of concerns by preventing unexpected mutations within your Actions.