Token导航 LogoToken导航

Agent Skill · 前端设计

moai-lang-php(moai lang PHP 命令行)

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

moai-lang-php 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 9,918。

总安装 190周安装 8GitHub Stars 61下载 67核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/modu-ai/cc-plugins --skill moai-lang-php

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中整理仓库状态和代码变更。可结合来源仓库和原始 README 核验具体用法。安装前建议确认权限范围和维护状态,避免触发联网或文件读写。

moai-lang-php 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/moai-lang-php

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/modu-ai/cc-plugins --skill moai-lang-php;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

moai-lang-php 怎么安装?

在终端执行 npx skills add https://github.com/modu-ai/cc-plugins --skill moai-lang-php。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

moai-lang-php 支持哪些 AI 工具?

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

moai-lang-php 需要什么权限?

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

moai-lang-php 是免费的吗?

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

moai-lang-php 用的人多吗?

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

moai-lang-php 安全吗?

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

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

值得选的地方

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

先想清楚的地方

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

适不适合你

更适合

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

不太适合

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

前端设计类 Skill 对比

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

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
moai-lang-php

moai lang PHP 命令行 · 本页

19061需要联网MIT通过

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

SKILL.md 原文

Quick Reference (30 seconds)

PHP 8.3+ Development Specialist - Laravel 11, Symfony 7, Eloquent, Doctrine, and modern PHP patterns.

Auto-Triggers: PHP files with.php extension, composer.json, artisan command, symfony.yaml, Laravel or Symfony discussions

Core Capabilities:

  • PHP 8.3 Features: readonly classes, typed properties, attributes, enums, named arguments
  • Laravel 11: Controllers, Models, Migrations, Form Requests, API Resources, Eloquent
  • Symfony 7: Attribute-based routing, Doctrine ORM, Services, Dependency Injection
  • ORMs: Eloquent for Laravel, Doctrine for Symfony
  • Testing: PHPUnit, Pest, feature and unit testing patterns
  • Package Management: Composer with autoloading
  • Coding Standards: PSR-12, Laravel Pint, PHP CS Fixer
  • Docker: PHP-FPM, nginx, multi-stage builds

Quick Patterns

Laravel Controller Pattern:

In the App\Http\Controllers\Api namespace, create a UserController extending Controller. Import StoreUserRequest, UserResource, User, and JsonResponse. Define a store method accepting StoreUserRequest that creates a User using validated data and returns a JsonResponse with UserResource wrapping the user and status 201.

Laravel Form Request Pattern:

In the App\Http\Requests namespace, create a StoreUserRequest extending FormRequest. The authorize method returns true. The rules method returns an array with name requiring required, string, and max 255 validation, email requiring required, email, and unique on users table, and password requiring required, min 8, and confirmed validation.

Symfony Controller Pattern:

In the App\Controller namespace, create a UserController extending AbstractController. Import User, EntityManagerInterface, JsonResponse, and Route attribute. Apply Route attribute at class level for api/users path. Create a create method with Route attribute for empty path and POST method. Inject EntityManagerInterface, create new User, persist and flush, then return json response with user and status 201.


Implementation Guide (5 minutes)

PHP 8.3 Modern Features

Readonly Classes:

Declare a readonly class UserDTO with a constructor promoting public properties for int id, string name, and string email.

Enums with Methods:

Create an OrderStatus enum backed by string. Define cases Pending with pending value, Processing with processing value, and Completed with completed value. Add a label method that uses match expression on $this to return appropriate display labels for each case.

Attributes:

Create a Validate attribute class targeting properties with Attribute attribute. The constructor accepts a string rule and optional string message. Create a UserRequest class with email property decorated with Validate attribute specifying required and email rules.

Laravel 11 Patterns

Eloquent Model with Relationships:

In the App\Models namespace, create a Post model extending Model. Set protected fillable array with title, content, user_id, and status. Set protected casts array with status casting to PostStatus enum and published_at casting to datetime. Define a user method returning BelongsTo relationship. Define a comments method returning HasMany relationship. Add a scopePublished method that filters by published status.

API Resource Pattern:

In the App\Http\Resources namespace, create a PostResource extending JsonResource. The toArray method takes a Request parameter. Return an array with id, title, author using UserResource with whenLoaded for user relationship, comments_count using whenCounted, and created_at formatted as ISO 8601 string.

Migration Pattern:

