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 andersonlemesc/Oryntra --skill laravel-best-practicesgit clone --depth 1 https://github.com/andersonlemesc/OryntraWrote 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/andersonlemesc/oryntra/laravel-best-practices)<a href="https://agentmods.dev/skills/andersonlemesc/oryntra/laravel-best-practices"><img src="https://agentmods.dev/badge/skills/andersonlemesc/oryntra/laravel-best-practices/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/andersonlemesc/oryntra/laravel-best-practices"><img src="https://agentmods.dev/badge/skills/andersonlemesc/oryntra/laravel-best-practices.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.00114 | $0.02068 |
| Opus 5 | $0.00057 | $0.01034 |
| Sonnet 5 | $0.00023 | $0.00414 |
| Haiku 4.5 | $0.00011 | $0.00207 |
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 11d 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.
This is a copy
100% identical to laravel-best-practices — 1 line 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.
How it starts
The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Laravel Best Practices
Best practices for Laravel, prioritized by impact. Each rule 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 — 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.
Quick Reference
1. Database Performance → rules/db-performance.md
- Eager load with
with()to prevent N+1 queries - Enable
Model::preventLazyLoading()in development - Select only needed columns, avoid
SELECT * chunk()/chunkById()for large datasets- Index columns used in
WHERE,ORDER BY,JOIN withCount()instead of loading relations to countcursor()for memory-efficient read-only iteration- Never query in Blade templates
2. Advanced Query Patterns → rules/advanced-queries.md
addSelect()subqueries over eager-loading entire has-many for a single value- Dynamic relationships via subquery FK +
belongsTo - Conditional aggregates (
CASE WHENinselectRaw) over multiple count queries setRelation()to prevent circular N+1 querieswhereIn+pluck()overwhereHasfor better index usage- Two simple queries can beat one complex query
- Compound indexes matching
orderBycolumn order - Correlated subqueries in
orderByfor has-many sorting (avoid joins)
3. Security → rules/security.md
- Define
$fillableor$guardedon every model, authorize every action via policies or gates - No raw SQL with user input — use Eloquent or query builder
{{ }}for output escaping,@csrfon all POST/PUT/DELETE forms,throttleon auth and API routes- Validate MIME type, extension, and size for file uploads
- Never commit
.env, useconfig()for secrets,encryptedcast for sensitive DB fields
What ships with it
20 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.
- rules/advanced-queries.md 3.8 KB
- rules/architecture.md 5.0 KB
- rules/blade-views.md 1.2 KB
- rules/caching.md 2.4 KB
- rules/collections.md 1.3 KB
- rules/config.md 1.5 KB
- rules/db-performance.md 4.1 KB
- rules/eloquent.md 3.9 KB
- rules/error-handling.md 2.2 KB
- rules/events-notifications.md 1.6 KB
- rules/http-client.md 3.6 KB
- rules/mail.md 1.2 KB
- rules/migrations.md 3.2 KB
- rules/queue-jobs.md 3.2 KB
- rules/routing.md 2.1 KB
- rules/scheduling.md 1.3 KB
- rules/security.md 3.6 KB
- rules/style.md 4.3 KB
- rules/testing.md 1.5 KB
- rules/validation.md 1.6 KB
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.
- 11d ago First seen · 190 lines · 114 tokens per session scan A 5632eeea810f
laravel-best-practices is a skill published in the GitHub repository andersonlemesc/Oryntra (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 114 tokens to every session and 2,068 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 1 line, and is treated as a copy.
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…
create-powergrid-plugin
Create a complete PowerGrid plugin from scratch, including PHP class, Column macro, Blade view, Alpine.js component, and registration.
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.
llamaindex-development
Expert guidance for LlamaIndex development including RAG applications, vector stores, document processing, query engines, and building production AI applications.
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…
laravel-expert
Laravel & PHP Development Instructions for GitHub Copilot.