This enforces true test-driven development for Laravel using Pest PHP. You write the test first, watch it fail, then write minimal code to pass it. The skill covers the full Laravel stack: controllers, models, authorization policies, API endpoints, queue jobs, and more. It includes practical patterns like using RefreshDatabase, factories, and Laravel-specific assertions. The verification checklist is helpful for making sure you actually tested database state and relationships, not just HTTP responses. If you tend to write tests after the code or skip them for "simple" features, this keeps you honest about the red-green-refactor cycle.

skills.sh installs
380
GitHub stars
48
last updated
Aug 21, 2026

Install

$ npx -y skills add iserter/laravel-claude-agents --skill laravel-tdd --agent claude-code

Installs into .claude/skills of the current project.

Files

Test-Driven Development for Laravel

Overview

Write the test first. Watch it fail. Write minimal code to pass.

This skill adapts TDD principles specifically for Laravel applications using Pest PHP, Laravel's testing features, and framework-specific patterns.

When to Use

Always for Laravel:

  • New features (controllers, models, services)
  • Bug fixes
  • API endpoints
  • Database migrations and models
  • Form validation
  • Authorization policies
  • Queue jobs
  • Artisan commands
  • Middleware

Exceptions (ask your human partner):

  • Throwaway prototypes
  • Configuration files
  • View-only changes (no logic)

The Laravel TDD Cycle

RED → Verify RED → GREEN → Verify GREEN → REFACTOR → Repeat

RED - Write Failing Test

Write one minimal test showing what the Laravel feature should do.

Feature Test Example:

<?php

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

Sponsors

Details

Repository
github.com/iserter/laravel-claude-agents
Categories
Testing & QA, PHP & Laravel
First seen
Jun 3, 2026

More from iserter/laravel-claude-agents

All 2
1leonardomso avatartest-writerleonardomso/33-js-conceptsGenerate comprehensive Vitest tests for code examples in JavaScript concept documentation pages, following project conventions and referencing source lines356skills.sh installs
2proffesor-for-testing avatarregression-testingproffesor-for-testing/agentic-qeStrategic regression testing with test selection, impact analysis, and continuous regression management. Use when verifying fixes don't break existing functiona334skills.sh installs
3patricio0312rev avatarload-test-builderpatricio0312rev/skillsCreates load and performance tests with k6, Artillery, or autocannon to validate system behavior under stress. Use when users request "load testing", "performan328skills.sh installs
4tuist avataranalyze-selective-testingtuist/agent-skillsAnalyzes Xcode selective testing effectiveness for a test run, showing which test targets were skipped or ran, and diagnosing regressions in test selection. Can304skills.sh installs
5mastepanoski avatarowasp-ai-testingmastepanoski/claude-skillsAI trustworthiness testing using OWASP AI Testing Guide v1. Execute 32 test cases across 4 layers (Application, Model, Infrastructure, Data) with practical payl245skills.sh installs
6charleswiltgen avataraxiom-ios-testingcharleswiltgen/axiomUse when writing ANY test, debugging flaky tests, making tests faster, or asking about Swift Testing vs XCTest. Covers unit tests, UI tests, fast tests without 238skills.sh installs