laravel-best-practices

Codify Laravel best practices for controllers, models, migrations, and jobs.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/JoeyMckenzie/website-laravel --skill laravel-best-practices-joeymckenzie
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-best-practices
Source: https://github.com/JoeyMckenzie/website-laravel/tree/main/.claude/skills/laravel-best-practices
Command: npx skills add https://github.com/JoeyMckenzie/website-laravel --skill laravel-best-practices-joeymckenzie

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Laravel projects often suffer from inconsistent patterns across controllers, models, jobs, and migrations, leading to harder maintenance and slower delivery.

Core Features & Use Cases

  • Centralized guidelines covering performance, security, validation, caching, and architectural patterns.
  • A reference for code reviews, refactoring, and onboarding to maintain Laravel conventions.
  • Practical examples and rules to enforce best practices across typical Laravel backends.

Quick Start

Audit your Laravel codebase against these rules and apply the patterns to improve consistency and quality.

Frequently Asked Questions about laravel-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent N+1 query problems in Laravel applications?

You can prevent Laravel N+1 query problems by applying eager loading and correct relationship usage patterns. This Skill codifies rules to capture requirements for query prevention, enforce consistent loading standards, and improve backend performance during code reviews.

What are the best practices for structuring Laravel controllers and service classes?

Laravel best practices for controllers and service classes involve centralizing architectural patterns to separate business logic from routing. This Skill identifies conventions across service classes and controllers to enforce consistent coding standards and improve maintainability.

How do I set up Laravel validation rules using form requests and policies?

Setting up Laravel validation requires applying form requests for input validation and policies for authorization. This Skill provides codified rules to enforce correct validation and authorization patterns across typical Laravel backends for enhanced security.

Does this Laravel refactoring guidance cover migrations and queue configuration patterns?

Yes, this Laravel refactoring guidance covers migrations, jobs, and queue configuration patterns. It codifies best practices across these components to ensure consistent configuration and architectural decisions during codebase audits.

Why does my Laravel codebase suffer from inconsistent patterns across models and jobs?

Laravel codebases suffer from inconsistent patterns across models and jobs due to a lack of centralized guidelines. This Skill provides a reference for onboarding and refactoring to maintain Laravel conventions and improve delivery speed.

What's the best way to audit a Laravel backend for code quality and security?

The best way to audit a Laravel backend is checking it against codified rules for code quality, security, and caching. This Skill serves as a practical reference to apply architectural patterns and enforce consistent coding standards.