一键导入
general
Project-wide Laravel conventions that always apply: configuration access, database patterns, logging, activity logging, and code formatting.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Project-wide Laravel conventions that always apply: configuration access, database patterns, logging, activity logging, and code formatting.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Readonly data containers with typed factory methods (`fromArray`, `fromModel`, `fromCollection`, `fromRequest`) used to pass structured data between application layers — especially for external API responses, Eloquent models, and service boundaries. Use this skill whenever creating, reviewing, or refactoring DTOs, Data Transfer Objects, value objects for inter-layer communication, or mapping payloads from APIs, models, or collections into typed PHP objects. Also trigger when the user mentions spatie/laravel-data alternatives, data mapping, or payload normalization in a Laravel context.
Eloquent model conventions for mass assignment, casts, relationship naming, activity logging, and mandatory model tests (CRUD + relations).
Single-purpose business logic classes that encapsulate one well-defined business operation. Actions are the primary location for business logic in Laravel applications, invoked from controllers, commands, or jobs.
Albatros accounting API integration via Saloon. Use when working with app/Services/Albatros/, AlbatrosConnector, or Albatros DTOs.
Laravel Blade template conventions covering components, output escaping, security, structure, and formatting.
Artisan console command classes that serve as the CLI entry point for operations. Commands validate input and delegate all business logic to Actions or Services.
| name | general |
| description | Project-wide Laravel conventions that always apply: configuration access, database patterns, logging, activity logging, and code formatting. |
app/ and related tests.config/, and new keys can be added there.composer show spatie/laravel-activitylog).config/activitylog.php exists when configuring model activity behavior.vendor/bin/pint).config(), not env() in runtime app code.config/*.php first.DB::transaction().LogsActivity on business models that need audit trails (e.g., invoice status changes, payout approvals, role/permission changes).getActivitylogOptions() with logAll(), logOnlyDirty(), and dontSubmitEmptyLogs(): log tracked attributes, only when values changed, and skip no-op writes.activity()->performedOn($model)->log(...) entries for key workflow events.vendor/bin/pint before commit.// Configuration: always use config().
$secret = config('services.stripe.secret');
// Bad: env('STRIPE_SECRET')
// Add env-backed value in config/services.php, then consume through config().
'stripe' => [
'secret' => env('STRIPE_SECRET'),
];
// Structured logging.
Log::info('Invoice created.', [
'invoice_id' => $invoice->id,
'order_id' => $order->id,
'amount' => $invoice->amount,
]);
// Multi-step writes must be transactional.
$payment = DB::transaction(function () use ($order) {
$invoice = $this->createInvoice->execute($order);
return $this->chargePaymentMethod->execute($order, $invoice);
});
// Anti-pattern: partial write risk without transaction.
$invoice = $this->createInvoice->execute($order);
$this->chargePaymentMethod->execute($order, $invoice); // throws
// Invariant breaks: accounting now has an invoice record without matching payment state.
env() calls outside config files.DB::transaction().vendor/bin/pint ran successfully.env('KEY') in application code outside config files.LogsActivity to models with no business audit value.resources/boost/skills/migrations/SKILL.md (schema-specific conventions)