php-laravel

php-laravel is a skill for Claude Code, Codex from iliaal/whetstone. It costs 74 tokens per session (999 once invoked), scanned A, original, MIT.

A set of coding rules and patterns for PHP 8.2 and Laravel, a PHP web framework. It covers Laravel components such as database models, queues, templates, migrations, and Pest tests.

In plain words
What is it for?
Use it when building Laravel applications, editing database queries or migrations, adding background jobs, or writing Pest tests.
Why use it?
It gives an agent consistent conventions for writing and changing Laravel code. It also helps avoid common structure, typing, validation, and testing mistakes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when building Laravel applications, editing database queries or migrations, adding background jobs, or writing Pest tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/iliaal/whetstone/php-laravel
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add iliaal/whetstone --skill php-laravel
Clone the repo
git clone --depth 1 https://github.com/iliaal/whetstone

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for php-laravel

README.md
[![agentmods](https://agentmods.dev/badge/skills/iliaal/whetstone/php-laravel/github.svg)](https://agentmods.dev/skills/iliaal/whetstone/php-laravel)
Your own site
<a href="https://agentmods.dev/skills/iliaal/whetstone/php-laravel"><img src="https://agentmods.dev/badge/skills/iliaal/whetstone/php-laravel/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for php-laravel

Your own site · 80×15
<a href="https://agentmods.dev/skills/iliaal/whetstone/php-laravel"><img src="https://agentmods.dev/badge/skills/iliaal/whetstone/php-laravel.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 999 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00074 $0.00999
Opus 5 $0.00037 $0.00500
Sonnet 5 $0.00015 $0.00200
Haiku 4.5 $0.00007 $0.00100

Measured 9d ago against content hash ceceb34a96b0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

php-laravel scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

distillery/generated-skills/php-laravel/SKILL.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PHP & Laravel Development

Code Style

  • declare(strict_types=1) in every file
  • Happy path last — handle errors/guards first, success at the end. Use early returns; avoid else.
  • Comments only explain why, never what. Never comment tests. If code needs a "what" comment, rename or restructure instead.
  • No single-letter variables — $exception not $e, $request not $r
  • ?string not string|null. Always specify void. Import classnames everywhere, never inline FQN.
  • Validation uses array notation ['required', 'email'] for easier custom rule classes

Modern PHP (8.2+)

Use these when applicable — do not explain them in comments (Claude and developers know them):

  • Readonly classes and properties for immutable data
  • Enums with methods and interfaces for domain constants
  • Match expressions over switch
  • Constructor promotion with readonly
  • First-class callable syntax $fn = $obj->method(...)
  • Fibers for cooperative async when Swoole/ReactPHP not available
  • DNF types (Stringable&Countable)|null for complex constraints

Laravel Architecture

  • Fat models, thin controllers — controllers only: validate, call service/action, return response
  • Service classes for business logic with readonly DI: __construct(private readonly PaymentService $payments)
  • Action classes (single-purpose invokable) for operations that cross service boundaries
  • Form Requests for all validation — never validate inline in controllers
  • Events + Listeners for side effects (notifications, logging, cache invalidation). Do not put side effects in services.
  • Feature folder organization over type-based when project exceeds ~20 models

Eloquent

  • Model::preventLazyLoading(!app()->isProduction()) — catch N+1 during development
  • Select only needed columns: Post::with(['user:id,name'])->select(['id', 'title', 'user_id'])
  • Bulk operations at database level: Post::where('status', 'draft')->update([...]) — do not load into memory to update
  • increment()/decrement() for counters in a single query
  • Composite indexes for common query combinations
  • Chunking for large datasets (chunk(1000)), lazy collections for memory-constrained processing
  • $guarded = [] is a mass assignment vulnerability — always use explicit $fillable

Read the full file on GitHub · 88 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 88 lines · 74 tokens per session scan A ceceb34a96b0

Subscribe to this mod's changes

php-laravel is a skill published in the GitHub repository iliaal/whetstone (33 stars, last pushed today), licensed MIT. It adds 74 tokens to every session and 999 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

craftcms

Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…

michtio/craftcms-claude-skills · 327 tokens

php-http-psr

Use when building framework-agnostic PHP HTTP code — PSR-7/15/17/18 messages, middleware, factories, clients. Do NOT use for Laravel HTTP or Symfony HttpFoundation (not PSR-7).

fusengine/agents · 52 tokens

laravel-ops

Laravel framework patterns, Eloquent ORM, authentication, queues, and testing. Use for: laravel, eloquent, artisan, blade, php, sanctum, livewire, inertia, pest, phpunit, forge, vapor, queue, middleware, migration, factory, seeder.

0xDarkMatter/claude-mods · 63 tokens

php-ecosystem-reference

Use when picking a non-Laravel PHP tool — Symfony components, API Platform, or Slim — and routing to implementation. Do NOT use for Laravel (laravel-expert).

fusengine/agents · 42 tokens

php-laravel

Modern PHP 8.4 and Laravel patterns: architecture, Eloquent, migrations, queues, testing. Use when working with Laravel, Eloquent, Blade, artisan, or building/testing a framework-based PHP app. Not for php-src internals, standalone PHP libraries, or general PHP language discussion.

iliaal/ai-skills · 65 tokens

craftcms-ops

Craft CMS 5 development - content modeling, Twig templating, element queries, GraphQL, plugins, and the Craft 4-to-5 Matrix-as-entries change. Use for: craft cms, craftcms, craft 5, twig, pixel & tonic, matrix field, entry types, sections, element query, eager loading, blitz, project config, headless craft, craft…

0xDarkMatter/claude-mods · 96 tokens