laravel-best-practices

Enforces Laravel coding best practices across controllers, models, and services.

483|116|Updated Jan 17, 2026
One-click install
npx skills add https://github.com/trypostit/trypost --skill laravel-best-practices-trypostit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-best-practices
Source: https://github.com/trypostit/trypost/tree/main/.claude/skills/laravel-best-practices
Command: npx skills add https://github.com/trypostit/trypost --skill laravel-best-practices-trypostit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Apply this skill to ensure Laravel projects adhere to established best practices, reducing bugs, technical debt, and inconsistencies across teams during development, review, and refactoring.

Core Features & Use Cases

  • Clear guidelines for architecture, code structure, and naming conventions across controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries.
  • Consistency, performance, and security patterns with practical examples to guide code reviews and refactoring for maintainable Laravel applications.
  • Use Case: When onboarding new developers or auditing an existing codebase, apply these rules to align code with Laravel best practices and improve long-term maintainability.

Quick Start

Review your Laravel codebase and apply the documented best practices to your controllers, models, and services.

Frequently Asked Questions about laravel-best-practices

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

FAQPage Schema
What are Laravel best practices for structuring controllers and models?

Laravel best practices for controllers and models involve moving business logic into dedicated service classes to keep controllers thin. This architecture improves code quality and ensures long-term maintainability across your application.

How do I enforce coding standards during a Laravel code review?

Enforce coding standards during a Laravel code review by applying rules for consistency, performance, and security. Check Eloquent queries, form requests, and policies to reduce technical debt and align the codebase with established guidelines.

What is the best way to refactor Eloquent queries for performance?

The best way to refactor Eloquent queries for performance is to follow codified rules that optimize database interactions. Applying these performance patterns during refactoring prevents common bottlenecks and improves application responsiveness.

Can I use these Laravel coding standards for auditing migrations and jobs?

Yes, you can use these Laravel coding standards to audit migrations, jobs, and scheduled commands. The guidelines cover naming conventions and architecture to ensure consistency and security across these specific components.

How do I onboard new developers to a Laravel codebase with existing technical debt?

Onboard new developers to a Laravel codebase by applying documented best practices during development and refactoring. This aligns their code with established conventions, reducing inconsistencies and gradually eliminating existing technical debt.