create-console-command
Installation
SKILL.md
Create Console Command
When To Use
Use this skill for Laravel Artisan commands, especially when the command should be discoverable, generator-backed, and friendly to interactive users.
Inputs Needed
- Command purpose, signature, options, prompts, output, side effects, and tests.
Workflow
- Check whether an Artisan generator already exists before creating the file manually.
- Use the appropriate
php artisan make:*command when one exists. - Put reusable behavior in Actions, Services, Jobs, or Support classes.
- Use
laravel/promptsfor interactive input, choice, and confirmation instead of ad hoc console IO. - Keep the command thin and typed.
- Add tests for signature, output, and behavior.