resources/boost/skills/commands/SKILL.md
Artisan console command classes that serve as the CLI entry point for operations. Commands validate input and delegate all business logic to Actions or Services.
npx skillsauth add codebar-ag/coding-guidelines commandsInstall 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.
app/Console/Kernel.php) calling existing commands/jobs.app/Console/Commands/.namespace:action signature and command description.validator() or Validator.self::SUCCESS / self::FAILURE consistently.PromptsForMissingInput for better operator UX.class SendInvoiceReminders extends Command implements PromptsForMissingInput
{
protected $signature = 'invoices:send-reminders
{email : The email address to send the reminder to}
{--dry-run : Simulate the command without persisting changes}';
protected $description = 'Send invoice payment reminders to a specific user.';
// Laravel resolves this dependency automatically via container injection.
public function __construct(private readonly SendInvoiceReminderAction $action)
{
parent::__construct();
}
public function handle(): int
{
$validated = validator(
[
'email' => $this->argument('email'),
'dry_run' => $this->option('dry-run'),
],
[
'email' => ['required', 'email'],
'dry_run' => ['boolean'],
]
)->validate(); // Equivalent explicit style: Validator::make(...)->validate()
try {
$this->action->execute($validated['email']);
$this->info("Reminder sent to {$validated['email']}.");
return self::SUCCESS;
} catch (Throwable $e) {
report($e);
$this->error("Failed: {$e->getMessage()}");
return self::FAILURE;
}
}
protected function promptForMissingArgumentsUsing(): array
{
return [
'email' => ['What email should receive the reminder?'],
];
}
}
it('delegates validated input to the action', function () {
$action = Mockery::mock(SendInvoiceReminderAction::class);
$action->shouldReceive('execute')
->once()
->with('[email protected]');
$this->app->instance(SendInvoiceReminderAction::class, $action);
$this->artisan('invoices:send-reminders [email protected]')
->expectsOutput('Reminder sent to [email protected].')
->assertExitCode(Command::SUCCESS);
});
handle() instead of delegating to an Action or Serviceself::SUCCESS or self::FAILURE (e.g., returning void or null)$this->argument() / $this->option() values without validationPromptsForMissingInput, causing silent failures for missing argumentsActions/SKILL.md — for the business logic commands delegate totesting
Translation and localization conventions for Laravel. Use when adding user-facing strings, creating translation files, or working with lang/ directory.
tools
Reusable behaviour shared across multiple unrelated classes. Traits provide shared Eloquent scopes, accessors, lifecycle hooks, and small stateless helper methods.
development
Tailwind CSS v4 styling conventions. Use when working with CSS, Tailwind utilities, or customizing the theme in Laravel projects.
development
Orchestration classes that coordinate multiple Actions, external APIs, or domain operations into a cohesive workflow. Services own transaction boundaries and third-party API integrations.