laravel-best-practices

Apply Laravel best practices to code, reviews, and refactoring.

113|135|Updated Aug 28, 2019
One-click install
npx skills add https://github.com/hexlet-volunteers/hexlet-sicp --skill laravel-best-practices-hexlet-volunteers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-best-practices
Source: https://github.com/hexlet-volunteers/hexlet-sicp/tree/main/.agents/skills/laravel-best-practices
Command: npx skills add https://github.com/hexlet-volunteers/hexlet-sicp --skill laravel-best-practices-hexlet-volunteers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a framework for applying consistent Laravel best practices across codebases, reviews, and refactors to elevate maintainability and reliability.

Core Features & Use Cases

  • Enforces consistent patterns for controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries.
  • Highlights performance, caching, security, validation, error handling, routing, and architectural decisions to reduce defects and improve readability.
  • Useful for Laravel code reviews and refactoring tasks to bring existing code in line with industry-standard practices.

Quick Start

Analyze a Laravel project section by section and apply the documented best practices to improve structure and consistency.

Frequently Asked Questions about laravel-best-practices

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

FAQPage Schema
How do I apply best practices to refactor Laravel controllers and models?

Refactor Laravel controllers and models by enforcing consistent patterns for routing, validation, and Eloquent queries. Analyze existing project sections to apply architectural guidelines, improving code maintainability and reducing defects.

What are the best practices for Laravel security and validation in form requests?

Laravel security and validation best practices require using form requests to centralize validation rules and policies for authorization. This approach reduces defects and ensures scalable, secure handling of user input across the application.

Can I use this approach for Laravel code reviews on jobs and service classes?

Yes, this approach supports Laravel code reviews for jobs, scheduled commands, and service classes. It evaluates performance, caching, and architectural decisions to align existing code with industry-standard practices.

Does this framework cover caching and performance guidelines for Eloquent queries?

Yes, the framework covers caching and performance guidelines for Eloquent queries. It highlights performance decisions and scalable patterns to improve readability and reliability across real-world Laravel applications.

When should I not use generic refactoring patterns for Laravel migrations?

Avoid generic refactoring patterns for Laravel migrations when specific architectural guidelines or security constraints apply. This framework requires adherence to targeted validation, caching, and architecture guidelines rather than applying blanket refactoring.