31 Laravel 13 conventions and best practices across architecture, Eloquent, controllers, validation, security, and API design.
Works with
Organized into 7 rule categories by priority, from critical architecture and database patterns to medium-impact performance and API design guidance
Covers essential patterns including service classes, form requests, Eloquent models, migrations, eager loading, and event-driven architecture
Includes 31 specific rules with prefixes (e.g., arch-service-classes ,
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionlaravel-best-practicesExecute the skills CLI command in your project's root directory to begin installation:
Fetches laravel-best-practices from asyrafhussin/agent-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate laravel-best-practices. Access via /laravel-best-practices in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
4
total installs
4
this week
24
GitHub stars
0
upvotes
Run in your terminal
4
installs
4
this week
24
stars
Comprehensive best practices guide for Laravel 13 applications. Contains 31 rules across 7 categories for building scalable, maintainable Laravel applications.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Architecture & Structure | CRITICAL | arch- |
| 2 | Eloquent & Database | CRITICAL | eloquent- |
| 3 | Controllers & Routing | HIGH | controller-, ctrl- |
| 4 | Validation & Requests | HIGH | validation-, valid- |
| 5 | Security | HIGH | sec- |
| 6 | Performance | MEDIUM | perf- |
| 7 | API Design | MEDIUM | api- |
arch-service-classes - Extract business logic to servicesarch-action-classes - Single-purpose action classesarch-repository-pattern - When to use repositoriesarch-dto-pattern - Data transfer objectsarch-value-objects - Encapsulate domain conceptsarch-event-driven - Decouple with events and listenersarch-feature-folders - Organize by domain/featurearch-queue-routing - Centralized job queue routing (Laravel 13+)eloquent-eager-loading - Prevent N+1 querieseloquent-chunking - Process large datasetseloquent-query-scopes - Reusable query logiceloquent-model-events - Use observers for side effectseloquent-relationships - Define relationships properlyeloquent-casts - Automatic attribute castingeloquent-accessors-mutators - Transform attributeseloquent-soft-deletes - Safe deletion with recoveryeloquent-pruning - Automatic cleanup of old recordseloquent-vector-search - Semantic search with pgvector (Laravel 13+)controller-resource-controllers - Use resource controllerscontroller-single-action - Single action invokable controllerscontroller-resource-methods - RESTful resource methodscontroller-form-requests - Use form requestscontroller-api-resources - Transform API responsescontroller-middleware - Apply middleware properlycontroller-dependency-injection - Inject dependenciesvalidation-form-requests - Use form request classesvalidation-custom-rules - Create custom rulesvalidation-conditional-rules - Conditional validationvalidation-array-validation - Validate nested arraysvalidation-after-hooks - Complex validation logicsec-mass-assignment - Protect against mass assignmentNo rule files exist yet for this category.
No rule files exist yet for this category.
<?php
namespace App\Http\Controllers;
use App\Http\Requests\StorePostRequest;
use App\Http\Requests\UpdatePostRequest;
use App\Models\Post;
use Illuminate\Http\RedirectResponse;
class PostController extends Controller
{
public function store(StorePostRequest $request): RedirectResponse
{
// Validation happens automatically
$validated = $request->validated();
$post = Post::create($validated);
return redirect()
->route('posts.show', $post)
->with('success', 'Post created successfully.');
}
public function update(UpdatePostRequest $request, Post $post): RedirectResponse
{
$post->update($request->validated());
return redirect()
->route('posts.show', $post)
->with('success', 'Post updated successfully.');
}
}
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StorePostRequest extends FormRequest
{
public function authorize(): bool
{
return $this->user()->can('create', Post::class);
}
public function rules(): array
{
return [
'title' => ['required', 'string', 'max:255'],
'body' => ['required', 'string', 'min:100'],
'category_id' => ['required', 'exists:categories,id'],
'tags' => ['nullable', 'array'],
'tags.*' => ['exists:tags,id'],
'published_at' => ['nullable', 'date', 'after:now'],
];
}
public function messages(): array
{
return [
'body.min' => 'The post body must be at least 100 characters.',
];
}
}
<?php
namespace App\Services;
use App\Models\User;
use App\Models\Post;
use App\Events\PostPublished;
use Illuminate\Support\Facades\DB;
class PostService
{
public function __construct(
private readonly NotificationService $notifications,
)Make data-driven prioritization decisions faster
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Prerequisites
Time Estimate
30-60 minutes to see productivity improvements
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
asyrafhussin/agent-skills
asyrafhussin/agent-skills
kadajett/agent-nestjs-skills
jwynia/agent-skills
mattpocock/skills
parcadei/continuous-claude-v3
Registry listing for laravel-best-practices matched our evaluation — installs cleanly and behaves as described in the markdown.
I recommend laravel-best-practices for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
Useful defaults in laravel-best-practices — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
laravel-best-practices fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
laravel-best-practices has been reliable in day-to-day use. Documentation quality is above average for community skills.
Registry listing for laravel-best-practices matched our evaluation — installs cleanly and behaves as described in the markdown.
laravel-best-practices has been reliable in day-to-day use. Documentation quality is above average for community skills.
Registry listing for laravel-best-practices matched our evaluation — installs cleanly and behaves as described in the markdown.
laravel-best-practices fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Keeps context tight: laravel-best-practices is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 30