laravelcode-review-requests
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "laravelcode-review-requests":https://skillpi.com/zh/skills/deepskill-32efaaa9ceb125f3b55eed20ec80185d4654415c001cd99f16286e40f164029d。安装前核对上游来源和版本:https://github.com/jpcaparas/superpowers-laravel。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
请求有效的代码审查:明确审查关注点,提供必要上下文,征求架构反馈,并参考 Laravel 的约定以便评审者聚焦重点。
介绍来源: third_party · jpcaparas · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: laravel:code-review-requests
description: Request effective code reviews—specify focus areas, provide context, ask for architectural feedback, reference Laravel conventionsCode Review Requests
Focused review requests get actionable feedback. Vague requests get generic advice.
Specify Focus Areas
Vague
"Review this code"
Focused
"Review OrderService for security and performance:
Focus on:
- Authorization checks (are we verifying user owns the order?)
- SQL injection risks (any raw queries?)
- N+1 query problems (eager loading correct?)
- Transaction handling (atomic operations?)
- Error handling (graceful failures?)
Code:
class OrderService
{
public function createOrder(User $user, array $items): Order
{
$order = Order::create(['user_id' => $user->id]);
foreach ($items as $item) {
OrderItem::create([
'order_id' => $order->id,
'product_id' => $item['product_id'],
'quantity' => $item['quantity'],
]);
}
return $order;
}
}
```"
**Why it works:** Clear focus areas guide the review toward specific concerns.
## Provide Context
### Insufficient Context
"Is this controller okay?"
### Sufficient Context
"Review ProductController for our API:
**Context:**
- Public API used by mobile app and web frontend
- Handles 10k requests/day, needs to scale to 100k
- Products have categories (belongsTo) and reviews (hasMany)
- Using Laravel 13.x with Sanctum authentication
- Following repository pattern (ProductRepository exists)
**Concerns:**
- Is the response format consistent with our other API endpoints?
- Are we handling errors appropriately?
- Should we add rate limiting?
**Code:**
```php
class ProductController extends Controller
{
public function index(Request $request)
{
$products = Product::with('category')
->paginate(20);
return ProductResource::collection($products);
}
}
```"
**Why it works:** Context about usage, scale, patterns, and specific concerns.
## Architectural Feedback
### Unclear
"Is the architecture good?"
### Clear
"Review the architecture of our payment processing:
**Current design:**
PaymentController → PaymentService → StripeGateway (direct Stripe API calls) → PaymentRepository (database)
**Concerns:**
1. PaymentService is tightly coupled to Stripe. What if we add PayPal?
2. No retry logic for failed payments
3. Webhook handling is in a separate controller, feels disconnected
4. No audit trail of payment attempts
**Questions:**
- Should we use a PaymentGatewayInterface for multiple providers?
- Where should retry logic live? Service or job?
- How to structure webhook handling?
- Best way to add audit logging?
**Current code:** [attach PaymentService.php]"
**Why it works:** Explains current design, identifies concerns, asks specific questions.
## Laravel-Specific Review
### Generic
"Check if this follows best practices"
### Laravel-Specific
"Review for Laravel conventions and best practices:
**Code:**
```php
class UserController extends Controller
{
public function store(Request $request)
{
$validated = $request->validate([
'email' => 'required|email|unique:users',
'password' => 'required|min:8',
]);
$user = new User();
$user->email = $validated['email'];
$user->password = Hash::make($validated['password']);
$user->save();
return response()->json($user, 201);
}
}
Check for:
- Should validation be in a Form Request?
- Is mass assignment safer than manual assignment?
- Should we use a Resource for the response?
- Is password hashing handled correctly?
- Should user creation be in a service/action?
- Any missing authorization checks?
- Following Laravel 13.x conventions?"
Why it works: Asks about specific Laravel patterns and conventions.
Specify Experience Level
Unclear Depth
"Review my code"
Clear Depth
"Review this authentication implementation:
My experience: Junior developer, 6 months with Laravel
What I need:
- Explain any security issues in detail (I'm still learning auth best practices)
- Point out Laravel conventions I'm missing
- Suggest improvements with examples
- If something is wrong, explain why and show the correct approach
Code:
public function login(Request $request)
{
$user = User::where('email', $request->email)->first();
if ($user && Hash::check($request->password, $user->password)) {
$token = $user->createToken('auth')->plainTextToken;
return response()->json(['token' => $token]);
}
return response()->json(['error' => 'Invalid credentials'], 401);
}
Questions:
- Is this secure enough for production?
- What am I missing?
- How would a senior developer write this?"
Why it works: Sets expectations for depth and style of feedback.
Review Request Templates
Template: Security Review
**Focus:** Security vulnerabilities and best practices
**Code:** [attach code]
**Context:** [authentication method, data sensitivity, user roles]
**Specific concerns:**
- [ ] SQL injection risks
- [ ] XSS vulnerabilities
- [ ] Authorization checks
- [ ] Data validation
- [ ] Sensitive data exposure
Template: Performance Review
**Focus:** Performance and scalability
**Code:** [attach code]
**Current metrics:** [response times, query counts]
**Expected load:** [requests/day, concurrent users]
**Specific concerns:**
- [ ] N+1 queries
- [ ] Missing indexes
- [ ] Inefficient algorithms
- [ ] Caching opportunities
- [ ] Memory usage
Template: Architecture Review
**Focus:** Design patterns and maintainability
**Code:** [attach code]
**Current architecture:** [describe structure]
**Team size:** [number of developers]
**Specific concerns:**
- [ ] Separation of concerns
- [ ] Testability
- [ ] Coupling between components
- [ ] Code duplication
- [ ] Complexity
Template: Laravel Conventions
**Focus:** Laravel best practices and conventions
**Code:** [attach code]
**Laravel version:** [e.g., 12.x or 13.x]
**Specific concerns:**
- [ ] Following framework conventions
- [ ] Using appropriate Laravel features
- [ ] Eloquent relationships correct
- [ ] Validation approach
- [ ] Resource/response formatting
Quick Reference
Request effective reviews:
- Specify focus - Security, performance, architecture, conventions
- Provide context - Purpose, scale, patterns, constraints
- Ask specific questions - Don't just ask "is this good?"
- Reference Laravel - Ask about framework-specific patterns
- Set depth - Junior needs explanations, senior needs quick feedback
Focused requests = actionable feedback.
版本历史
-
v0.1.5
GitHub ↗
原版更新说明
# Laravel Superpowers — Release Notes ## v0.1.5 (2025-11-11) Added five new best practice skills based on recommendations from https://saasykit.com/blog/laravel-best-practices to provide comprehensive coverage of Laravel development patterns. ### Added (Skills) - **Routes Best Practices** (`routes-best-practices`) - Keep routes clean and focused on mapping requests to controllers, avoiding business logic in route files - **Data Chunking for Large Datasets** (`data-chunking-large-datasets`) - Handle large datasets efficiently with `chunk()`, `chunkById()`, `lazy()`, and `cursor()` methods - **Internationalization and Translation** (`internationalization-and-translation`) - Build with i18n in mind from day one using Laravel's translation helpers - **Constants and Configuration** (`constants-and-configuration`) - Replace hardcoded values with constants, enums, and configuration for better maintainability - **Documentation Best Practices** (`documentation-best-practices`) - Write meaningful documentation that explains "why" not "what", focusing on complex business logic ### Notes These additions complement the existing comprehensive skill set by filling gaps identified from the SaaSykit Laravel best practices guide. All new skills include extensive examples, anti-patterns, and real-world use cases.
-
v0.1.4
GitHub ↗
原版更新说明
# Laravel Superpowers — Release Notes ## v0.1.4 (2025-11-04) Monorepo-aware SessionStart with multi-app detection, per-app version reporting, and scoped Sail guidance. ### Monorepo Support - Recursively discovers Laravel apps by locating `artisan` anywhere in the repo (ignores heavy/irrelevant folders like `vendor/`, `node_modules/`, `storage/`, VCS/IDE folders). - Supports multiple Laravel apps in a single repository. The hook lists all detected apps with: - Relative path - Laravel version (from `composer.lock` via `jq` when available, with fallback to `composer.json` constraint or a portable parser) - Sail availability, and whether containers appear to be running - Determines the “active” app based on the current working directory; if only one app exists, it becomes active automatically. - Emits Sail guidance and interactive safety for the active app only, to avoid cross-app confusion. ### Testing - Extended `scripts/test_session_start.sh` to cover: - Non-Laravel repo bailout - Single app (no Sail) - Sail present but containers stopped (interactive safety messaging) - Sail present with containers running - Monorepo with two nested apps on different Laravel versions - Monorepo where hook runs inside a nested app (active app semantics) - CI workflow `.github/workflows/test-session-start.yml` continues to run this script; no changes required beyond the added scenarios. ### Notes - If `jq` is unavailable, the hook falls back to a portable parser for version detection; output may show version constraints or `unknown` in minimal setups.
-
v0.1.3
GitHub ↗
原版更新说明
# Laravel Superpowers — Release Notes ## v0.1.2 (2025-11-04) Docs sweep across Laravel 11.x and 12.x, with new skills matching the intersection of stable patterns. Also consolidated duplicates and kept commands thin. ### Added (Skills) - Form Requests & Validation (`laravel:form-requests`) - Policies & Authorization (`laravel:policies-and-authorization`) - Eloquent Relationships & Loading (`laravel:eloquent-relationships`) - Transactions & Consistency (`laravel:transactions-and-consistency`) - HTTP Client Resilience (`laravel:http-client-resilience`) - Task Scheduling (`laravel:task-scheduling`) - API Resources & Pagination (`laravel:api-resources-and-pagination`) - Blade Components & Layouts (`laravel:blade-components-and-layouts`) - Filesystem Uploads & URLs (`laravel:filesystem-uploads`) - Rate Limiting & Throttle (`laravel:rate-limiting`) - Exception Handling & Logging (`laravel:exception-handling-and-logging`) Matching command wrappers were added under `commands/` using the existing convention. ### Changed - Unified caching guidance into `laravel:performance-caching` (added tags, locks, invalidation best‑practices). Removed the duplicate cache strategies skill/command. - De‑duplicated Eloquent guidance: relationships skill now references `laravel:performance-eager-loading` for N+1 detection/measurement. ### Removed - Subagents that duplicated skills (Form Request Builder, Policy Planner, Transaction Auditor, API Resource Designer). The repo keeps subagents minimal; the controller cleaner remains. - Redundant Sail prompt skill (covered by runner selection and integration docs). ### Docs - Summary of 11.x/12.x intersection captured within the new skills themselves.
-
v0.1.2
GitHub ↗
原版更新说明
# Laravel Superpowers — Release Notes ## v0.1.1 (2025-11-04) Smarter Laravel detection, Sail via binary presence, and safer command guidance. ### Detection & Safety - SessionStart now bails out cleanly for non‑Laravel repos (no output), ensuring the plugin does NOT activate outside Laravel projects. - Sail is detected by executable presence only: `vendor/bin/sail` (or a top‑level `./sail` helper). We no longer parse `composer.json` or rely on `jq` for Sail checks. - Determines whether containers are running via `docker compose ps` / `docker-compose ps` (unchanged). - Injects guidance to prefer Sail commands when Sail is available; clearly maps Sail vs host command pairs (artisan/composer/php/node/db). - Interactive safety: when Sail is available but containers are not running, the assistant must ask whether to start containers (`sail up -d`) or proceed using host tools—no host PHP/Composer/DB/Node commands should run until the user chooses. ### Docs & Screenshots - README now includes screenshots of SessionStart with and without Sail. ### Docs & Skills Cleanup - Replaced hardcoded Sail-only lines with Sail/non‑Sail pairs: - `skills/migrations-and-factories/SKILL.md` - `skills/queues-and-horizon/SKILL.md` - `skills/daily-workflow/SKILL.md` - `skills/quality-checks/SKILL.md` - Ensured quality/static analysis and frontend checks include host equivalents. ### New Skill - [Removed] Previously documented interactive Sail prompt skill. Interactive safety is still enforced by the assistant when Sail is declared but containers are not running. ### Reference - Common Sail commands supported: `sail up|stop|restart|ps`, `sail artisan …`, `sail php …`, `sail composer …`, `sail node|npm|npx|pnpm|pnpx|yarn|bun|bunx …`, `sail mysql|mariadb|psql|mongodb|redis|valkey`, `sail test|phpunit|pest|pint|dusk`.
-
v0.1.0
GitHub ↗
原版更新说明
## v0.1.0 (2025-11-03) First public release of Laravel Superpowers — a Laravel‑focused skills library for Claude Code. It brings proven workflows (TDD, debugging, planning) together with Laravel‑aware guidance that stays platform‑agnostic (works with or without Sail). ### Highlights - Plugin identity and marketplace metadata for the Laravel fork - Renamed plugin to `superpowers-laravel` and pointed metadata to `jpcaparas/superpowers-laravel` - Added local marketplace entry to simplify install during development - Laravel‑aware SessionStart - Startup hook auto‑detects Laravel projects (via `artisan` or `composer.json` with `laravel/framework`) - Injects a concise “Using Superpowers in Laravel Projects” introduction when Laravel is detected - New Laravel skills (all Sail/non‑Sail compatible) - Onboarding & Runner (using‑laravel‑superpowers, runner‑selection) - Development & Testing (tdd‑with‑pest, migrations‑and‑factories) - Quality & Operations (quality‑checks, queues‑and‑horizon) - Architecture & Complexity (ports‑and‑adapters, template‑method‑and‑plugins, complexity‑guardrails) - Optional skills (scaffolding for growing teams) - Nova resource patterns; Horizon dashboards/metrics; E2E Playwright patterns - API surface evolution; Config/Env storage strategy - Key commands (plugin‑namespaced) - `/superpowers-laravel:brainstorm`, `/superpowers-laravel:write-plan`, `/superpowers-laravel:execute-plan` - `/superpowers-laravel:laravel-check`, `/superpowers-laravel:laravel-tdd` - Documentation - Updated README for Laravel‑first usage (now includes repo logo) - Added Related Tools note for Laravel Boost (complementary if installed) - New integration guide: `docs/laravel/INTEGRATION.md` - New installation notes (version‑agnostic): `docs/laravel/INSTALLATION-NOTES.md` ### Files - Hook: `hooks/session-start.sh` (Laravel detection + onboarding) - Skills live under `skills/`; commands under `commands/` - Docs: `docs/laravel/INTEGRATION.md`, `docs/laravel/INSTALLATION-NOTES.md` ### New skills inspired by Clean Coders Guide - Controller cleanup; performance (eager loading, select columns, caching); dependency trimming - Helpers; interfaces + DI; strategy; controller testing ### Commands - Examples provided for core flows and a few advanced skills; run `/help` to see everything available in your environment. ### Maintenance - Moved Laravel skills from `skills/laravel/**` to first‑party `skills/**` - Removed empty directories after consolidation - Cleaned references in README and docs to reflect new locations and command namespace - Added CI validation for skills structure and plugin conventions: `.github/workflows/validate-skills.yml` ### Notes - All skills intentionally include Sail/non‑Sail command pairs to avoid platform lock‑in. - Insights is treated as optional; Pint and static analysis (PHPStan/Psalm) are encouraged as baselines.
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供完整的 Laravel 代码审查请求方法论,涵盖安全、性能、架构等多个维度
- 附带具体审查模板和正反示例,实用性强
待提升项
-
description写错位置 原报告严重程度:轻微
顶层 description 字段为空,实质描述内容位于 skill_body 内部
改进建议:建议将核心描述移至顶层 description 字段,保持规范统一
亮点
- 触发词覆盖合理,明确指向 Laravel 代码审查场景
待提升项
-
缺少When to Use章节 原报告严重程度:轻微
文档未显式标注 When to Use 章节,使用场景说明隐含在正文中
改进建议:建议增加显式的 When to Use 章节以提升可读性
亮点
- 结构清晰,分场景阐述并提供具体模板
- 每个部分均配有正反示例和解释说明
亮点
- 内容为最佳实践总结,逻辑自洽,无执行风险
- 提供可复用的审查模板,可靠性高
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
-
账号、密钥或授权
使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。
主文档提及 · 第 183 行
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。