v1.0.0
First release. Five Laravel engineering skills for AI coding agents — 193 rules that decide where a class goes, what a query may do, where an authorization check lives, and what a queued handler must survive.
Built for Laravel ^12.0 || ^13.0 on PHP ^8.3. Laravel 13-only APIs are marked inline, so the rules degrade safely on 12.
Install
npx skills add Foysal50x/skills/plugin marketplace add Foysal50x/skills
/plugin install laravel-skill@foysal50x
skills.sh and manual installs name the skills laravel-patterns, laravel-eloquent, laravel-rest-api, laravel-async, laravel-testing. The Claude Code plugin prefixes them with laravel-skill:.
What is in it
| Skill | Rules | Covers |
|---|---|---|
laravel-patterns |
60 | The Decision Gate — Action, Service, Repository, Query Class, Value Object, and when to just use Eloquent. Domain layout and inter-domain communication. |
laravel-eloquent |
45 | N+1 elimination, subquery selects and sorting, pagination strategy, transactions, casts and scopes, migrations, raw SQL placement, bulk writes. |
laravel-rest-api |
35 | Authorization, Form Requests and DTOs, scoped route model binding, API Resources, exception-to-status mapping, thin controllers, and outbound HTTP. |
laravel-async |
33 | Idempotent jobs, retries and backoff, queue operations, domain events, cache keys and invalidation, scheduling. |
laravel-testing |
20 | Which test style fits each layer, hand-written fakes over mocks, real-database query tests, feature tests. |
The through-line: practicality over purity. The default answer is to keep the logic in the Action and call Eloquent directly. A Repository, a Service or a Query Class has to name the trigger that earned it.
Built for how agents actually read
SKILL.mdis the whole index — 1.3k to 2.6k tokens, loaded when the skill triggers. It carries aPick the Ruletable routing from what you are about to write to the two or three rules that answer it, plus the non-negotiables and an anti-hallucination contract.- Every rule is one file under 2500 characters — a statement, the failure it prevents, one incorrect example and one correct one. Read one or two per task, not the whole set.
AGENTS.mdper skill is the same rules compiled into one document, for agents that follow the AGENTS.md convention.- Every framework API named in a rule was checked against the Laravel docs before it was written.
Tooling
npm run build # rules/*.md -> AGENTS.md
npm run validate # frontmatter, sections, cross-references, size budget, YAML strictness
npm run check # bothCI fails on a stale AGENTS.md, a rule over budget, a cross-reference to a rule that does not exist, or frontmatter a strict YAML parser would reject.