bionyxxx

Laravel Clean Architecture — Development skill for Claude Code

Development community

Claude Code skill: clean architecture for Laravel in 4 levels (Lean Actions → Strict Hexagonal), project analyzer, ecosystem-aware scaffolding.

How to install Laravel Clean Architecture

This entry records only its repository, not the path inside it, so there is no exact command to give. Open bionyxxx/laravel-clean-architecture and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Laravel Clean Architecture does

Claude Code skill: clean architecture for Laravel in 4 levels (Lean Actions → Strict Hexagonal), project analyzer, ecosystem-aware scaffolding.

Alternatives in Development

  • Claude Code Quest — Claude Code guide in three levels, Beginner to Advanced: hands-on lessons with checked exercises, every volati 3.6k ★
  • Laravel Simplifier — Simplify Laravel application structure 523 ★
  • New Project — Create a new project with all scaffolding rules applied 335 ★

README

laravel-clean-architecture

A [Claude Code](https://claude.com/claude-code) skill that helps Claude write Laravel code in a clean architecture. It offers four levels, from simplest to most complex, recommends one based on your project, and knows the Laravel ecosystem.

Level Shape Fits
L1 Lean Actions app/Actions + app/Data, thin controllers MVPs, CRUD apps, small teams
L2 Domain-oriented app/Domain/{Domain}/{Models,Actions,Data,Events,…} Growing products, several business areas
L3 Modular Clean app/Modules/{Module}/{Domain,Application,Infrastructure,Presentation} Medium–large apps, many integrations
L4 Strict Hexagonal Framework-free domain, ports and adapters, mappers Complex, long-lived domains, large teams

Features

  • Project analysis. scripts/analyze-project.php detects the current structure, Sail and installed packages, scores the project, and recommends a level.
  • Ecosystem-aware. It covers Laravel Sail, Spatie packages (laravel-data, permission, query-builder, model-states, …), Sanctum, Horizon, Octane, Cashier, Scout, Reverb, Pennant, Livewire, Inertia, Filament, Nova, laravel-actions, laravel-modules, Pest and Larastan.
  • Scaffolding. scripts/make-module.php generates a module for the chosen level: model, DTO, action or use case, repository, controller, routes, migration, tests and arch tests. It adapts to the packages it finds (laravel-data, laravel-actions, Pest, Sail).
  • Guides for every level, testing (including Pest arch() rules and Deptrac), and incremental migration from legacy code.
  • Laravel 13 ready. It detects the Laravel version. On 13+ the generated code uses PHP attributes (#[Table], #[Fillable], #[UseFactory], …), and on older versions it uses properties. Layer rules cover the new attributes (for example, no #[Bind] on Domain contracts at L3/L4), and decisions are written outside the Laravel Boost block in CLAUDE.md.

Co