Token导航 LogoToken导航

Agent Skill · 研究检索

laravel-prompts(Laravel prompts 搜索)

用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。它适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需要保留真实业务约束,不要把示例当硬规则;涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

laravel-prompts 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 40,311。

总安装 1,298周安装 52GitHub Stars 31下载 420核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:laravel-prompts(Laravel prompts 搜索)
来源仓库:https://github.com/rawveg/skillsforge-marketplace
仓库路径:skills/laravel-prompts
安装命令:
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel-prompts
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel-prompts

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

laravel-prompts 用于辅助提示词、系统指令、Agent 行为约束和工作流模板的整理。适合让 Agent 规范任务边界、统一输出格式、拆分操作步骤或优化提示词可复用性。使用时需保留真实业务约束,不要把示例当硬规则。涉及自动执行、外部工具或高风险操作时,应在提示词中明确确认步骤、权限边界和失败处理方式。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/laravel-prompts

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

laravel-prompts 怎么安装?

在终端执行 npx skills add https://github.com/rawveg/skillsforge-marketplace --skill laravel-prompts。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

laravel-prompts 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

laravel-prompts 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

laravel-prompts 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

laravel-prompts 用的人多吗?

公开数据是累计安装 1,298 次,近一周安装 52 次,下载 420 次,GitHub 31 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

laravel-prompts 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
laravel-prompts

Laravel prompts 搜索 · 本页

1,29831操作浏览器MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

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
$users = progress(
    label: 'Updating users',
    steps: User::all(),
    callback: fn ($user) => $this->performTask($user)
);

// With dynamic labels
$users = progress(
    label: 'Updating users',
    steps: User::all(),
    callback: function ($user, $progress) {
        $progress
            ->label("Updating {$user->name}")
            ->hint("Created on {$user->created_at}");
        return $this->performTask($user);
    },
    hint: 'This may take some time.'
);

Loading Spinner

use function Laravel\Prompts\spin;

$response = spin(
    callback: fn () => Http::get('http://example.com'),
    message: 'Fetching response...'
);

Key Concepts

Input Types

Laravel Prompts provides several input types for different use cases:

  • text() - Single-line text input with optional placeholder and validation
  • textarea() - Multi-line text input for longer content
  • password() - Masked text input for sensitive data
  • confirm() - Yes/No confirmation dialog
  • select() - Single selection from a list of options
  • multiselect() - Multiple selections from a list
  • suggest() - Text input with auto-completion suggestions
  • search() - Searchable single selection with dynamic options
  • multisearch() - Searchable multiple selections
  • pause() - Pause execution until user presses ENTER

Output Types

For displaying information without input:

  • info() - Display informational message
  • note() - Display a note
  • warning() - Display warning message
  • error() - Display error message
  • alert() - Display alert message
  • table() - Display tabular data

Validation

Three ways to validate prompts:

  1. Closure validation: Custom logic with match expressions validate: fn (string $value) => match (true) {strlen($value) < 3 => 'Too short.', default => null}
  2. Laravel validation rules: Standard Laravel validation validate: ['email' => 'required|email|unique:users']
  3. Required flag: Simple requirement check required: true

Transformation

Use the transform parameter to modify input before validation:

$name = text(
    label: 'What is your name?',
    transform: fn (string $value) => trim($value),
    validate: fn (string $value) => strlen($value) < 3
        ? 'The name must be at least 3 characters.'
        : null
);

Terminal Features

  • Scrolling: Configure visible items with scroll parameter (default: 5)
  • Navigation: Use arrow keys, j/k keys, or vim-style navigation
  • Forms: Press CTRL + U in forms to return to previous prompts
  • Width: Keep labels under 74 characters for 80-character terminals

Reference Files

This skill includes comprehensive documentation in references/:

  • other.md - Complete Laravel Prompts documentation including:

- All prompt types (text, password, select, search, etc.) - Validation strategies and examples - Form API for multi-step input - Progress bars and loading indicators - Informational messages (info, warning, error, alert) - Tables for displaying data - Testing strategies for console commands - Fallback configuration for unsupported environments

Use view to read the reference file when detailed information is needed.

Working with This Skill

For Beginners

Start with basic prompts:

  1. Use text() for simple input
  2. Add required: true for mandatory fields
  3. Try confirm() for yes/no questions
  4. Use select() for predefined choices

Example beginner command:

$name = text('What is your name?', required: true);
$confirmed = confirm('Is this correct?');
if ($confirmed) {
    $this->info("Hello, {$name}!");
}

For Intermediate Users

Combine multiple prompts and add validation:

  1. Use the form() API for multi-step input
  2. Add custom validation with closures
  3. Use search() for database queries
  4. Implement progress bars for long operations

Example intermediate command:

$responses = form()
    ->text('Name', required: true, name: 'name')
    ->select('Role', options: ['Member', 'Admin'], name: 'role')
    ->confirm('Create user?')
    ->submit();

if ($responses) {
    progress(
        label: 'Creating user',
        steps: 5,
        callback: fn () => sleep(1)
    );
}

For Advanced Users

