laravel-testing

laravel-testing is a skill for Claude Code from fusengine/agents. It costs 46 tokens per session (2,118 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 Code

Written for Claude Code: user-invocable in frontmatter.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./vendor/bin/pest.

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

Good fit Use it to write feature and unit tests, apply test-driven development (writing tests before implementation), mock external services, and verify database changes.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

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

Made for: Claude Code.

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/github.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/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/fusengine/agents/laravel-testing"><img src="https://agentmods.dev/badge/skills/fusengine/agents/laravel-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,118 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00046 $0.02118
Opus 5.5 $0.00018 $0.00847
Sonnet 5.5 $0.00009 $0.00424
Haiku 4.5 $0.00005 $0.00212

Measured 22d ago against content hash 4d9e90cc0606, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 22d 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.

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

How it starts

The opening of the file, as written. The whole thing — 243 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

Read the full file on GitHub · 243 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. 22d ago Changed · +7 lines · +15 tokens per session 4d9e90cc0606
  2. 1mo ago Changed 0173d3d81e95
  3. 1mo ago 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 (33 stars, last pushed 8d ago), licensed MIT. It adds 46 tokens to every session and 2,118 once invoked, about $0.0002 per session on Opus 5.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

symfony-testing

Testing Symfony hexagonal architecture with PHPUnit 10-13 and PHPStan 2: test organization mirroring src/, pure domain unit tests, handler tests with in-memory adapters and stubs, functional API tests, Messenger in-memory transport, Foundry 2 factories, TDD workflow. Use when: test, PHPUnit, TDD, unit test…

aligundogdu/symfony-hexagonal-skill · 100 tokens

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

review-ugc-render

Mandatory pre-publish review gate for a UGC video render. Transcribes the finished render's AUDIO with Whisper and word-diffs it against the approved spoken script, then gates pinning the final render (videoprojectupsert patch.finalrenderid) — blocking a render whose generated audio mis-voices a word (e.g. the…

gooseworks-ai/goose-skills · 207 tokens

r-testthat

Best practices for writing R package tests with testthat version 3+. Use this skill when writing or organizing tests for an R package or when improving existing tests that use testthat. It covers test structure and expectations, self-sufficient test design, proper cleanup with withr, fixtures, mocking external…

posit-dev/skills · 77 tokens

r-package-development

R package development with devtools, testthat, and roxygen2. Use when the user is working on an R package, running tests, writing documentation, or building package infrastructure.

posit-dev/skills · 41 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 · 175 tokens