laravel-prompts
Laravel Prompts - Beautiful and user-friendly forms for command-line applications with browser-like features including placeholder text and validation

Install laravel-prompts in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Laravel Prompts Skill
Laravel Prompts is a PHP package for adding beautiful and user-friendly forms to your command-line applications, with browser-like features including placeholder text and validation. It's pre-installed in Laravel and supports macOS, Linux, and Windows with WSL.
When to Use This Skill
This skill should be triggered when:
- Building Laravel Artisan commands with interactive prompts
- Creating user-friendly CLI applications in PHP
- Implementing form validation in command-line tools
- Adding text input, select menus, or confirmation dialogs to console commands
- Working with progress bars, loading spinners, or tables in CLI applications
- Testing Laravel console commands with prompts
- Converting simple console input to modern, validated, interactive prompts
Quick Reference
Basic Text Input
use function Laravel\Prompts\text;
// Simple text input
$name = text('What is your name?');
// With placeholder and validation
$name = text(
label: 'What is your name?',
placeholder: 'E.g. Taylor Otwell',
required: true,
validate: fn (string $value) => match (true) {
strlen($value) < 3 => 'The name must be at least 3 characters.',
strlen($value) > 255 => 'The name must not exceed 255 characters.',
default => null
}
);
Password Input
use function Laravel\Prompts\password;
$password = password(
label: 'What is your password?',
placeholder: 'password',
hint: 'Minimum 8 characters.',
required: true,
validate: fn (string $value) => match (true) {
strlen($value) < 8 => 'The password must be at least 8 characters.',
default => null
}
);
Select (Single Choice)
use function Laravel\Prompts\select;
// Simple select
$role = select(
label: 'What role should the user have?',
options: ['Member', 'Contributor', 'Owner']
);
// With associative array (returns key)
$role = select(
label: 'What role should the user have?',
options: [
'member' => 'Member',
'contributor' => 'Contributor',
'owner' => 'Owner',
],
default: 'owner'
);
// From database with custom scroll
$role = select(
label: 'Which category would you like to assign?',
options: Category::pluck('name', 'id'),
scroll: 10
);
Multiselect (Multiple Choices)
use function Laravel\Prompts\multiselect;
$permissions = multiselect(
label: 'What permissions should be assigned?',
options: ['Read', 'Create', 'Update', 'Delete'],
default: ['Read', 'Create'],
hint: 'Permissions may be updated at any time.'
);
// With validation
$permissions = multiselect(
label: 'What permissions should the user have?',
options: [
'read' => 'Read',
'create' => 'Create',
'update' => 'Update',
'delete' => 'Delete',
],
validate: fn (array $values) => ! in_array('read', $values)
? 'All users require the read permission.'
: null
);
Confirmation Dialog
use function Laravel\Prompts\confirm;
// Simple yes/no
$confirmed = confirm('Do you accept the terms?');
// With custom labels
$confirmed = confirm(
label: 'Do you accept the terms?',
default: false,
yes: 'I accept',
no: 'I decline',
hint: 'The terms must be accepted to continue.'
);
// Require "Yes"
$confirmed = confirm(
label: 'Do you accept the terms?',
required: true
);
Search (Searchable Select)
use function Laravel\Prompts\search;
$id = search(
label: 'Search for the user that should receive the mail',
placeholder: 'E.g. Taylor Otwell',
options: fn (string $value) => strlen($value) > 0
? User::whereLike('name', "%{$value}%")->pluck('name', 'id')->all()
: [],
hint: 'The user will receive an email immediately.',
scroll: 10
);
Suggest (Auto-completion)
use function Laravel\Prompts\suggest;
// Static options
$name = suggest('What is your name?', ['Taylor', 'Dayle']);
// Dynamic filtering
$name = suggest(
label: 'What is your name?',
options: fn ($value) => collect(['Taylor', 'Dayle'])
->filter(fn ($name) => Str::contains($name, $value, ignoreCase: true))
);
Multi-step Forms
use function Laravel\Prompts\form;
$responses = form()
->text('What is your name?', required: true, name: 'name')
->password(
label: 'What is your password?',
validate: ['password' => 'min:8'],
name: 'password'
)
->confirm('Do you accept the terms?')
->submit();
// Access named responses
echo $responses['name'];
echo $responses['password'];
// Dynamic forms with previous responses
$responses = form()
->text('What is your name?', required: true, name: 'name')
->add(function ($responses) {
return text("How old are you, {$responses['name']}?");
}, name: 'age')
->submit();
Progress Bar
use function Laravel\Prompts\progress;
// Simple usage
$u
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- plugin.json
- references/index.md
- references/other.md
FAQ
What does the laravel-prompts skill do?
Laravel Prompts - Beautiful and user-friendly forms for command-line applications with browser-like features including placeholder text and validation
How do I install the laravel-prompts skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the laravel-prompts skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
