laravel-refactor

Refactor Laravel/Livewire codebases by extracting controllers and migrating validation to Form Requests.

1|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/superdejooo/gsd-one-by-one --skill laravel-refactor-superdejooo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-refactor
Source: https://github.com/superdejooo/gsd-one-by-one/tree/main/.claude/skills/refactor
Command: npx skills add https://github.com/superdejooo/gsd-one-by-one --skill laravel-refactor-superdejooo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Laravel/Livewire codebases often accumulate anti-patterns and scattered responsibilities. This skill helps teams modernize and stabilize Laravel apps by extracting business logic from controllers into actions/services, migrating validation to Form Requests, and aligning with current tooling and best practices.

Core Features & Use Cases

  • Extract fat controllers to actions/services to improve maintainability.
  • Move inline validation to Form Requests and adopt architecture testing.
  • Guide Livewire migrations (including Livewire 3) and progressive loading patterns.
  • Establish CI/CD quality gates and tooling references for consistent upgrades.

Quick Start

Assess a Laravel project, identify fat controllers and Livewire anti-patterns, and generate a concrete refactor plan with actionable steps.

Frequently Asked Questions about laravel-refactor

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

FAQPage Schema
How do I refactor fat Laravel controllers to improve maintainability?

Refactoring fat Laravel controllers involves extracting business logic into dedicated actions and services. This transition centralizes responsibilities, making your codebase easier to test and maintain across existing projects.

What is the best way to migrate inline validation to Form Requests in Laravel?

Migrating inline validation to Form Requests separates validation logic from your controllers. This pattern uses dedicated request classes to handle validation rules, ensuring cleaner controllers and more testable validation flows.

How do I plan a Livewire 3 migration and fix component anti-patterns?

Planning a Livewire 3 migration requires identifying component anti-patterns and applying progressive loading patterns. You can generate a concrete refactor plan with actionable steps to modernize and stabilize Livewire components.

Can I use architecture testing and CI/CD quality gates for Laravel refactoring?

Architecture testing and CI/CD quality gates enforce structural standards during Laravel refactoring. Establishing these gates ensures consistent upgrades by preventing architectural drift and verifying that extracted services maintain boundaries.

Does this refactoring approach work with existing Laravel projects?

This refactoring approach targets existing Laravel projects to modernize and stabilize applications. It assesses your codebase to identify scattered responsibilities and provides explicit templates to implement the refactor plan.

When should I extract business logic from Laravel controllers into actions?

You should extract business logic from Laravel controllers into actions when controllers accumulate anti-patterns and scattered responsibilities. This refactoring improves maintainability and testability by isolating operations into discrete service classes.