opencode/skills/laravel-12-best-pratices/SKILL.md
Software engineering best practices for Laravel 12.x, covering architecture, Eloquent, testing, security, and the new starter kits.
npx skillsauth add mbuyco/dotfiles laravel-12-best-practicesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill outlines the recommended software engineering practices for developing applications with Laravel 12.x. It incorporates modern PHP 8.2+ features, the latest Laravel 12 enhancements (such as the new starter kits and UUIDv7 defaults), and industry-standard architecture patterns.
For new projects, prefer using the official Laravel 12 starter kits which now feature improved defaults:
app/ structure for small-to-medium applications.src/Domains/Order, src/Domains/User) rather than by technical layer.declare(strict_types=1);).rector/rector package to automatically upgrade older PHP syntax to modern PHP 8.2+ standards.HasUuids trait for time-sortable unique identifiers.// Preferred
return User::find(1)->toResource();
return User::query()->paginate()->toResourceCollection();
$fillable or $guarded properties to prevent mass assignment vulnerabilities.// In AppServiceProvider::boot()
Model::preventLazyLoading(! $this->app->isProduction());
Context facade for handling request-scoped data (logging, tracing) instead of global state.$response->assertJson(fn (AssertableJson $json) =>
$json->has('data')
->where('data.id', 1)
->etc()
);
development
# SKILL.md ## Name VimReaper ## Description VimReaper is a dead‑code cleanup skill that systematically scans a codebase to identify and safely remove unused code—dead functions, unreachable blocks, obsolete variables, redundant imports, and leftover comments—while preserving the intended logic and test suite. As its name suggests, VimReaper wields the **vim editor** as its primary scalpel: code removal is performed using vim’s precise ex commands, search patterns, and scripted editing modes, m
development
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
development
Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.
testing
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".