laravel-best-practices

Audit Laravel projects and refactor code to follow documented best practices.

Updated Jan 19, 2026
One-click install
npx skills add https://github.com/Reshzy/AgricultureRMS --skill laravel-best-practices-reshzy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-best-practices
Source: https://github.com/Reshzy/AgricultureRMS/tree/main/.cursor/skills/laravel-best-practices
Command: npx skills add https://github.com/Reshzy/AgricultureRMS --skill laravel-best-practices-reshzy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Laravel Best Practices skill helps teams maintain high-quality, scalable code by providing a centralized set of rules and examples that standardize how controllers, models, migrations, and related backend components are written, reviewed, and refactored.

Core Features & Use Cases

  • Standardized patterns for common Laravel components (controllers, models, migrations, requests, policies, jobs, schedule commands, services, and Eloquent queries).
  • Performance, security, and quality guidance that addresses N+1 queries, caching strategies, validation, error handling, and routing conventions.
  • Code reviews and refactoring support by offering concrete examples and rules to align existing code with best practices.

Quick Start

Audit a Laravel project and refactor a sample module to follow the documented best practices.

Frequently Asked Questions about laravel-best-practices

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

FAQPage Schema
How do I fix N+1 query problems in Laravel Eloquent?

Fix N+1 query issues in Laravel Eloquent by enforcing eager loading and optimized query patterns. This skill provides concrete rules for refactoring Eloquent queries to prevent performance degradation and improve database access efficiency.

What is the best way to standardize Laravel controllers and models for code reviews?

The best way to standardize Laravel controllers and models is by applying consistent patterns for validation, routing, and business logic separation. This skill offers auditable, CI-friendly rules to align backend components during code reviews and refactoring.

How do I refactor an existing Laravel project to follow best practices?

Refactor an existing Laravel project by auditing controllers, form requests, policies, and jobs against documented best-practice patterns. This skill provides concrete examples and rules to align legacy code with standardized architecture and security guidelines.

Can I use these Laravel best practices for CI pipeline automated checks?

Yes, you can use these Laravel best practices for CI pipeline checks because the guidance is explicitly designed to be auditable and CI-friendly. It delivers documented rules for controllers, migrations, and services that automated pipelines can enforce.

When do I need to use Laravel form requests and policies for validation?

You need Laravel form requests and policies when standardizing validation and authorization logic across your backend components. This skill defines when to implement these patterns to ensure proper error handling, security, and separation of concerns.

Does this Laravel best practices guidance cover scheduled commands and jobs?

Yes, this Laravel best practices guidance covers scheduled commands and jobs by providing standardized patterns for their implementation. It ensures queued jobs and scheduled tasks align with performance, caching, and error handling rules.