Agent skill
Laravel
Laravel services must respect these conventions and quality checks.
Install this agent skill to your Project
npx add-skill https://github.com/hivellm/rulebook/tree/main/templates/skills/frameworks/laravel
SKILL.md
Laravel Framework Rules
CRITICAL: Laravel services must respect these conventions and quality checks.
Quality Commands
- Static analysis:
./vendor/bin/pint --test - Lint style:
./vendor/bin/phpcs --standard=PSR12 app/ - Unit tests:
php artisan test - Feature tests:
php artisan test --testsuite=Feature - Coverage: ensure
php artisan test --coverage≥ 80%
Project Structure
- Keep HTTP controllers in
app/Http/Controllers - Use form requests for validation in
app/Http/Requests - Organize business logic in
app/Services - Leverage repositories for data persistence where appropriate
- Store queued jobs in
app/Jobs
Implementation Guidelines
- Use migrations for every schema change (
php artisan make:migration) - Keep Eloquent models lean; move heavy logic into services
- Cache configuration after deployment (
php artisan config:cache) - Register scheduled tasks in
app/Console/Kernel.php - Ensure
app/Providersregisters new bindings/events
Composer Hygiene
composer install --no-dev --prefer-dist
composer dump-autoload
Additional Checks
- Sync
.env.examplewhenever new variables are introduced - Document API changes in
/docs/laravel-api.md - Generate API resources via
php artisan make:resource
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
DAG Workflow
Maintain a clean dependency graph (DAG) to prevent circular dependencies and ensure maintainable architecture.
Documentation Rules
All documentation in English. Root README concise, detailed docs in `/docs`.
Quality Enforcement
These rules are NON-NEGOTIABLE and MUST be followed without exception.
Rulebook Task Management
Spec-driven task management for features and breaking changes with OpenSpec-compatible format
Agent Automation
Mandatory workflow that AI agents MUST execute after EVERY implementation.
C
Execute these commands after EVERY implementation (see AGENT_AUTOMATION module for full workflow).
Didn't find tool you were looking for?