mcpField
L
laravel:runner-selection

laravel:runner-selection

github.com/jpcaparasDevelopment157110 installsUpdated 19w ago
Repository

About laravel:runner-selection

A Laravel development skill for choosing a consistent command runner. It detects whether Sail is available, then uses Sail or host tools for commands without mixing runtimes during a session.

Key features

  1. 01Detect Sail availability
  2. 02Choose Sail or host commands
  3. 03Keep one runtime per session
  4. 04Prefer non-interactive automation commands
  5. 05Handle destructive database commands carefully

Use cases

  1. 01Running Artisan commands in a Laravel project
  2. 02Installing dependencies consistently
  3. 03Executing commands in automated workflows
  4. 04Avoiding accidental database-destructive operations

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jpcaparas/superpowers-laravel --skill laravel:runner-selection

After installing, type/laravel:runner-selectionin Claude Code to confirm it loaded.

Details

From the project README

Runner Selection for Laravel Commands

Use Sail when present for environment consistency. Fall back to host tools when Sail is unavailable. Detect once, then stick to the choice for the session.

Detecting Sail

# Best-effort alias; safe in any repo
alias sail='sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'

# Is Sail usable?
[ -f ./sail ] || [ -x ./vendor/bin/sail ] && echo "Sail available" || echo "Sail not found"

If Sail is unavailable, use host php, composer, and your local Node (pnpm/npm/yarn). Keep versions aligned with your project.

Command Pairs

Use the left command if Sail is available; otherwise use the right.

  • sail artisan about | php artisan about
  • sail artisan test | php artisan test
  • sail artisan migrate | php artisan migrate
  • sail composer install| composer install
  • sail composer require vendor/package | composer require vendor/package
  • sail pnpm install | pnpm install
  • sail pnpm run dev | pnpm run dev
  • sail mysql | mysql (with matching DSN/env)
  • sail redis | redis-cli

Safety Notes

  • Never mix hosts: don’t install PHP deps with Composer on host and then run them inside Sail (or vice versa). Pick one runtime per session.
  • Prefer non-interactive commands in automations/agents; provide flags instead of prompts.
  • Treat DB-destructive commands (migrate:fresh, down -v) with care.

Comments

Markdown supported