Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

php-laravelPHP Laravel 搜索

Agent Skill

php-laravel 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

759

周安装

31

GitHub Stars

2

下载量

246
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-php --skill php-laravel

简介

用于查找、检索与筛选 Laravel 框架相关资源。

  • 适合根据关键词定位中间件、路由或 Eloquent 用法。
  • 需结合项目实际版本和配置理解输出。php-laravel 属于前端设计类 Skill,可作为该场景下的辅助能力补充。
  • 避免生成未适配当前环境的代码示例。
  • 安装前请确认是否会触发 Composer 或 Artisan 命令。

SKILL.md

Laravel Framework Skill

Atomic skill for mastering Laravel application development

Overview

Comprehensive skill for building production-ready Laravel applications. Covers Laravel 10.x-11.x with focus on Eloquent ORM, Blade templating, API development, and queues.

Skill Parameters

Input Validation

interface SkillParams {
  topic:
    | "eloquent"         // ORM, relationships, queries
    | "routing"          // Routes, middleware, controllers
    | "blade"            // Templates, components, layouts
    | "authentication"   // Sanctum, Passport, Fortify
    | "queues"           // Jobs, workers, Horizon
    | "testing"          // Feature tests, factories
    | "api";             // API resources, versioning

  level: "beginner" | "intermediate" | "advanced";
  laravel_version?: "10" | "11";
  stack?: "livewire" | "inertia-vue" | "inertia-react" | "blade-only";
}

Validation Rules

validation:
  topic:
    required: true
    allowed: [eloquent, routing, blade, authentication, queues, testing, api]
  level:
    required: true
  laravel_version:
    default: "11"

Learning Modules

Module 1: Eloquent ORM Mastery

beginner:
  - Model basics and conventions
  - CRUD operations
  - Basic relationships

intermediate:
  - Advanced relationships (morphTo, hasManyThrough)
  - Eager loading and N+1 prevention
  - Query scopes

advanced:
  - Custom casts and accessors
  - Performance optimization
  - Database transactions

exercises:
  - Build blog with posts, comments, tags
  - Implement soft deletes
  - Create polymorphic media system

Module 2: API Development

beginner:
  - API routes and controllers
  - JSON responses
  - Basic authentication (Sanctum)

intermediate:
  - API Resources and Collections
  - Pagination and filtering
  - Rate limiting

advanced:
  - OAuth with Passport
  - API versioning patterns
  - OpenAPI documentation

Module 3: Queue Processing

beginner:
  - Job basics and dispatching
  - Queue connections
  - Failed jobs handling

intermediate:
  - Job chaining and batching
  - Horizon monitoring

advanced:
  - Custom queue drivers
  - Saga patterns

Execution Flow

graph TD
    A[Skill Invoked] --> B{Validate Params}
    B -->|Invalid| C[Return Error]
    B -->|Valid| D{Check Laravel Version}
    D --> E[Load Version-Specific Content]
    E --> F{Topic Router}
    F --> G[Generate Examples + Exercises]

Error Handling & Retry Logic

errors:
  VERSION_INCOMPATIBLE:
    code: "LARAVEL_001"
    recovery: "Suggest upgrade or alternative"

  PACKAGE_MISSING:
    code: "LARAVEL_002"
    recovery: "Provide composer require command"

retry:
  max_attempts: 3
  backoff:
    type: exponential
    initial_delay_ms: 100

Code Examples

Eloquent Model (Laravel 11)

<?php
declare(strict_types=1);

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

final class Post extends Model
{
    use HasFactory;

    protected $fillable = ['title', 'slug', 'content', 'author_id'];

    protected function casts(): array
    {
        return [
            'published_at' => 'datetime',
        ];
    }

    public function author(): BelongsTo
    {
        return $this->belongsTo(User::class, 'author_id');
    }

    public function comments(): HasMany
    {
        return $this->hasMany(Comment::class);
    }

    public function scopePublished($query)
    {
        return $query->whereNotNull('published_at');
    }
}

API Resource Controller

<?php
declare(strict_types=1);

namespace App\Http\Controllers\Api\V1;

use App\Http\Controllers\Controller;
use App\Http\Resources\PostResource;
use App\Models\Post;
use Illuminate\Http\Response;

final class PostController extends Controller
{
    public function index()
    {
        return PostResource::collection(
            Post::with(['author'])->paginate(15)
        );
    }

    public function store(StorePostRequest $request)
    {
        $post = Post::create($request->validated());

        return (new PostResource($post))
            ->response()
            ->setStatusCode(Response::HTTP_CREATED);
    }
}

Queue Job

<?php
declare(strict_types=1);

namespace App\Jobs;

use App\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\Middleware\WithoutOverlapping;

final class SendWelcomeEmail implements ShouldQueue
{
    use Queueable, InteractsWithQueue;

    public int $tries = 3;
    public int $backoff = 60;

    public function __construct(
        public readonly User $user,
    ) {}

    public function middleware(): array
    {
        return [new WithoutOverlapping($this->user->id)];
    }

    public function handle(): void
    {
        $this->user->notify(new WelcomeNotification());
    }
}

Test Templates

<?php
declare(strict_types=1);

namespace Tests\Feature\Api;

use App\Models\Post;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Laravel\Sanctum\Sanctum;
use Tests\TestCase;

final class PostApiTest extends TestCase
{
    use RefreshDatabase;

    public function test_can_list_posts(): void
    {
        Post::factory()->count(5)->create();

        $this->getJson('/api/v1/posts')
            ->assertOk()
            ->assertJsonCount(5, 'data');
    }

    public function test_authenticated_user_can_create(): void
    {
        Sanctum::actingAs(User::factory()->create());

        $this->postJson('/api/v1/posts', ['title' => 'Test'])
            ->assertCreated();
    }
}

Troubleshooting

ProblemSolution
N+1 queriesUse with() for eager loading
Queue jobs stuckCheck QUEUE_CONNECTION, run queue:work
Route not foundRun route:clear, check middleware

Quality Metrics

MetricTarget
Code accuracy100%
Laravel conventions100%
N+1 prevention100%

Usage

Skill("php-laravel", {topic: "eloquent", level: "intermediate"})

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.92%
按下载量换算86

Claude

31.08%
按下载量换算76

Cursor

19.94%
按下载量换算49

Gemini CLI

9.03%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills