Laravel (PHP) project preferences (versions, Docker, layer boundaries, database, OpenAPI, tools). Use whenever working in or bootstrapping a Laravel project.
Ships in brain. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Before following a step, check the project's CLAUDE.md and AGENTS.md, and the files they link to, for rules on the same step. Where they conflict with this skill, follow the project. Where they add to it, do both.
Headings name the start-project step they serve during a bootstrap. Outside a bootstrap, follow them whenever the topic comes up.
composer.json require.php (^8.4) and config.platform.php (8.4)ARG PHP_VERSION=8.4 in the Dockerfilephp-version in shivammathur/setup-php in every CI jobphpVersion if setphp:<version>-fpm image plus nginx, or FrankenPHP as a single container, with postgres when used. Install only the extensions needed (e.g. pdo_pgsql or pdo_sqlite, intl, opcache), plus Composer copied from the official composer image.composer remove --dev laravel/sail, and remove or rewrite the scaffold's dev composer script, which runs php artisan serve. Never use Sail or php artisan serve.MAIL_MAILER=smtp pointing at Mailpit once mail is needed (log before then), FILESYSTEM_DISK=local, QUEUE_CONNECTION=database or sync, CACHE_STORE=database or file.src/ in composer.json, e.g. "Src\\": "src/", or one namespace per context if preferred, then run composer dump-autoload.src/<Context>/Infrastructure/. Eloquent models live in Infrastructure; domain entities are plain PHP objects.tests/Arch using Pest's arch():
arch('domain is framework-free')
->expect('Src\\*\\Domain')
->not->toUse(['Illuminate', 'Laravel']);
arch('application is framework-free')
->expect('Src\\*\\Application')
->not->toUse(['Illuminate', 'Laravel']);
arch()->preset()->php();
arch()->preset()->security();
Adjust the namespace to whatever the autoload uses. Consider arch()->preset()->strict() for src/ if it does not fight the framework.Laravel's scaffold defaults to SQLite, and enables SQLite foreign keys by default.
php artisan stub:publish, keep only the migration*.stub files (delete the other published stubs), and remove the down() method from them. Remove down() from the scaffold's default migrations in the same commit.DB_CONNECTION=pgsql, DB_HOST=postgres and the other connection variables in .env.example; set the test database in phpunit.xml (DB_DATABASE=<app>_test); install pdo_pgsql in the Dockerfile and in CI via shivammathur/setup-php.DB_DATABASE=:memory: in phpunit.xml.:memory: in phpunit.xml, and set DB_CONNECTION=pgsql in a CI matrix leg.Scramble (dedoc/scramble). It generates the spec from routes, FormRequests, API Resources and return types, with no annotations. Configure the API path, title, version and servers (local URL only) in config/scramble.php. Restrict the /docs/api UI to the local environment. Export with php artisan scramble:export --path=docs/openapi.json behind a composer docs script. Use hotmeteor/spectator where asserting responses against the spec adds real value.
pestphp/pest, pestphp/pest-plugin-laravel). Unit tests go in tests/Unit/<Context>/... and must not boot the framework. Feature tests go in tests/Feature and use RefreshDatabase.pint.json: preset laravel plus only the rules that matter (declare_strict_types, final_class, ordered_imports). Run vendor/bin/pint --test in CI.larastan/larastan) at level: max, analysing app, src, config, database, routes and tests. Do not create a baseline for a fresh project; fix the issues instead.rector/rector with driftingly/rector-laravel. Configure prepared sets for the pinned PHP version, code quality, dead code, type declarations, and the Laravel version. Run vendor/bin/rector --dry-run in CI.test, lint (pint --test), format (pint), analyse (phpstan), refactor (rector, if used), docs (scramble export), and check (runs everything). Makefile targets wrap these with docker compose exec app.What SKILL.md sets; muted values are Claude Code's defaults
/brain:laravel-stackfrom brain
npx claudepluginhub medilies/brain --plugin brain10 skills in this plugin
/commit-changesCommit with Conventional Commits v1.0.0, one logical change per commit, under the user's own git identity and with no AI attribution. Use whenever making a commit or writing a PR description./document-changesKeep docs true in the same commit as the code they describe - one home per fact, docs laid out by reader, ADRs as records, diagrams over walls of text. Use whenever a change touches behaviour, names, commands, config or architecture, and when writing or reorganizing docs./go-stackGo project preferences (versions, layer boundaries, database, OpenAPI, tools, CLIs and TUIs). Use whenever working in or bootstrapping a Go project.Other plugins' skills for the same job