jdavidbakr / laravel-cruddy-design-skill
Enforces single-responsibility resourceful controllers for AI agents via Laravel Boost.
Package info
github.com/jdavidbakr/laravel-cruddy-design-skill
pkg:composer/jdavidbakr/laravel-cruddy-design-skill
Requires
- php: ^8.2
- laravel/boost: ^2.0
README
Enforces single-responsibility, resourceful controller design for AI agents using Laravel Boost.
This package adds a Boost skill that nudges code generation toward strict RESTful controllers and away from custom one-off controller actions.
What It Enforces
- Only the 7 resource actions in controllers:
index,create,store,show,edit,update,destroy - No custom controller methods like
publish(),approve(),ship(),ban() - New behaviors should be modeled as new resource controllers
Examples:
- Instead of
UserController@ban, createBannedUserController@store - Instead of
InvoiceController@download, createInvoiceDownloadController@storeorInvoiceDownloadController@show - Instead of
OrderController@ship, createShippedOrderController@store
Requirements
- PHP 8.2+
- Laravel Boost 2.x
Installation
Install the package in your Laravel app:
composer require --dev jdavidbakr/laravel-cruddy-design-skill
If you do not use --dev for AI tooling packages in your workflow, you can install it as a regular dependency.
Install via boost:add-skill
If you prefer installing the skill directly from GitHub into .ai/skills, use Boost's remote skill installer:
php artisan boost:add-skill jdavidbakr/laravel-cruddy-design-skill/resources/boost/skills --skill=cruddy-by-design
Install all skills found in the repository path:
php artisan boost:add-skill jdavidbakr/laravel-cruddy-design-skill/resources/boost/skills --all
Notes:
boost:add-skillinstalls skill files into your app's local.ai/skillsdirectory.- This command is an alternative to installing the Composer package.
- You can use either workflow, but most teams should pick one approach to avoid duplicate skill sources.
Enable in Laravel Boost
Boost discovers skills from installed packages under resources/boost/skills.
After installing this package, sync Boost so the skill is added to your configured agents:
php artisan boost:update --discover
If Boost is not set up yet, run:
php artisan boost:install
During setup, make sure skills are enabled for the agents you use.
If you installed with boost:add-skill, Boost will sync the downloaded skill from .ai/skills.
Verify It Is Active
After syncing, ask your agent to scaffold a controller action that would normally tempt a custom method (for example, "ban user" or "ship order").
Expected behavior:
- The agent should avoid adding a non-resource method to an existing controller.
- The agent should propose a dedicated resource controller and route.
Skill Source
The skill file provided by this package is:
resources/boost/skills/cruddy-by-design/SKILL.md
License
MIT