Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

laravel-database-optimization

Skill by AsyrafHussin

laravel-database-optimization is an agent skill with database optimization rules for Laravel 13 applications. It covers query performance, indexing, Redis caching, pagination, transactions, migrations and query debugging for PHP developers.

  • Score 78
  • 116 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install laravel-database-optimization

Built from the published package, never by AI.

git clone --depth 1 https://github.com/AsyrafHussin/agent-skills /tmp/agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agent-skills/skills/laravel-database-optimization ~/.claude/skills/laravel-database-optimization

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install laravel-database-optimization in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

laravel-database-optimization is an agent skill that gives an AI assistant a set of database optimization rules for Laravel 13 applications. It contains 33 rules across 9 categories. The categories cover eager loading and N+1 queries, indexing, Eloquent optimization, Redis caching, pagination and large datasets, transactions and locking, migrations, query debugging, and naming conventions. Each rule includes a bad example, a good example, and Laravel 13 and PHP 8.3 context.

The skill is meant to be consulted when writing Eloquent queries, creating migrations, configuring caching, or debugging slow queries. The SKILL.md file holds a priority table and short code patterns. Individual rule files under rules/ hold the detailed explanations, and a compiled AGENTS.md contains the full guide. It is aimed at developers building Laravel apps on PHP 8.3 or later who want performance guidance from their assistant.

Written from the project's SKILL.md and checked against it.

What it can do

  • Eager loadingEliminate N+1 queries with eager loading and prevent lazy loading in development.
  • Indexing strategiesGuidance on foreign key, composite, covering and full-text indexes.
  • Eloquent optimizationUse withCount, subquery selects and optimized whereHas queries.
  • Redis cachingCache expensive queries with Cache::remember, cache tags and TTL values.
  • Large dataset paginationUse cursor pagination, chunkById and lazy cursors for large tables.
  • Transactions and lockingKeep transactions short, add deadlock retry logic and use pessimistic locking.
  • Safe migrationsWrite zero-downtime migrations and create indexes concurrently in production.
  • Query debuggingUse EXPLAIN ANALYZE, Laravel Debugbar and slow query logs to find bottlenecks.
  • Naming conventionsRules for table, column, relationship and migration and index naming.

What you need

  • PHP 8.3 or later
  • Laravel 13.x

Try asking

  • Find and fix N+1 queries in my Eloquent controllers.
  • Add the right indexes to this migration for my foreign keys.
  • Switch this large listing to cursor pagination and explain why.

Good to know

  • Rules are written for Laravel 13.x and PHP 8.3 or later.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/laravel-database-optimization/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to laravel-database-optimization

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

laravel-database-optimization: common questions

Which Laravel version does laravel-database-optimization target?

The source says it is for Laravel 13 applications, with Laravel 13.x and PHP 8.3 or later.

How many rules does this skill include?

It contains 33 rules across 9 categories, covering queries, indexing, caching, pagination, transactions, migrations, debugging and naming.

Where are the detailed rule explanations?

Each rule has its own file under rules/, and the full guide is compiled in AGENTS.md.

How do I install laravel-database-optimization?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is laravel-database-optimization free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is laravel-database-optimization safe to use?

It scores 78 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to laravel-database-optimization?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

laravel-database-optimization Install

Add to stack

Loading.