Create an anonymous migration class extending Migration. The up method calls Schema create on posts table. Define id, foreignId for user_id with constrained and cascadeOnDelete, string for title, text for content, string for status defaulting to draft, timestamps, and softDeletes.

Service Layer Pattern:

In the App\Services namespace, create a UserService class. Define a create method accepting UserDTO. Use DB transaction wrapping User create with data from DTO properties, profile creation with default bio, and returning user with loaded profile relationship. Catch ActiveRecord\RecordInvalid exceptions to handle validation failures.

Symfony 7 Patterns

Entity with Doctrine Attributes:

In the App\Entity namespace, create a User class. Apply ORM\Entity attribute with repositoryClass pointing to UserRepository. Apply ORM\Table attribute with name users. Add private nullable int id with ORM\Id, ORM\GeneratedValue, and ORM\Column attributes. Add private nullable string name with ORM\Column length 255 and Assert\NotBlank. Add private nullable string email with ORM\Column length 180 unique and Assert\Email.

Service with Dependency Injection:

In the App\Service namespace, create a UserService class. The constructor accepts readonly EntityManagerInterface and readonly UserPasswordHasherInterface via property promotion. Define createUser method taking email and password strings. Create new User, set email, hash password using the password hasher, persist with entity manager, flush, and return user.

Testing Patterns

PHPUnit Feature Test for Laravel:

In Tests\Feature namespace, create UserApiTest extending TestCase with RefreshDatabase trait. The test_can_create_user method posts JSON to api/users with name, email, password, and password_confirmation. Assert status 201 and JSON structure with data containing id, name, and email. Assert database has users table with the email.

Pest Test for Laravel:

Use App\Models\User and Post. Create a test using it function for can create a post. Create user with factory. Call actingAs with user, post JSON to api/posts with title and content. Assert status 201 and expect Post count to be 1. Create second test for requires authentication that posts without authentication and asserts status 401.


Advanced Implementation (10+ minutes)

For comprehensive coverage including:

  • Production deployment patterns for Docker and Kubernetes
  • Advanced Eloquent patterns including observers, accessors, and mutators
  • Doctrine advanced mapping with embeddables and inheritance
  • Queue and job processing
  • Event-driven architecture
  • Caching strategies with Redis and Memcached
  • Security best practices following OWASP patterns
  • CI/CD integration patterns

See:

  • modules/advanced-patterns.md for complete advanced patterns guide

Context7 Library Mappings

  • laravel/framework for Laravel web framework
  • symfony/symfony for Symfony components and framework
  • doctrine/orm for Doctrine ORM for PHP
  • phpunit/phpunit for PHP testing framework
  • pestphp/pest for elegant PHP testing framework
  • laravel/sanctum for Laravel API authentication
  • laravel/horizon for Laravel queue dashboard

Works Well With

  • moai-domain-backend for REST API and microservices architecture
  • moai-domain-database for SQL patterns and ORM optimization
  • moai-workflow-testing for DDD and testing strategies
  • moai-platform-deploy for Docker and deployment patterns
  • moai-essentials-debug for AI-powered debugging
  • moai-foundation-quality for TRUST 5 quality principles

Troubleshooting

Common Issues:

PHP Version Check:

Run php with version flag to verify 8.3 or later. Use php with -m flag piped to grep for checking pdo, mbstring, and openssl extensions.

Composer Autoload Issues:

Run composer dump-autoload with -o flag for optimized autoloader. Run composer clear-cache to clear the package cache.

Laravel Cache Issues:

Run php artisan config:clear to clear configuration cache. Run php artisan cache:clear to clear application cache. Run php artisan route:clear to clear route cache. Run php artisan view:clear to clear compiled views.

Symfony Cache Issues:

Run php bin/console cache:clear to clear cache. Run php bin/console cache:warmup to warm up the cache.

Database Connection:

Use try-catch block around DB::connection()->getPdo() call. Output success message on connection or exception message on failure.

Migration Rollback:

Use php artisan migrate:rollback with step 1 to rollback last migration. Use php artisan migrate:fresh with seed flag for development reset only. For Symfony, use php bin/console doctrine:migrations:migrate prev to rollback.


Version: 1.1.0 | Updated: 2026-01-11 | Status: Active

平台分布

Claude Code

26.91%
按下载量换算18

OpenCode

22.16%
按下载量换算15

Codex

18.22%
按下载量换算12

Antigravity

13.1%
按下载量换算9

Gemini CLI

7.85%
按下载量换算5

windsurf

3.51%
按下载量换算2

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

继续浏览同类 Skills