laravel-tdd

Automate Laravel feature development with Pest-based RED-GREEN-REFACTOR test cycles.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a structured, test-driven approach to building Laravel applications by guiding developers through Pest-powered testing workflows before implementing code, reducing debugging time and improving reliability.

Core Features & Use Cases

  • Step-by-step RED-GREEN-REFACTOR cycles for Laravel features (controllers, models, routes, API endpoints, migrations, policies, jobs, commands).
  • Concrete patterns and examples for writing tests first, then coding minimal implementations to pass.
  • Best practices for test organization, refactoring, and maintaining test suites during feature development.

Quick Start

Write a failing Pest test for a new feature, then implement the minimal code to pass and refactor for readability.

Frequently Asked Questions about laravel-tdd

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

FAQPage Schema
How do I practice test-driven development in Laravel using Pest?

Test-driven development in Laravel with Pest involves writing a failing test first, implementing the minimal code to pass it, and then refactoring. This structured workflow enforces red-green-refactor discipline across controllers, models, and API endpoints.

What is the best way to structure Laravel feature development with TDD?

The best way to structure Laravel feature development with TDD is following explicit red, green, and refactor steps. You write tests for controllers, routes, and policies first, then implement minimal code to pass them, and finally refactor for readability.

Can I use Pest for testing Laravel API endpoints and migrations?

Yes, you can use Pest for testing Laravel API endpoints and migrations. The framework provides concrete patterns and examples for writing tests first across typical tasks including API endpoints, migrations, jobs, and commands.

How does a red-green-refactor cycle work for PHP Laravel applications?

A red-green-refactor cycle in PHP Laravel applications starts by writing a failing Pest test, then coding the minimal implementation to make it pass, and finally refactoring the code for readability while maintaining test suite reliability.

What are the testing prerequisites for automating Laravel feature development?

Automating Laravel feature development requires no external dependencies, but you need a Laravel environment with Pest installed. You should understand test organization and test-first reasoning to effectively drive development across models and policies.