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 AsyrafHussin/agent-skills --skill laravel-database-optimizationgit clone --depth 1 https://github.com/AsyrafHussin/agent-skillsWrote 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/asyrafhussin/agent-skills/laravel-database-optimization)<a href="https://agentmods.dev/skills/asyrafhussin/agent-skills/laravel-database-optimization"><img src="https://agentmods.dev/badge/skills/asyrafhussin/agent-skills/laravel-database-optimization/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/asyrafhussin/agent-skills/laravel-database-optimization"><img src="https://agentmods.dev/badge/skills/asyrafhussin/agent-skills/laravel-database-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector warn
SkillSpector: 1 finding, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium Excessive Agency · line 81 Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.Fix: Set explicit rate limits, timeouts, and resource quotas for API calls, file operations, and compute. Implement circuit breakers for runaway loops.
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.00055 | $0.01777 |
| Opus 5 | $0.00028 | $0.00889 |
| Sonnet 5 | $0.00011 | $0.00355 |
| Haiku 4.5 | $0.00006 | $0.00178 |
Grade A, and why
laravel-database-optimization 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 9d 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 — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Laravel Database Optimization
Comprehensive database optimization guide for Laravel 13 applications. Contains 33 rules across 9 categories for writing performant database queries, proper indexing, efficient caching, naming conventions, and debugging slow queries in Laravel 13.
Metadata
- Version: 1.1.0
- Framework: Laravel 13.x
- PHP: 8.3+
When to Apply
Reference these guidelines when:
- Writing Eloquent queries or using the query builder
- Diagnosing and fixing N+1 query problems
- Adding database indexes to migrations
- Implementing Redis or cache-based optimizations
- Paginating or processing large datasets
- Wrapping operations in database transactions
- Creating or modifying migrations for production databases
- Debugging slow queries with EXPLAIN or Laravel Debugbar
Rule Categories by Priority
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Query Performance & N+1 | CRITICAL | query- |
| 2 | Indexing Strategies | CRITICAL | index- |
| 3 | Eloquent Optimization | HIGH | eloquent- |
| 4 | Caching with Redis | HIGH | cache- |
| 5 | Pagination & Large Datasets | HIGH | data- |
| 6 | Transactions & Locking | HIGH | lock- |
| 7 | Migrations | HIGH | migrate- |
| 8 | Query Debugging | MEDIUM | debug- |
| 9 | Naming & Structure | HIGH | naming- |
Quick Reference
1. Query Performance & N+1 (CRITICAL)
query-eager-loading- Use eager loading to eliminate N+1 queriesquery-prevent-lazy-loading- Prevent lazy loading in developmentquery-auto-eager-loading- Configure automatic eager loading on modelsquery-select-columns- Select only needed columns instead of SELECT *
2. Indexing Strategies (CRITICAL)
index-foreign-keys- Index all foreign key columnsindex-composite-indexes- Create composite indexes for multi-column queriesindex-covering-indexes- Use covering indexes for read-heavy queriesindex-full-text- Use full-text indexes for search functionality
What ships with it
38 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.
- AGENTS.md 94 KB
- metadata.json 3.3 KB
- README.md 2.5 KB
- rules/_sections.md 3.2 KB
- rules/_template.md 1.8 KB
- rules/cache-invalidation.md 3.4 KB
- rules/cache-remember.md 2.6 KB
- rules/cache-tags.md 3.6 KB
- rules/cache-ttl.md 3.5 KB
- rules/data-avoid-unbounded.md 2.6 KB
- rules/data-chunk-by-id.md 2.7 KB
- rules/data-cursor-iteration.md 2.3 KB
- rules/data-cursor-pagination.md 2.2 KB
- rules/debug-explain-analyze.md 3.2 KB
- rules/debug-laravel-debugbar.md 2.7 KB
- rules/debug-slow-query-log.md 3.4 KB
- rules/eloquent-query-builder-hot-paths.md 2.0 KB
- rules/eloquent-subquery-selects.md 2.5 KB
- rules/eloquent-where-has-optimization.md 2.6 KB
- rules/eloquent-with-count-aggregates.md 2.4 KB
- rules/index-composite-indexes.md 2.9 KB
- rules/index-covering-indexes.md 2.6 KB
- rules/index-foreign-keys.md 2.7 KB
- rules/index-full-text.md 2.7 KB
- rules/lock-deadlock-retry.md 2.8 KB
- rules/lock-pessimistic-locking.md 3.0 KB
- rules/lock-short-transactions.md 2.9 KB
- rules/migrate-concurrent-indexes.md 2.9 KB
- rules/migrate-safe-column-additions.md 3.1 KB
- rules/migrate-zero-downtime.md 3.1 KB
- rules/naming-columns.md 4.3 KB
- rules/naming-migrations.md 4.1 KB
- rules/naming-relationships.md 4.8 KB
- rules/naming-tables.md 3.5 KB
- rules/query-auto-eager-loading.md 2.4 KB
- rules/query-eager-loading.md 1.9 KB
- rules/query-prevent-lazy-loading.md 2.3 KB
- rules/query-select-columns.md 2.3 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.
- 9d ago First seen · 236 lines · 55 tokens per session scan A bc5850c4e05b
laravel-database-optimization is a skill published in the GitHub repository AsyrafHussin/agent-skills (74 stars, last pushed 13d ago), licensed MIT. It adds 55 tokens to every session and 1,777 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-08-30.
Other skills, from other repositories
golang-samber-hot
In-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, sharding, stale-while-revalidate, missing key caching, and Prometheus metrics. Apply when using or adopting samber/hot, when the codebase imports…
golang-samber-hot
In-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, sharding, stale-while-revalidate, missing key caching, and Prometheus metrics. Apply when using or adopting samber/hot, when the codebase imports…
truss-schema
Ground a database schema change in this application's real structure using Laravel Truss. Use when adding or altering tables, columns, indexes, or foreign keys, when a migration needs to match what is already there, or when you need to know what a migration actually changed. Structure only, never data.
laravel-auditor-development
Integrate and apply the Laravel Auditor package in Laravel applications: installation, setup, the MCP tools, and the audit workflow. Use when setting up Laravel Auditor or wiring it into a Laravel app.
activerecord
This skill should be used when the user asks to "write a migration", "add a column", "add column to table", "create an index", "add a foreign key", "set up associations", "fix N+1 queries", "optimize queries", "add validations", "create callbacks", "use eager loading", or mentions ActiveRecord, belongsto, hasmany…
check-batch-processing
Analyzes PHP code for batch processing issues. Detects single-item vs bulk operations, missing batch inserts, individual API calls in loops, transaction overhead.