laravel-tdd

Implements Pest-driven Test-Development workflows for Laravel applications.

Updated May 11, 2026
One-click install
npx skills add https://github.com/irizqi/agent-skills --skill laravel-tdd-irizqi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-tdd
Source: https://github.com/irizqi/agent-skills/tree/main/skills/laravel-tdd
Command: npx skills add https://github.com/irizqi/agent-skills --skill laravel-tdd-irizqi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the inconsistency and fragility of Laravel applications by enforcing a disciplined Test-Driven Development workflow that ensures every feature is verified before it is fully implemented.

Core Features & Use Cases

  • Pest PHP Integration: Leverages the expressive Pest testing framework for readable and maintainable test suites.
  • Laravel-Specific Patterns: Provides standardized approaches for testing database migrations, authorization policies, API endpoints, and controller logic.
  • Use Case: When building a new user registration feature, use this skill to write the failing test for the registration endpoint first, ensuring that validation rules and database persistence are correctly handled before writing the actual controller logic.

Quick Start

Use the laravel-tdd skill to generate a new feature test for the user authentication controller and guide the implementation process.

Frequently Asked Questions about laravel-tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a failing test for a Laravel controller before implementing the logic?

To write a failing test for a Laravel controller, you create a feature test specifying the expected endpoint behavior, validation rules, and database persistence, ensuring it fails before writing the actual controller logic.

What is the Red-Green-Refactor cycle in Laravel TDD?

The Red-Green-Refactor cycle in Laravel TDD is a workflow where you write a failing test, implement the minimal code to make it pass, and then refactor the implementation to maintain high code quality and system reliability.

How do I test Laravel API endpoints and authorization policies using Pest?

You test Laravel API endpoints and authorization policies by writing Pest feature tests that send HTTP requests to your routes and assert responses, ensuring controllers and database migrations behave correctly.

Can I use Pest for testing database migrations in Laravel?

Yes, you can use Pest for testing database migrations in Laravel by leveraging its expressive testing framework to provide standardized approaches for verifying database persistence and data integrity during tests.

What's the best way to ensure validation rules are handled correctly in a new Laravel feature?

The best way to ensure validation rules are handled correctly is to write a failing feature test first that specifies the expected validation behavior, then implement the controller logic to make the test pass.