Laravel Expert

Laravel Expert is a skill for Claude Code, Codex from sergei-aronsen/claude-code-toolkit. It costs 18 tokens per session (1,705 once invoked), scanned A, original, MIT.

A set of Laravel development guidelines covering database models, application structure, performance, security, and testing. Laravel is a PHP framework for building web applications.

In plain words
What is it for?
Use it when designing Laravel applications, optimizing Eloquent queries, choosing between Eloquent and the query builder, improving security, or writing tests.
Why use it?
It helps avoid common mistakes such as making too many database queries or allowing users to change protected fields.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing Laravel applications, optimizing Eloquent queries, choosing between Eloquent and the query builder, improving security, or writing tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sergei-aronsen/claude-code-toolkit/laravel
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sergei-aronsen/claude-code-toolkit --skill laravel
Clone the repo
git clone --depth 1 https://github.com/sergei-aronsen/claude-code-toolkit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Laravel Expert

README.md
[![agentmods](https://agentmods.dev/badge/skills/sergei-aronsen/claude-code-toolkit/laravel.svg)](https://agentmods.dev/skills/sergei-aronsen/claude-code-toolkit/laravel)
Your own site
<a href="https://agentmods.dev/skills/sergei-aronsen/claude-code-toolkit/laravel"><img src="https://agentmods.dev/badge/skills/sergei-aronsen/claude-code-toolkit/laravel.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,705 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.01705
Opus 5 $0.00009 $0.00852
Sonnet 5 $0.00004 $0.00341
Haiku 4.5 $0.00002 $0.00170

Measured 8d ago against content hash e31131d86a3c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

Laravel Expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/laravel/skills/laravel/SKILL.md · 341 lines

How it starts

The opening of the file, as written. The whole thing — 341 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Laravel Expert Skill

This skill provides deep Laravel expertise including Eloquent optimization, architectural patterns, security best practices, and testing strategies.


🔥 Common Pitfalls

N+1 Query Problem

// ❌ N+1 — 1 + N queries
foreach (Site::all() as $site) {
    echo $site->owner->name;
}

// ✅ Eager loading — 2 queries
foreach (Site::with('owner')->get() as $site) {
    echo $site->owner->name;
}

// ✅ Nested
Site::with(['owner', 'checks.results'])->get();

// ✅ Conditional
Site::with(['checks' => fn($q) => $q->failed()])->get();

Mass Assignment

// ❌ CRITICAL
protected $guarded = [];

// ❌ Sensitive fields in fillable
protected $fillable = ['name', 'email', 'is_admin'];

// ✅ Safe
protected $fillable = ['name', 'email', 'bio'];
// Use forceFill() for admin fields with explicit check

Query Builder vs Eloquent

// When to use Query Builder:
// - Bulk operations
// - Complex aggregations
// - Performance critical paths

DB::table('sites')
    ->where('status', 'active')
    ->update(['checked_at' => now()]);

// When to use Eloquent:
// - CRUD with relationships
// - Model events needed
// - Accessors/mutators
$site = Site::find($id);
$site->update(['status' => 'active']);

🏗️ Architecture Patterns

Action Classes

// app/Actions/Sites/CreateSite.php
namespace App\Actions\Sites;

use App\Models\Site;
use App\Models\User;

class CreateSite
{
    public function __construct(
        private AnalyzerService $analyzer
    ) {}

    public function execute(array $data, User $user): Site
    {
        $site = Site::create([
            ...$data,
            'owner_id' => $user->id,
            'status' => 'pending',
        ]);

        $this->analyzer->queueCheck($site);

        return $site;
    }
}

Service Classes

// Stateless, injected via DI
class AnalyzerService
{
    public function __construct(
        private HttpClient $http,
        private CacheManager $cache
    ) {}

    public function analyze(Site $site): AnalysisResult
    {
        $cacheKey = "analysis.{$site->id}";
        
        return $this->cache->remember(
            $cacheKey,
            now()->addHour(),
            fn() => $this->performAnalysis($site)
        );
    }

    private function performAnalysis(Site $site): AnalysisResult
    {
        $response = $this->http->get($site->url);
        return new AnalysisResult($response);
    }
}

Read the full file on GitHub · 341 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 341 lines · 18 tokens per session scan A e31131d86a3c

Subscribe to this mod's changes

Laravel Expert is a skill published in the GitHub repository sergei-aronsen/claude-code-toolkit (5 stars, last pushed 21d ago), licensed MIT. It adds 18 tokens to every session and 1,705 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

create-powergrid-plugin

Create a complete PowerGrid plugin from scratch, including PHP class, Column macro, Blade view, Alpine.js component, and registration.

Power-Components/livewire-powergrid · 31 tokens

owl-admin-devtools-generator

A development guide for Owl Admin, a Laravel-based administration system, covering its code generator, API templates, relationships, and visual pages.

slowlyo/owl-admin · 82 tokens

llamaindex-development

Expert guidance for LlamaIndex development including RAG applications, vector stores, document processing, query engines, and building production AI applications.

Mindrally/skills · 32 tokens

craftcms

Craft CMS 5 plugin and module development — extending Craft with PHP. Covers elements, element queries, services, models, records, controllers, migrations, queue jobs, console commands, field types, native fields, events, behaviors, Twig extensions, widgets, filesystems, permissions, project config, GraphQL, testing…

michtio/craftcms-claude-skills · 327 tokens

php-development

Expert guidance for PHP 8+ development with SOLID principles, PSR standards, and modern best practices.

Mindrally/skills · 24 tokens