laravel-conventions

laravel-conventions is a skill for Claude Code from wakqasahmed/skills. It costs 31 tokens per session (1,266 once invoked), scanned A, original, MIT.

A set of conventions for changing Laravel applications, a PHP web framework.

In plain words
What is it for?
Use it when adding or changing Laravel routes, controllers, models, validation, database migrations, or queued work.
Why use it?
It helps new routes, validation, database access, models, and background work fit the project and avoid common problems such as unsafe validation or repeated database queries.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the skills plugin — 26 skills shipped together

Good fit Use it when adding or changing Laravel routes, controllers, models, validation, database migrations, or queued work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wakqasahmed/skills/laravel-conventions
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 wakqasahmed/skills --skill laravel-conventions
Clone the repo
git clone --depth 1 https://github.com/wakqasahmed/skills

Made for: Claude Code.

Or install skills, the plugin that ships this one along with the rest of its 26 skills.

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 laravel-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/wakqasahmed/skills/laravel-conventions/github.svg)](https://agentmods.dev/skills/wakqasahmed/skills/laravel-conventions)
Your own site
<a href="https://agentmods.dev/skills/wakqasahmed/skills/laravel-conventions"><img src="https://agentmods.dev/badge/skills/wakqasahmed/skills/laravel-conventions/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 laravel-conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/wakqasahmed/skills/laravel-conventions"><img src="https://agentmods.dev/badge/skills/wakqasahmed/skills/laravel-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,266 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.
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.00031 $0.01266
Opus 5 $0.00015 $0.00633
Sonnet 5 $0.00006 $0.00253
Haiku 4.5 $0.00003 $0.00127

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

Security

Grade A, and why

laravel-conventions 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 12d 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.

skills/laravel/laravel-conventions/SKILL.md · 80 lines

How it starts

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

Laravel Conventions

Use this when writing or changing Laravel application code.

Defaults

  • Inspect existing routes, models, config, tests, and installed Laravel version before choosing a pattern; match established project conventions where they are sound.
  • Eloquent over raw SQL unless the query is too complex for the ORM.
  • Form Request classes for all validation; never inline validate in controllers.
  • config('key') instead of env('KEY') outside config files.
  • Queue jobs (ShouldQueue) for anything slow, external, or async.
  • Keep controllers thin; introduce service classes only when the project's existing structure or real complexity warrants them.
  • Use named routes and route helpers for application links and redirects.
  • Check the installed Laravel major version before applying framework structure or API guidance; Laravel 10, 11, and 12 are not interchangeable.

Models

  • Use explicit fillable or guarded declarations.
  • Define relationships, casts, and scopes on the model.
  • Avoid N+1 queries; eager load relationships in resources and controllers.
  • Use database transactions when modifying multiple related records.

Foreign Keys And Migrations

  • Match the foreign key column's type exactly to the referenced table's primary key type (foreignId for bigIncrements/id(), not a mismatched unsignedInteger).
  • Set an explicit onDelete/onUpdate policy (cascade, restrict, nullOnDelete) — don't leave it at the database default.
  • Index every foreign key column and any column used in a frequent WHERE/JOIN/ORDER BY; verify with php artisan schema:dump or by reviewing the migration diff against the referenced table before merge.
  • Idempotent job handling on retry is covered in Background Work above — apply it to anything a migration or FK change feeds into a queue.

Production Migration Safety

  • Take a database backup immediately before running any migration that drops a column/table, renames a column, or transforms data in place. A destructive migration with no preceding backup is not deployable — document the backup step in the PR or deploy runbook, not just in your head.
  • php artisan migrate refuses to run against an environment where app.env is production unless you pass --force. Treat that prompt as a guardrail, not friction to script around — never bake --force into a deploy step that isn't gated by its own review/approval (CI job, deploy script) that a human or protected pipeline controls.
  • For any migration with meaningful table-lock time (adding an index or column to a large table, an unbounded UPDATE inside a migration) or any downtime-sensitive change, put the app in maintenance mode first: php artisan down --secret=... before, php artisan up after. Prefer php artisan down --render="errors::503" (or a custom view) over a bare 503, and confirm the app supports zero-downtime alternatives (online DDL tools, additive-then-backfill-then-cleanup migrations) before assuming down is required.
  • MySQL DDL (ALTER TABLE, CREATE TABLE, DROP TABLE) is not transactional — unlike PostgreSQL, a failed statement partway through a multi-statement migration can leave the schema partially applied, and Laravel's migration wrapping transaction will not roll back the already-committed DDL. Keep migrations small and single-purpose (one schema change per migration) so a failure is easy to diagnose and the blast radius is one operation, not five.
  • Test the migration's down() locally (php artisan migrate:rollback) before merging, not just up(). Do not ship a migration you can't cleanly reverse; if a migration is genuinely irreversible (e.g. it drops a column with data that isn't recoverable from the backup taken above), leave down() throwing \RuntimeException with a one-line explanation instead of a silent no-op, so a future rollback attempt fails loud instead of pretending to succeed.
  • Never let a migration silently truncate or drop data as a side effect of a schema change (e.g. changing a column type in a way that MySQL will truncate on conversion) without an explicit backup step called out in the PR description or deploy checklist.

Read the full file on GitHub · 80 lines

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. 12d ago First seen · 80 lines · 31 tokens per session scan A 28056a10f1ec

Subscribe to this mod's changes

laravel-conventions is a skill published in the GitHub repository wakqasahmed/skills (2 stars, last pushed 17d ago), licensed MIT. It adds 31 tokens to every session and 1,266 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

create-powergrid-plugin

Create a complete PowerGrid plugin from scratch, including PHP class, Column macro, Blade view, Alpine.js component, and registration.

Power-Components/livewire-powergrid · 31 tokens

owl-admin-devtools-generator

A development guide for Owl Admin, a Laravel-based administration system, covering its code generator, API templates, relationships, and visual pages.

slowlyo/owl-admin · 82 tokens

llamaindex-development

Expert guidance for LlamaIndex development including RAG applications, vector stores, document processing, query engines, and building production AI applications.

Mindrally/skills · 32 tokens

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

laravel-expert

Laravel & PHP Development Instructions for GitHub Copilot.

GulajavaMinistudio/awesome-copilot-id · 15 tokens