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

Skill by nunomaduro

Applies Laravel best practices when writing, reviewing, or refactoring Laravel PHP code. Covers Eloquent, queries, caching, validation, queues, security and testing. Aimed at developers working on Laravel backends.

  • Score 78
  • 91 stars
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install laravel-best-practices

Built from the published package, never by AI.

git clone --depth 1 https://github.com/nunomaduro/laravel-starter-kit-inertia-vue /tmp/laravel-starter-kit-inertia-vue && mkdir -p ~/.claude/skills && cp -r /tmp/laravel-starter-kit-inertia-vue/.junie/skills/laravel-best-practices ~/.claude/skills/laravel-best-practices

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

Step-by-step: install laravel-best-practices in Claude Code

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

About

laravel-best-practices is an agent skill published by nunomaduro under an MIT license. It tells an AI assistant how to write, review and refactor Laravel PHP code. The skill is organised into 19 topic areas, each with a rules file, covering database performance, security, caching, Eloquent, validation, configuration, testing, queues, routing, the HTTP client, events, error handling, scheduling, architecture, migrations, collections, Blade views and style.

Before applying any rule, the assistant is told to check the existing codebase and follow its patterns, since consistency matters more than theory. Each rule explains what to do and why, ordered by impact. For exact API syntax, the skill points to search-docs. It is aimed at developers and reviewers working on Laravel backend code.

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

What it can do

  • Database performanceCovers N+1 prevention, eager loading, chunking and indexing for Eloquent queries.
  • SecurityCovers fillable or guarded models, policies, output escaping and file upload checks.
  • CachingCovers Cache::remember, flexible caching, cache tags and locks for race conditions.
  • Eloquent patternsCovers relationship types, local and global scopes, and attribute casts.
  • Validation and formsCovers Form Request classes and using validated() instead of all().
  • Queue and job patternsCovers retry_after and timeout settings, unique jobs and implementing failed().
  • Routing and controllersCovers implicit route model binding, resource routes and short controller methods.
  • HTTP clientCovers explicit timeouts, retries with backoff, response checks and concurrent pools.
  • Error handlingCovers report and render on exceptions, ShouldntReport and JSON rendering for APIs.
  • MigrationsCovers constrained foreign keys, indexes in migrations and reversible down() methods.

What you need

  • A Laravel PHP codebase
  • The search-docs tool for checking API syntax

Try asking

  • Review this Laravel controller for N+1 queries and missing eager loading.
  • Refactor this inline validation into a Form Request class.
  • Check this migration and add the indexes and foreign keys it needs.

Good to know

  • Rules are defaults and do not override patterns already used in the codebase.
  • Exact API syntax should be checked with search-docs for the installed Laravel version.

Security check

A

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

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

Alternatives to laravel-best-practices

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-best-practices: common questions

Does this skill work with any Laravel version?

The source does not list supported versions. It says to verify API syntax with search-docs for the installed Laravel version.

Will it override my project's existing coding patterns?

No. The source says to check existing patterns first and follow them, and the rules apply only when no pattern exists yet.

What areas of Laravel does it cover?

It covers 19 areas, including database performance, security, caching, queues, testing, routing, migrations and code style.

How do I install laravel-best-practices?

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

Is laravel-best-practices free?

The code is public, but no licence file was found, so check the repository before commercial use.

Is laravel-best-practices safe to use?

It scores 78 of 100. Grades: maintenance A, licence F, 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-best-practices?

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

laravel-best-practices Install

Add to stack

Loading.