laravel-best-practices

laravel-best-practices is a skill for Claude Code, Codex from ohnotnow/devnotes. It costs 114 tokens per session (967 once invoked), scanned A, a copy of laravel-best-practices, MIT.

Guidance for writing, reviewing, and refactoring Laravel PHP code. Laravel is a PHP framework for building web applications and APIs.

In plain words
What is it for?
Use it when changing controllers, models, database migrations, form validation, authorization rules, background jobs, scheduled commands, services, or Eloquent database queries.
Why use it?
It helps developers follow the codebase's existing patterns while avoiding common problems in application logic, database queries, authorization, caching, and related areas.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/ohnotnow/devnotes/laravel-best-practices
Any agent
npx skills add ohnotnow/devnotes --skill laravel-best-practices
Clone the repo
git clone --depth 1 https://github.com/ohnotnow/devnotes

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 laravel-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/ohnotnow/devnotes/laravel-best-practices.svg)](https://agentmods.dev/skills/ohnotnow/devnotes/laravel-best-practices)
Your own site
<a href="https://agentmods.dev/skills/ohnotnow/devnotes/laravel-best-practices"><img src="https://agentmods.dev/badge/skills/ohnotnow/devnotes/laravel-best-practices.svg" alt="Measured on agentmods" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 967 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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 $0.00114 $0.00967
Opus 5 $0.00057 $0.00483
Sonnet 5 $0.00023 $0.00193
Haiku 4.5 $0.00011 $0.00097

Measured 2d ago against content hash 3eeacd931236, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

laravel-best-practices 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 2d 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.

Origin

This is a copy

100% identical to laravel-best-practices — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/laravel-best-practices/SKILL.md · 60 lines

How it starts

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

Laravel Best Practices

Best practices for Laravel, organized as an index of rule files. Each rule file teaches what to do and why. For exact API syntax, verify with search-docs.

Consistency First

Before applying any rule, check what the application already does. Laravel offers multiple valid approaches, and the best choice is the one the codebase already uses, even if another pattern would be theoretically better. Inconsistency is worse than a suboptimal pattern.

Check sibling files, related controllers, models, or tests for established patterns. If one exists, follow it. Don't introduce a second way. These rules are defaults for when no pattern exists yet, not overrides.

How to Apply

  1. Check the changed files, nearby code, project configuration, and relevant tests for established patterns. Deviate only for a correctness or security defect, and call the deviation out.
  2. Map every affected concern to the rule index below. Read each mapped rule file before editing. Skip unrelated rule files.
  3. Make the smallest coherent change. Keep the application's architecture and naming instead of introducing a second pattern for the same job.
  4. Verify version-sensitive Laravel APIs for the installed version with search-docs, or inspect the installed framework when it is unavailable.
  5. Run the narrowest relevant tests first, then the project's formatting and static-analysis checks when the change warrants them.
  6. Re-read the diff against every mapped rule before finishing.

Rule Index

Cross-cutting changes often need more than one rule file.

Concern Read
Query count, eager loading, indexes, large datasets rules/db-performance.md
Subqueries, aggregates, complex ordering and query plans rules/advanced-queries.md
Models, relationships, scopes, casts rules/eloquent.md
Authentication, authorization, input safety, secrets, uploads rules/security.md
Form Requests and validation rules rules/validation.md
Controllers, route binding, resources, middleware rules/routing.md
Schema changes, columns, foreign keys, indexes rules/migrations.md
Jobs, retries, uniqueness, batches, Horizon rules/queue-jobs.md
Cache lifetime, invalidation, locks, memoization rules/caching.md
Outbound requests, retries, timeouts, fakes rules/http-client.md
Exceptions, reporting, rendering, log context rules/error-handling.md
Events and notifications rules/events-notifications.md
Mailables and mail assertions rules/mail.md
Scheduled tasks and overlap protection rules/scheduling.md
Collections, lazy iteration, bulk operations rules/collections.md
Blade components, attributes, composers rules/blade-views.md
Environment values and application configuration rules/config.md
Tests: coverage, factories, fakes, and assertions the testing-best-practices skill
Naming, helpers, file boundaries, PHP style rules/style.md
Actions, services, dependencies, application structure rules/architecture.md

Read the full file on GitHub · 60 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. 2d ago First seen · 60 lines · 114 tokens per session scan A 3eeacd931236

Subscribe to this mod's changes

laravel-best-practices is a skill published in the GitHub repository ohnotnow/devnotes (0 stars, last pushed 2d ago), licensed MIT. It adds 114 tokens to every session and 967 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to laravel-best-practices, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

laravel-actions

Build, refactor, and troubleshoot Laravel Actions using lorisleiva/laravel-actions. Use when implementing reusable action classes (object/controller/job/listener/command), converting service classes/controllers/jobs into actions, orchestrating workflows via faked actions, or debugging action entrypoints and wiring.

coollabsio/coolify · 62 tokens

laravel-best-practices

Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization…

coollabsio/coolify · 114 tokens

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

laravel-best-practices

Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization…

laravel/boost · 114 tokens

owl-admin-devtools-generator

Use this skill for Owl Admin development tools, code generator, dynamic API templates, relationships, visual pages, generated CRUD code, app/ApiTemplates, Support/Apis, Support/CodeGenerator, Controllers/DevTools, or questions about “代码生成器”, “动态 API”, “API 模板”, “关系管理”, “可视化页面”, and “生成 CRUD”.

slowlyo/owl-admin · 82 tokens

create-module

Scaffold a new Marko module — a self-contained Composer package with composer.json, namespaced src/, and Pest tests. Use this skill whenever the user asks to create, add, or scaffold a new Marko module or package. Concrete triggers: 'create a module named payment', 'scaffold an acme/blog package', 'add a new module…

marko-php/marko · 120 tokens