Leverage advanced features:

  1. Dynamic form fields based on previous responses
  2. Complex validation with Laravel validation rules
  3. Custom searchable prompts with database integration
  4. Transformation functions for data normalization
  5. Testing strategies for command prompts

Example advanced command:

$responses = form()
    ->text('Email', validate: ['email' => 'required|email|unique:users'], name: 'email')
    ->add(function ($responses) {
        return search(
            label: 'Select manager',
            options: fn ($value) => User::where('email', 'like', "%{$value}%")
                ->where('email', '!=', $responses['email'])
                ->pluck('name', 'id')
                ->all()
        );
    }, name: 'manager_id')
    ->multiselect(
        label: 'Permissions',
        options: Permission::pluck('name', 'id'),
        validate: fn ($values) => count($values) === 0 ? 'Select at least one permission.' : null,
        name: 'permissions'
    )
    ->submit();

Navigation Tips

  • Arrow keys or j/k - Navigate options in select/multiselect
  • Space - Select/deselect in multiselect
  • Enter - Confirm selection or submit input
  • CTRL + U - Go back to previous prompt (in forms)
  • Type to search - In search/multisearch prompts
  • Tab - Auto-complete in suggest prompts

Testing

Test commands with prompts using Laravel's built-in assertions:

use function Pest\Laravel\artisan;

test('user creation command', function () {
    artisan('users:create')
        ->expectsQuestion('What is your name?', 'Taylor Otwell')
        ->expectsQuestion('What is your email?', '[email protected]')
        ->expectsConfirmation('Create this user?', 'yes')
        ->expectsPromptsInfo('User created successfully!')
        ->assertExitCode(0);
});

test('displays warnings and errors', function () {
    artisan('report:generate')
        ->expectsPromptsWarning('This action cannot be undone')
        ->expectsPromptsError('Something went wrong')
        ->expectsPromptsTable(
            headers: ['Name', 'Email'],
            rows: [
                ['Taylor Otwell', '[email protected]'],
                ['Jason Beggs', '[email protected]'],
            ]
        )
        ->assertExitCode(0);
});

Best Practices

Design Guidelines

  • Keep labels concise (under 74 characters for 80-column terminals)
  • Use hint parameter for additional context
  • Set appropriate default values when sensible
  • Configure scroll for lists with many options (default: 5)

Validation Strategy

  • Use required: true for mandatory fields
  • Apply Laravel validation rules for standard checks (email, min/max, etc.)
  • Use closures for complex business logic validation
  • Provide clear, actionable error messages

User Experience

  • Add placeholders to show expected input format
  • Use pause() before destructive operations
  • Show progress bars for operations taking >2 seconds
  • Display informational messages after actions complete
  • Group related prompts in forms for better flow

Performance

  • Use search() callbacks with length checks to avoid expensive queries: options: fn (string $value) => strlen($value) > 0? User::where('name', 'like', "%{$value}%")->pluck('name', 'id')->all(): []
  • Limit database results with pagination or top-N queries
  • Cache frequently-accessed option lists
  • Use spin() for HTTP requests and long operations

Common Patterns

User Registration Flow

$responses = form()
    ->text('Name', required: true, name: 'name')
    ->text('Email', validate: ['email' => 'required|email|unique:users'], name: 'email')
    ->password('Password', validate: ['password' => 'required|min:8'], name: 'password')
    ->submit();

Confirmation Before Destructive Action

$confirmed = confirm(
    label: 'Are you sure you want to delete all users?',
    default: false,
    hint: 'This action cannot be undone.'
);

if (! $confirmed) {
    $this->info('Operation cancelled.');
    return;
}

Dynamic Multi-step Form

$responses = form()
    ->select('User type', options: ['Regular', 'Admin'], name: 'type')
    ->add(function ($responses) {
        if ($responses['type'] === 'Admin') {
            return password('Admin password', required: true);
        }
    }, name: 'admin_password')
    ->submit();

Batch Processing with Progress

$items = Item::all();

$results = progress(
    label: 'Processing items',
    steps: $items,
    callback: function ($item, $progress) {
        $progress->hint("Processing: {$item->name}");
        return $this->process($item);
    }
);

Resources

Official Documentation

Platform Support

  • Supported: macOS, Linux, Windows with WSL
  • Fallback: Configure fallback behavior for unsupported environments

Notes

  • Laravel Prompts is pre-installed in Laravel framework
  • Supports Laravel validation rules for easy integration
  • Uses terminal control codes for interactive UI
  • All prompts return values that can be used immediately
  • Forms support revisiting previous prompts with CTRL + U
  • Validation runs on every input change for immediate feedback
  • Progress bars can be manually controlled or automated

Updating

This skill was generated from the official Laravel Prompts documentation. To refresh with updated information, re-scrape the Laravel documentation site.

平台分布

Claude Code

26.06%
按下载量换算109

Gemini CLI

25.2%
按下载量换算106

Antigravity

18.76%
按下载量换算79

windsurf

11.19%
按下载量换算47

OpenCode

6.8%
按下载量换算29

trae

3.74%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills