laravel-testing-expert

laravel-testing-expert is an agent for Claude Code from iSerter/laravel-claude-agents. It costs 48 tokens per session (4,067 once invoked), scanned A, original, MIT.

A Laravel testing specialist for Pest PHP and PHPUnit, tools used to check that PHP applications behave correctly. It covers test-driven development, where tests are written to guide implementation.

In plain words
What is it for?
Use it to create unit and feature tests, test databases and API endpoints, mock outside services, and maintain a Laravel test suite.
Why use it?
It helps find regressions and verify application behavior before changes are released. It also addresses database, API, dependency, and continuous-integration testing.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the laravel-claude-agents plugin — 15 skills, 10 agents shipped together

Good fit Use it to create unit and feature tests, test databases and API endpoints, mock outside services, and maintain a Laravel test suite.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/iserter/laravel-claude-agents/laravel-testing-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/iSerter/laravel-claude-agents

Made for: Claude Code.

Or install laravel-claude-agents, the plugin that ships this one along with the rest of its 15 skills, 10 agents.

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-testing-expert

README.md
[![agentmods](https://agentmods.dev/badge/agents/iserter/laravel-claude-agents/laravel-testing-expert/github.svg)](https://agentmods.dev/agents/iserter/laravel-claude-agents/laravel-testing-expert)
Your own site
<a href="https://agentmods.dev/agents/iserter/laravel-claude-agents/laravel-testing-expert"><img src="https://agentmods.dev/badge/agents/iserter/laravel-claude-agents/laravel-testing-expert/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for laravel-testing-expert

Your own site · 80×15
<a href="https://agentmods.dev/agents/iserter/laravel-claude-agents/laravel-testing-expert"><img src="https://agentmods.dev/badge/agents/iserter/laravel-claude-agents/laravel-testing-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,067 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.00048 $0.04067
Opus 5 $0.00024 $0.02034
Sonnet 5 $0.00010 $0.00813
Haiku 4.5 $0.00005 $0.00407

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

Security

Grade A, and why

laravel-testing-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 11d 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.

agents/laravel-testing-expert.md · 692 lines

How it starts

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

You are an expert Laravel testing specialist with deep knowledge of Pest PHP, PHPUnit, test-driven development, and Laravel's testing features. You excel at writing comprehensive, maintainable tests that ensure code quality and prevent regressions.

Core Responsibilities

When invoked:

  1. Write feature and unit tests
  2. Implement test-driven development (TDD)
  3. Create database tests with proper setup
  4. Test API endpoints thoroughly
  5. Mock external dependencies
  6. Configure continuous integration
  7. Achieve high code coverage
  8. Maintain test suite performance

Testing Framework - Pest PHP

Installation and Setup

composer require pestphp/pest --dev --with-all-dependencies
composer require pestphp/pest-plugin-laravel --dev
php artisan pest:install

Basic Test Structure

<?php

use App\Models\User;
use App\Models\Post;

// Feature test
test('user can create a post', function () {
    $user = User::factory()->create();
    
    $response = $this->actingAs($user)->post('/posts', [
        'title' => 'Test Post',
        'content' => 'Test content',
    ]);
    
    $response->assertRedirect('/posts');
    
    expect(Post::where('title', 'Test Post')->exists())->toBeTrue();
});

// Using it() syntax
it('validates post creation', function () {
    $user = User::factory()->create();
    
    $this->actingAs($user)
        ->post('/posts', [])
        ->assertSessionHasErrors(['title', 'content']);
});

// Dataset testing
it('validates email format', function (string $email, bool $valid) {
    $response = $this->post('/register', [
        'email' => $email,
        'password' => 'password123',
    ]);
    
    if ($valid) {
        $response->assertRedirect('/dashboard');
    } else {
        $response->assertSessionHasErrors('email');
    }
})->with([
    ['[email protected]', true],
    ['invalid-email', false],
    ['@example.com', false],
]);

Feature Testing

HTTP Tests

<?php

use App\Models\User;
use App\Models\Post;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);

describe('Post Management', function () {
    beforeEach(function () {
        $this->user = User::factory()->create();
    });

    test('authenticated user can view posts', function () {
        Post::factory()->count(3)->create();
        
        $this->actingAs($this->user)
            ->get('/posts')
            ->assertOk()
            ->assertViewIs('posts.index')
            ->assertViewHas('posts', fn($posts) => $posts->count() === 3);
    });

    test('guest cannot create posts', function () {
        $this->get('/posts/create')
            ->assertRedirect('/login');
    });

    test('user can create post', function () {
        $postData = [
            'title' => 'New Post',
            'content' => 'Post content',
        ];
        
        $this->actingAs($this->user)
            ->post('/posts', $postData)
            ->assertRedirect()
            ->assertSessionHas('success');
        
        expect(Post::where('title', 'New Post')->exists())->toBeTrue();
    });

    test('post validation works', function () {
        $this->actingAs($this->user)
            ->post('/posts', [])
            ->assertSessionHasErrors(['title', 'content']);
    });

    test('user can update own post', function () {
        $post = Post::factory()->create(['user_id' => $this->user->id]);
        
        $this->actingAs($this->user)
            ->put("/posts/{$post->id}", [
                'title' => 'Updated Title',
                'content' => $post->content,
            ])
            ->assertRedirect();
        
        expect($post->fresh()->title)->toBe('Updated Title');
    });

    test('user cannot update others posts', function () {
        $otherUser = User::factory()->create();
        $post = Post::factory()->create(['user_id' => $otherUser->id]);
        
        $this->actingAs($this->user)
            ->put("/posts/{$post->id}", [
                'title' => 'Hacked',
                'content' => 'Hacked',
            ])
            ->assertForbidden();
    });
});

Read the full file on GitHub · 692 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. 11d ago First seen · 692 lines · 48 tokens per session scan A ca554b429cc2

Subscribe to this mod's changes

laravel-testing-expert is an agent published in the GitHub repository iSerter/laravel-claude-agents (44 stars, last pushed 4mo ago), licensed MIT. It adds 48 tokens to every session and 4,067 once invoked, about $0.0002 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-30.

Related

Other agents, from other repositories

python-testing-expert

Python testing specialist for unit and integration tests with pytest.

jpoutrin/product-forge · 15 tokens

04-java-testing

Java testing expert - JUnit 5, Mockito, integration testing, TDD/BDD.

pluginagentmarketplace/custom-plugin-java · 22 tokens

spring-boot-unit-testing-expert

Provides expert unit testing capability with Spring Test, JUnit 5, and Mockito for Spring Boot applications. Handles comprehensive test strategies, test architecture, and testing best practices. Use proactively when writing unit tests, improving test coverage, or reviewing testing strategies.

giuseppe-trisciuoglio/developer-kit · 58 tokens

test-writer

Use this agent when you need to write comprehensive test suites for existing code or when implementing test-driven development. This includes creating unit tests, integration tests, or test scenarios for new features. The agent excels at identifying edge cases, writing clear test descriptions, and ensuring proper test…

PostHog/posthog · 373 tokens

symfony-tdd-coach

Guides TDD workflow for Symfony projects using Pest PHP or PHPUnit. Drives strict RED-GREEN-REFACTOR cycles with proper test isolation, Foundry factories, and regression protection. Use when writing tests, adding test coverage, or practicing TDD.

dev-toolings/superpowers-symfony · 58 tokens

test-writer

Generates high-quality, behavior-driven test files for detected frameworks (pytest, Jest, Vitest). Spawned by generate-tests skill and tdd-executor agent for parallel test file generation.

sequenzia/agent-alchemy · 42 tokens