laravel-testing

laravel-testing is a skill for Claude Code, Codex from fusengine/agents. It costs 31 tokens per session (1,836 once invoked), scanned A, original, MIT.

A Laravel testing guide for Pest and PHPUnit, tools that run automated checks against application code. It covers feature tests for full HTTP flows, unit tests for isolated logic, and architecture tests for code structure.

In plain words
What is it for?
Use it to write feature and unit tests, apply test-driven development (writing tests before implementation), mock external services, and verify database changes.
Why use it?
It helps catch regressions before deployment and provides a clear way to test controllers, services, models, APIs, and database behavior.

Skill for Claude CodeCodex

Part of the fuse-laravel plugin — 23 skills, 1 agent shipped together

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.

agentmods
npx agentmods add skills/fusengine/agents/laravel-testing
Any agent
npx skills add fusengine/agents --skill laravel-testing
Clone the repo
git clone --depth 1 https://github.com/fusengine/agents

Made for: Claude Code, Codex.

Or install fuse-laravel, the plugin that ships this one along with the rest of its 23 skills, 1 agent.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/fusengine/agents/laravel-testing.svg)](https://agentmods.dev/skills/fusengine/agents/laravel-testing)
Your own site
<a href="https://agentmods.dev/skills/fusengine/agents/laravel-testing"><img src="https://agentmods.dev/badge/skills/fusengine/agents/laravel-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,836 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00031 $0.01836
Opus 5 $0.00015 $0.00918
Sonnet 5 $0.00006 $0.00367
Haiku 4.5 $0.00003 $0.00184

Measured today against content hash 0173d3d81e95, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

laravel-testing 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 today.

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.

plugins/laravel-expert/skills/laravel-testing/SKILL.md · 236 lines

How it starts

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

Laravel Testing

Agent Workflow (MANDATORY)

Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:

  1. fuse-ai-pilot:explore-codebase - Analyze existing test patterns
  2. fuse-ai-pilot:research-expert - Verify Pest/PHPUnit docs via Context7
  3. mcp__context7__query-docs - Check assertion and mocking patterns

After implementation, run fuse-ai-pilot:sniper for validation.


Overview

Type Purpose Location
Feature HTTP, full stack tests/Feature/
Unit Isolated classes tests/Unit/
Arch Code architecture tests/Arch.php

Decision Guide: Test Type

What to test?
├── HTTP endpoint → Feature test
├── Service/Policy logic → Unit test
├── Code structure → Arch test
├── External API → Mock with Http::fake()
├── Mail/Queue/Event → Use Fakes
└── Database state → assertDatabaseHas()

Decision Guide: Test Strategy

Coverage strategy?
├── Feature tests (70%) → Critical flows
├── Unit tests (25%) → Business logic
├── E2E tests (5%) → User journeys
└── Arch tests → Structural rules

Critical Rules

  1. Use RefreshDatabase for database isolation
  2. Use factories for test data (never raw inserts)
  3. Mock external services - Never call real APIs
  4. Test edge cases - Empty, null, boundaries
  5. Run parallel - pest --parallel for speed

Reference Guide

Pest Basics

Read the full file on GitHub · 236 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. today Changed 0173d3d81e95
  2. yesterday First seen · 236 lines · 31 tokens per session scan A d689a6c8ef36

Subscribe to this mod's changes

laravel-testing is a skill published in the GitHub repository fusengine/agents (25 stars, last pushed today), licensed MIT. It adds 31 tokens to every session and 1,836 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-09-03.

Related

Other skills, from other repositories

test-driven-development

Enforces the red-green-refactor TDD cycle. No production code without a failing test first. Use when implementing features, fixing bugs, or writing production code.

isvlasov/rageatc-oss · 37 tokens

symfony-testing

Symfony testing — PHPUnit test organization, unit tests, integration tests, functional tests, TDD workflow, PHPStan, mocking ports, test patterns. Triggers on: test, PHPUnit, TDD, unit test, integration test, functional test, mock, testing, test driven, code quality, PHPStan.

aligundogdu/symfony-hexagonal-skill · 61 tokens

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 353 tokens

feature

TDD-first feature development — crystallise API as a demo test, drive implementation to pass it, run quality stack and progressive review loop. TRIGGER when: user asks to build new functionality, add a capability, or implement a feature in a Python project; phrases: "add X", "implement Y", "build Z feature", "create a…

Borda/AI-Rig · 124 tokens

test-strategy-document

Create a production-ready Testing Strategy and QA Execution Plan. Covers testing levels (unit, integration, E2E, performance), mocking boundaries, test environment matrix, code coverage thresholds, and automated CI pipeline runsheets. Use when establishing a QA framework for a new system or feature set.

fattain-naime/engineering-docs · 62 tokens

radin-doctor

Check that radin's own install under /.claude is complete and its optional companion tools are reachable. Use for /radin-doctor, "check my radin install", "is radin installed correctly", "radin doctor", "verify radin install".

shortcuts/radin · 62 tokens