$npx skillfedfor your agent

laravel-tdd

This skill guides you through TDD methodology tailored for Laravel development, using Pest PHP and Laravel's testing tools. Learn the red-green-refactor cycle with Laravel-specific patterns for controllers, models, authorization, APIs, and database operations. Apply TDD consistently across features and bugfixes to build reliable Laravel applications.

Laravel-TDD teaches test-driven development practices tailored to Laravel applications using Pest PHP.

AI-generated summary based on this skill's SKILL.md

41 8 MITupdated by iSerter

Decision gist · record as of 2026-04-19

Laravel-TDD teaches test-driven development practices tailored to Laravel applications using Pest PHP. This skill guides you through TDD methodology tailored for Laravel development, using Pest PHP and Laravel's testing tools. Learn the red-green-refactor cycle with Laravel-specific patterns for controllers, models, authorization, APIs, and database operations. Apply TDD consistently across features and bugfixes to build reliable Laravel applications.

manual: git clone https://github.com/iSerter/laravel-claude-agents → cp -r laravel-claude-agents/skills/laravel-tdd ~/.claude/skills/laravel-tdd
skills/laravel-tdd/SKILL.md · version 512910d4

Use it when

  • laravel-tdd covers writing and structuring tests using Pest PHP in Laravel.
  • laravel-tdd explains the red-green-refactor cycle—a core TDD practice where you write a failing test (red).

Verify before relying

Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.

Same gist for agents: .md · .json

Install

iSerter/laravel-claude-agents/laravel-tdd · repository language: PHP

Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What is laravel-tdd and how does it help with testing?

laravel-tdd is a skill that guides you through Test-Driven Development methodology tailored for Laravel applications. It teaches you the red-green-refactor cycle using Pest PHP and Laravel's testing tools, helping you write reliable code by testing first. You'll learn patterns for testing controllers, models, APIs, authorization, and database operations to build robust Laravel applications.

How do I write tests for Laravel using Pest PHP?

laravel-tdd covers writing and structuring tests using Pest PHP in Laravel. Pest provides a clean, expressive syntax for testing Laravel features. The skill teaches you how to organize unit and feature tests, use Laravel's testing utilities, set up test databases, and leverage Pest's fluent API to write clear, maintainable tests for your Laravel codebase.

What is the red-green-refactor cycle and how does it apply to Laravel?

laravel-tdd explains the red-green-refactor cycle—a core TDD practice where you write a failing test (red), write minimal code to pass it (green), then improve the code (refactor). Applied to Laravel, this workflow ensures you build features incrementally with test coverage, reducing bugs and making refactoring safer across controllers, models, and business logic.

How to write tests for Laravel controllers and APIs?

laravel-tdd teaches testing Laravel features like controllers, models, and APIs. You'll learn to write feature tests that simulate HTTP requests, assert responses, validate JSON structures, and test authorization. The skill covers testing API endpoints, controller logic, middleware, and error handling using Laravel's testing helpers and Pest's expressive assertions.

What Laravel TDD workflow should I follow for development?

laravel-tdd guides you through a consistent TDD workflow: write a failing test first, implement the feature to pass it, then refactor. This test-first approach applies to new features, bugfixes, and database operations. By following this cycle throughout your Laravel development, you ensure comprehensive test coverage and maintainable, reliable code from the start.

Does laravel-tdd cover testing models and database operations?

Yes, laravel-tdd includes Laravel model testing and database testing patterns. You'll learn to test model relationships, scopes, mutators, and validation. The skill covers using test factories, seeders, and database transactions to isolate tests, ensuring your database operations work correctly while keeping tests fast and independent.

SKILL.md

Rendered from the published skill. Quoted content, verbatim.

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 <?php

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

test('authenticated user can create post', function () {

(truncated - see the full file via the links below)

File tree — 1 file
skills/laravel-tdd/SKILL.md

Let your AI agent find skills like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.

wish › “Learn TDD methodology specifically for Laravel applications”

Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →

Related skills

laravel-tdd
by affaan-m · affaan-m/ECC

Laravel-TDD guides you through test-driven development for Laravel applications, covering PHPUnit and Pest frameworks alongside model factories, HTTP controller testing, and Sanctum authentication verification. Learn the red-green-refactor cycle with practical examples for unit tests, feature tests, and JSON API testing, plus techniques for mocking external services and validating authorization.

MITupdated Jul 2026
★ 234,207repo stars
laravel-authorization-patterns
by iSerter · iSerter/laravel-claude-agents

Learn to implement authorization in Laravel using Gates for general ability checks and Policies for model-specific access rules. This skill covers middleware integration, Blade directives for conditional rendering, and Response objects for detailed permission messages. Includes testing strategies and best practices for securing controllers and form requests.

MITupdated Apr 2026
★ 41repo stars
Testing
by mwguerra · mwguerra/claude-code-plugins

Testing generates comprehensive Pest test suites for FilamentPHP v4 components including resources, forms, tables, and authorization. It provides ready-to-use test patterns for list, create, edit, and view pages with built-in validation and bulk action testing.

no license declared → metadata onlyupdated Apr 2026
★ 35repo stars
laravel-testing
by AsyrafHussin · AsyrafHussin/agent-skills

This skill guides you through testing Laravel 13 applications with either Pest PHP 4 or PHPUnit 12, covering 24 rules across HTTP endpoints, model factories, database state verification, service mocking, and authentication patterns. It detects your project's testing framework automatically and provides syntax examples for both frameworks side-by-side, so you can write fast, readable tests regardless of which one you use.

MITupdated May 2026
★ 58repo stars
laravel-systematic-debugging
by iSerter · iSerter/laravel-claude-agents

This skill guides you through a four-phase debugging methodology designed to eliminate guesswork when troubleshooting Laravel issues. By enforcing root cause investigation before any fix attempt, it helps you avoid symptom-masking patches that create new problems. The process covers log analysis, Laravel Telescope inspection, data flow tracing, pattern comparison, hypothesis testing, and test-driven implementation.

MITupdated Apr 2026
★ 41repo stars
pest-testing
by spatie · spatie/freek.dev

This skill guides you through testing Laravel applications with Pest 4, covering unit and feature tests, browser testing with real browsers, and architecture validation. It handles test organization, assertions, mocking, datasets, and debugging—activating whenever you're writing tests, adding assertions, or verifying functionality.

MITfor claude-codeupdated Jul 2026
★ 651repo stars

More skills laravel-specialist (MIT) · php-expert (Apache-2.0) · laravel-specialist (MIT) · Pest Testing (unlicensed) · Test-Driven Development (TDD) (MIT) · tdd-mastery (MIT)

Tags
red-green-refactorbehavior-drivenpest-frameworktest-first-codinglaravel-testingphp-testingfeature-testingquality-assurance