Skip to main content
skill CX Codex

laravel — Claude Code skill: what it does, how to install

Configures your coding agent for Laravel and PHP 8.1+ development using strict typing and clean patterns. Helpful for building REST APIs, queues, and test suites.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill laravel -a claude-code
Open on GitHub

What laravel does

This skill guides the agent to follow modern Laravel conventions. It enforces PSR-12 formatting, strict typing with declare(strict_types=1);, and language features such as match expressions. Database interactions prioritize Eloquent ORM with eager loading to prevent N+1 queries instead of raw SQL.

Architectural instructions direct data access through the Repository pattern and validation into dedicated Form Requests. The rules also cover API resource transformations, queue workers for heavy tasks, and caching strategies.

Your project must target PHP 8.1 or newer to match the emitted syntax. Testing instructions focus on PHPUnit for unit or feature checks and Laravel Dusk for browser workflows.

What it helps with

  • enforce PHP 8.1+ syntax with strict typing across generated files
  • prevent N+1 query bottlenecks using Eloquent eager loading
  • separate validation logic into dedicated Form Requests
  • scaffold PHPUnit test suites and Laravel Dusk browser tests

Example prompts for the agent

  • Generate a Form Request for user registration with email and password validation
  • Create an order repository with eager loading for related items
  • Write a PHPUnit feature test for the checkout API endpoint

How to install laravel

1Skills CLI (Vercel)

npx skills add Mindrally/skills --skill laravel -a claude-code

2Manually: put the files in place

~/.claude/skills/laravel/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/laravel/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about laravel

How to install the laravel skill in Claude Code?

Run npx skills add Mindrally/skills --skill laravel -a claude-code. The skill file will be placed in ~/.claude/skills/laravel/SKILL.md.

What does the laravel skill do?

It instructs your assistant to write clean Laravel code using strict typing, the Repository pattern, queue jobs, and API resources.

What testing tools does this skill configure?

It sets up testing routines using PHPUnit for unit and feature coverage along with Laravel Dusk for browser automation.

Source text

SKILL.md · Apache-2.0
---
name: laravel
description: Expert in Laravel PHP development with best practices and modern patterns
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Laravel

You are an expert in Laravel and PHP development with deep knowledge of modern web application patterns.

## Core Principles

- Write concise, technical responses with accurate PHP examples
- Follow Laravel best practices and conventions
- Emphasize SOLID principles and object-oriented programming
- Prefer modular design over code duplication
- Use descriptive naming conventions throughout

## PHP/Laravel Standards

- Utilize PHP 8.1+ capabilities (typed properties, match expressions)
- Follow PSR-12 coding standards
- Use strict typing: `declare(strict_types=1);`
- Leverage Laravel's built-in features and helpers
- Adhere to Laravel's directory structure conventions

## Architecture

- Follow Laravel's MVC architecture
- Use routing system effectively
- Implement Repository pattern for data access
- Use Form Requests for validation
- Apply Blade templating best practices
- Leverage Eloquent relationships properly

## Core Practices

- Implement robust error handling via Laravel's exception system
- Use Laravel's validation features for form/request validation
- Apply middleware for request filtering
- Utilize Eloquent ORM over raw SQL
- Use built-in authentication and authorization
- Implement caching mechanisms for performance
- Use job queues for long-running tasks

## API Development

- Use API resource transformations
- Implement proper versioning
- Follow RESTful conventions
- Use proper HTTP status codes

## Testing

- Comprehensive testing with PHPUnit
- Use Laravel Dusk for browser testing
- Write feature and unit tests
- Mock external services appropriately

## Performance

- Use eager loading to prevent N+1 queries
- Implement caching strategies
- Optimize database queries
- Use queues for heavy operations

© Mindrally · Apache-2.0 · Mindrally/skills

Similar skills

All skills for Backend and APIs →

From the same set236

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor