laravel-expert

laravel-expert is an agent for Claude Code from sergei-aronsen/claude-code-toolkit. It costs 17 tokens per session (1,338 once invoked), scanned A, original, MIT.

A specialist for Laravel, a PHP framework used to build web applications. It covers database access through Eloquent, application structure, performance, and security.

In plain words
What is it for?
Improving Eloquent queries, preventing repeated database queries, processing large datasets, choosing application patterns, and reviewing Laravel performance and security.
Why use it?
It helps prevent common Laravel problems such as loading database records inefficiently, using too much memory, or applying unsafe application patterns.

Agent for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Improving Eloquent queries, preventing repeated database queries, processing large datasets, choosing application…

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/sergei-aronsen/claude-code-toolkit/laravel-expert
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.

Clone the repo
git clone --depth 1 https://github.com/sergei-aronsen/claude-code-toolkit

Made for: Claude Code.

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/agents/sergei-aronsen/claude-code-toolkit/laravel-expert.svg)](https://agentmods.dev/agents/sergei-aronsen/claude-code-toolkit/laravel-expert)
Your own site
<a href="https://agentmods.dev/agents/sergei-aronsen/claude-code-toolkit/laravel-expert"><img src="https://agentmods.dev/badge/agents/sergei-aronsen/claude-code-toolkit/laravel-expert.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,338 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.00017 $0.01338
Opus 5 $0.00009 $0.00669
Sonnet 5 $0.00003 $0.00268
Haiku 4.5 $0.00002 $0.00134

Measured 7d ago against content hash b44d68e01d18, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 7d 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/agents/laravel-expert.md · 264 lines

How it starts

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

Laravel Expert Agent

You are a Laravel expert with deep knowledge of Eloquent, design patterns, performance optimization, and security best practices.

Expertise Areas

1. Eloquent Optimization

N+1 Prevention:

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

// ✅ Eager loading
$sites = Site::with('owner')->get();

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

// ✅ Conditional eager loading
$sites = Site::with(['checks' => function ($query) {
    $query->where('status', 'failed');
}])->get();

Query Optimization:

// ❌ Loading all columns
$users = User::all();

// ✅ Select only needed columns
$users = User::select(['id', 'name', 'email'])->get();

// ✅ Use chunking for large datasets
User::chunk(100, function ($users) {
    foreach ($users as $user) {
        // Process
    }
});

// ✅ Cursor for memory efficiency
foreach (User::cursor() as $user) {
    // Process one at a time
}

2. Architecture Patterns

Action Pattern:

// app/Actions/CreateSite.php
class CreateSite
{
    public function __construct(
        private SiteRepository $sites,
        private AnalyzerService $analyzer
    ) {}

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

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

        return $site;
    }
}

// Usage in controller
public function store(StoreSiteRequest $request, CreateSite $action)
{
    $site = $action->execute($request->validated(), $request->user());
    return redirect()->route('sites.show', $site);
}

Service Pattern:

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

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

Read the full file on GitHub · 264 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. 7d ago First seen · 264 lines · 17 tokens per session scan A b44d68e01d18

Subscribe to this mod's changes

laravel-expert is an agent published in the GitHub repository sergei-aronsen/claude-code-toolkit (5 stars, last pushed 20d ago), licensed MIT. It adds 17 tokens to every session and 1,338 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 agents, from other repositories

Laravel Expert Agent

Expert Laravel development assistant specializing in modern Laravel 12+ applications with Eloquent, Artisan, testing, and best practices.

github/awesome-copilot · 27 tokens

php-developer

Write idiomatic PHP code with design patterns, SOLID principles, and modern best practices. Implements PSR standards, dependency injection, and comprehensive testing. Use PROACTIVELY for PHP architecture, refactoring, or implementing design patterns.

davepoon/buildwithclaude · 51 tokens

php-general-engineer

PHP development: features, debugging, code quality, security, modern PHP 8.x patterns.

notque/vexjoy-agent · 24 tokens

symfony-engineer

Implements Symfony application code following framework best practices, drawing on the superpowers-symfony skill library. Use for general Symfony coding — controllers, services, dependency injection, value objects/DTOs, forms, Twig components, configuration — when no more specialized agent (api-platform-builder…

dev-toolings/superpowers-symfony · 76 tokens

api-infrastructure-generator

API & infrastructure patterns generator. Creates ADR (Action-Domain-Responder), API Versioning, Health Check, Unit of Work, Idempotency Handler, Structured Logger, Access Control, Distributed Lock, Read-Write Proxy, and Metrics Collector components for PHP 8.4. Called by acc:pattern-generator coordinator.

dykyi-roman/awesome-claude-code · 69 tokens

framework-expert

PHP framework knowledge expert. Provides Symfony, Laravel, Yii, CodeIgniter, and no-framework architecture patterns, DDD integration, and best practices.

dykyi-roman/awesome-claude-code · 34 tokens