laravel

Enforce Laravel best practices for Eloquent, queues, auth, and Pest testing.

26|8|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/arbazkhan971/godmode --skill laravel-arbazkhan971
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel
Source: https://github.com/arbazkhan971/godmode/tree/main/skills/laravel
Command: npx skills add https://github.com/arbazkhan971/godmode --skill laravel-arbazkhan971

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps developers avoid common Laravel pitfalls and accelerate building reliable, tested, and performant PHP applications by enforcing best practices across Eloquent, queues, authentication, and testing so regressions and performance issues are caught early.

Core Features & Use Cases

  • Eloquent optimization: detect and remediate N+1 queries, recommend eager loading and select pruning.
  • Architecture guidance: enforce service container patterns, action/service classes, DTOs, and contracts for maintainable code.
  • Async & resilience: ensure idempotent queued jobs, retries/backoff, and monitoring recommendations for Horizon or SQS.
  • Auth and security: select and configure Sanctum/Passport/Breeze/Jetstream appropriately and enforce policies and gates.
  • Testing & delivery: scaffold Pest tests, coverage thresholds, CI-friendly test strategies, and production caching recommendations.
  • Use Case: convert an under-tested Laravel API into a production-ready service with optimized queries, queued processing, and full test coverage.

Quick Start

Ask the agent to build a Laravel API with Eloquent models, Sanctum authentication, queue-based background jobs, and Pest tests.

Frequently Asked Questions about laravel

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

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

To fix Laravel Eloquent N+1 query issues, apply eager loading and select pruning to optimize database access. This reduces application regressions by enforcing framework best practices and catching performance bottlenecks early during development.

How do I make Laravel queued jobs idempotent and resilient?

Making Laravel queued jobs idempotent involves configuring retries, backoff strategies, and monitoring via Horizon or SQS. This ensures async processing reliability and prevents duplicate job execution during background workflow failures.

What is the best way to scaffold Pest tests for a Laravel API?

The best way to scaffold Pest tests for a Laravel API is to generate CI-friendly test strategies with configured coverage thresholds. This enforces automated testing standards to improve maintainability and catch regressions before deployment.

When should I use Laravel Sanctum vs Passport for API authentication?

Choosing Laravel Sanctum vs Passport depends on your API architecture, requiring proper configuration of policies and gates for security. Selecting the appropriate package ensures robust authentication for SPAs or full-stack apps without introducing regressions.

How do I enforce service container architecture in my Laravel application?

Enforcing service container architecture in Laravel involves applying action classes, DTOs, and contracts to structure code. This architectural guidance improves maintainability and reduces regressions by standardizing dependency injection patterns across your PHP project.