Token导航 LogoToken导航TokenDH.com
运维和基础设施需要联网github未标认证来源可访问clear审计提醒

laravel-qualityLaravel quality 命令行

Agent Skill

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

总安装

2,728

周安装

116

GitHub Stars

43

下载量

956
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/leeovery/claude-laravel --skill laravel-quality

简介

laravel-quality 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。

  • 它可结合来源仓库、安装命令和原始 README 继续核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 安装命令为 npx skills add https://github.com/leeovery/claude-laravel --skill laravel-quality。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,分类属于运维和基础设施。

SKILL.md

Laravel Quality

Testing, static analysis, and code quality enforcement.

Related guides:

Quality Stack

# composer.json scripts
{
    "test": "pest",
    "analyse": "phpstan analyse",
    "format": "pint",
    "quality": [
        "@analyse",
        "@test"
    ]
}

All files must have declare(strict_types=1) at top. Run quality checks before every commit.

Architecture Tests (Pest)

Setup

tests/Pest.php

pest()->extend(Tests\TestCase::class)->in('Feature', 'Unit');

Core Architecture Tests

tests/Architecture/ActionsTest.php

<?php

declare(strict_types=1);

arch('actions are invokable')
    ->expect('App\Actions')
    ->toHaveMethod('__invoke');

arch('actions live in Actions namespace')
    ->expect('App\Actions')
    ->toBeClasses()
    ->toOnlyBeUsedIn('App\Actions', 'App\Http', 'App\Jobs', 'App\Listeners');

arch('actions do not use models directly')
    ->expect('App\Actions')
    ->not->toUse('Illuminate\Database\Eloquent\Model');

tests/Architecture/DataTest.php

<?php

declare(strict_types=1);

arch('data objects extend base Data class')
    ->expect('App\Data')
    ->toExtend('App\Data\Data')
    ->ignoring('App\Data\Data');

arch('data objects use constructor property promotion')
    ->expect('App\Data')
    ->toHaveConstructor();

tests/Architecture/StrictTypesTest.php

<?php

declare(strict_types=1);

arch('app files declare strict types')
    ->expect('App')
    ->toUseStrictTypes();

arch('test files declare strict types')
    ->expect('Tests')
    ->toUseStrictTypes();

tests/Architecture/ControllersTest.php

<?php

declare(strict_types=1);

arch('controllers do not use DB facade')
    ->expect('App\Http')
    ->not->toUse('Illuminate\Support\Facades\DB');

arch('controllers do not use models directly')
    ->expect('App\Http\Web\Controllers')
    ->not->toUse('App\Models');

tests/Architecture/NamingTest.php

<?php

declare(strict_types=1);

arch('actions end with Action suffix')
    ->expect('App\Actions')
    ->toHaveSuffix('Action');

arch('data objects end with Data suffix')
    ->expect('App\Data')
    ->toHaveSuffix('Data')
    ->ignoring('App\Data\Data', 'App\Data\Concerns');

arch('exceptions end with Exception suffix')
    ->expect('App\Exceptions')
    ->toHaveSuffix('Exception')
    ->ignoring('App\Exceptions\Concerns');

tests/Architecture/ModelsTest.php

<?php

declare(strict_types=1);

arch('models use custom query builders')
    ->expect('App\Models')
    ->toHaveMethod('newEloquentBuilder');

arch('models do not use local scopes')
    ->expect('App\Models')
    ->not->toHaveMethod('scope*');

Static Analysis (PHPStan)

Installation

composer require phpstan/phpstan --dev
composer require phpstan/phpstan-strict-rules --dev
composer require larastan/larastan --dev

Configuration

phpstan.neon

includes:
    - vendor/larastan/larastan/extension.neon
    - vendor/phpstan/phpstan-strict-rules/rules.neon

parameters:
    level: 8
    paths:
        - app
        - tests
    excludePaths:
        - app/Providers/TelescopeServiceProvider.php
    checkMissingIterableValueType: true
    checkGenericClassInNonGenericObjectType: true
    reportUnmatchedIgnoredErrors: false

Run

./vendor/bin/phpstan analyse

Code Style (Laravel Pint)

Installation

composer require laravel/pint --dev

Configuration

pint.json

{
    "preset": "laravel",
    "rules": {
        "simplified_null_return": true,
        "no_unused_imports": true,
        "ordered_imports": {
            "sort_algorithm": "alpha"
        }
    }
}

Run

./vendor/bin/pint
./vendor/bin/pint --test  # Check only

Test Coverage

Enable Coverage (Pest)

phpunit.xml

<coverage>
    <report>
        <html outputDirectory="coverage"/>
        <text outputFile="php://stdout"/>
    </report>
</coverage>

Run with Coverage

./vendor/bin/pest --coverage
./vendor/bin/pest --coverage --min=80  # Enforce minimum

CI/CD Checks

GitHub Actions Example

.github/workflows/tests.yml

name: Tests

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: 8.4
          extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
          coverage: xdebug

      - name: Install Dependencies
        run: composer install --prefer-dist --no-interaction

      - name: Code Style
        run: ./vendor/bin/pint --test

      - name: Static Analysis
        run: ./vendor/bin/phpstan analyse

      - name: Run Tests
        run: ./vendor/bin/pest --coverage --min=80

Pre-commit Hooks

Installation

composer require brainmaestro/composer-git-hooks --dev

Configuration

composer.json

{
    "extra": {
        "hooks": {
            "pre-commit": [
                "./vendor/bin/pint",
                "./vendor/bin/phpstan analyse",
                "./vendor/bin/pest"
            ]
        }
    },
    "scripts": {
        "post-install-cmd": "vendor/bin/cghooks add --ignore-lock",
        "post-update-cmd": "vendor/bin/cghooks update"
    }
}

Quality Metrics

What to Track

  • Test coverage - Aim for 80%+
  • PHPStan level - Level 8 (max)
  • Architecture test pass rate - 100%
  • Code style violations - 0

Regular Reviews

  • Weekly - Check test coverage trends
  • Per PR - Run all quality checks
  • Monthly - Review architecture compliance
  • Release - Full quality audit

Common Issues to Watch

Anti-patterns

  • Domain logic in controllers
  • Using scopes instead of builders
  • Missing strict types declaration
  • Passing primitives instead of DTOs
  • Jobs/Listeners with domain logic

Type Safety

  • Missing return types
  • Missing parameter types
  • Missing property types
  • Untyped arrays/collections

Testing

  • Missing feature tests for endpoints
  • Missing unit tests for actions
  • Low coverage on critical paths
  • Brittle tests (too many mocks)

Enforcement Strategy

  1. Architecture tests - Automated checks
  2. PR reviews - Manual verification
  3. CI/CD gates - Block failing builds
  4. Team standards - Document + training
  5. Pair programming - Share knowledge

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

27.1%
按下载量换算259

Antigravity

21.49%
按下载量换算205

Codex

18.91%
按下载量换算181

windsurf

11.13%
按下载量换算106

OpenCode

7.69%
按下载量换算74

Cursor

2.99%
按下载量换算29

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills