Laravel Boost Skill
The package ships a skill for Laravel Boost: a SKILL.md file that a coding agent loads when it works on your resources, controllers, actions and metrics, or writes client payloads for the endpoints.
Installing the skill
The skill is named laravel-rest-api. It lives in the package at resources/boost/skills/laravel-rest-api/SKILL.md, so Laravel Boost finds it in vendor/lomkit/laravel-rest-api once both packages are installed:
composer require laravel/boost --dev
php artisan boost:install
Select the skill during the installation. After an update of the package, run php artisan boost:update so that the agent reads the skill of the installed version. See the Laravel Boost documentation for its commands and for replacing a package skill with your own.
What the skill covers
The skill applies when a task touches the Lomkit\Rest\ namespace, the Rest facade, the rest:* commands, or the app/Rest/Resources and app/Rest/Controllers directories. It describes:
- the resource, the controller and
Rest::resource(), with the routes of each endpoint; - the payloads of
details,search,mutate, actions and metrics, with their limits and the exact form of their entries; - typed fields, relations, scopes, instructions, the text search and the search engines;
- the authorization model: the checks before validation, the row checks, gates and the decision cache;
- the OpenAPI document, Precognition and the Artisan commands;
- the conventions to keep: declare what you expose, and prefer an action or an instruction to a custom controller method.
Artisan Commands
Generate resources from your tables, controllers, policies, actions, metrics and responses, and check perimeters and policies with rest:check.
Translations
Translate or reword every message that the package sends to clients, with the English and French lines it ships under the rest namespace.