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.
npx skills add shennawardana23/skillme --skill laravel-patternsgit clone --depth 1 https://github.com/shennawardana23/skillmeWrote 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.
[](https://agentmods.dev/skills/shennawardana23/skillme/laravel-patterns)<a href="https://agentmods.dev/skills/shennawardana23/skillme/laravel-patterns"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/laravel-patterns/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.
<a href="https://agentmods.dev/skills/shennawardana23/skillme/laravel-patterns"><img src="https://agentmods.dev/badge/skills/shennawardana23/skillme/laravel-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00060 | $0.00959 |
| Opus 5 | $0.00030 | $0.00479 |
| Sonnet 5 | $0.00012 | $0.00192 |
| Haiku 4.5 | $0.00006 | $0.00096 |
Grade A, and why
laravel-patterns 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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Laravel Patterns
Keep controllers thin — orchestration lives in services, single-purpose logic lives in actions. Eloquent's convenience is also its biggest footgun: mass assignment and N+1 queries both look correct until they hit real data volume or an untrusted request body.
Layering
app/Http/Controllers/ → routing + response shape only
app/Http/Requests/ → validation (FormRequest classes)
app/Actions/ → single-purpose use cases
app/Services/ → coordinating domain logic across multiple actions/models
app/Models/ → Eloquent models, casts, scopes, relationships
final class CreateReservationAction
{
public function __construct(private ReservationRepository $reservations) {}
public function handle(CreateReservationData $data): Reservation
{
return $this->reservations->create($data);
}
}
final class ReservationsController extends Controller
{
public function __construct(private CreateReservationAction $createReservation) {}
public function store(StoreReservationRequest $request): JsonResponse
{
$reservation = $this->createReservation->handle($request->toDto());
return response()->json(['data' => ReservationResource::make($reservation)], 201);
}
}
Gotchas
- Mass assignment is opt-in trust, not automatic safety.
$fillableonly allowlists the fields Eloquent will accept fromcreate()/update()arrays — a model with$guarded = [](guard nothing) accepts every field in the incoming array, including ones likeis_adminorhotel_idthat a request body should never be allowed to set directly. Always define$fillableexplicitly for any model that accepts request-derived data; never set$guarded = []on such a model. - N+1 queries hide in plain view.
Reservation::all()followed by$reservation->guest->nameinside a loop issues one query per reservation. Use->with(['guest'])(eager loading) whenever a relationship is accessed inside a loop over a collection — this is the single most common Eloquent performance defect, and it's invisible in a dev database with 10 rows. - Route-model binding without
scopeBindings()allows cross-tenant access on nested routes:/accounts/{account}/projects/{project}without scoped bindings will resolve{project}globally, letting a request supply aprojectID belonging to a differentaccountthan the one in the URL. UseRoute::scopeBindings()on any nested resource route. - Queued job handlers must be idempotent — Laravel's queue driver can redeliver a job (worker crash mid-job, a retry after a transient failure), so a handler that isn't safe to run twice (e.g., "increment a counter" instead of "set to this value") will double-apply on redelivery.
What ships with it
2 files 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.
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.
- 7d ago First seen · 96 lines · 60 tokens per session scan A 2641b6d6596b
laravel-patterns is a skill published in the GitHub repository shennawardana23/skillme (2 stars, last pushed 13d ago), licensed Apache-2.0. It adds 60 tokens to every session and 959 once invoked, about $0.0003 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-09-03.
Other skills, from other repositories
php-pro
A set of practices for building PHP applications with modern PHP, Laravel, or Symfony. PHP is a programming language commonly used for server-side web applications.
mvc-expert
Expert guidelines to refactor legacy PHP codebases into clean, modern, and scalable MVC-structured projects / Pedoman ahli untuk merefaktor codebase PHP lama menjadi proyek terstruktur MVC yang bersih, modern, dan skalabel.
bd-better-route-bridge
Compose better-data DTOs with the better-route library — use BetterRouteBridge::{get, post, put, patch, delete} to register a REST route that hydrates the request into a DTO, validates, calls the handler with (DataObject, mixed $request), and presents returned DataObject values through Presenter with…
bd-data-object
Add or modify DataObject subclasses inside the better-data library — the immutable, attribute-decorated DTOs the whole library is built around. Every DTO is final readonly class extends DataObject with constructor-promoted typed parameters; sources hydrate via ::fromArray, sinks project via SinkProjection, the…
wp-plugin-bootstrap
Scaffolds and reviews the main entry-point PHP file of a WordPress plugin — header (with Requires Plugins for WP 6.5+), ABSPATH guard, file/path/url/version constants, Composer PSR-4 autoload with src/ as the default class root, optional scoped fallback for release ZIP safety, PascalCase class filenames that match…
bd-hydration-coercion
Modify how raw values become typed property values in better-data — work in TypeCoercer (primitives + DateTime + Enum + Secret) or DataObject::coerceParameter (attribute-aware — ListOf, Encrypted, etc.). Critical layering — TypeCoercer is pure, must stay callable from a no-WordPress unit test, no side effects, no…