lc:extract-action

Extract Laravel controller and Livewire component methods into standalone Action classes.

12|2|Updated Apr 8, 2026
One-click install
npx skills add https://github.com/edulazaro/laraclaude --skill lc-extract-action
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lc:extract-action
Source: https://github.com/edulazaro/laraclaude/tree/main/skills/extract-action
Command: npx skills add https://github.com/edulazaro/laraclaude --skill lc-extract-action

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires edulazaro/laractions.

What problem does it solve?

This skill solves the issue of bloated controllers and Livewire components by automating the extraction of business logic into dedicated, testable, and reusable Laractions Action classes.

Core Features & Use Cases

  • Automated Refactoring: Automatically creates Action classes and updates your models and controllers to use them.
  • Standardization: Ensures your business logic follows the Laractions pattern, including support for queueing, tracing, and validation.
  • Use Case: When a controller method becomes too complex with database operations and side effects, use this skill to move that logic into a standalone Action class, keeping your HTTP layer clean and focused on responses.

Quick Start

Use the lc:extract-action skill to extract the store method from the PropertyController into a new action class.

Frequently Asked Questions about lc:extract-action

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

FAQPage Schema
How do I refactor business logic out of Laravel controllers into Action classes?

To extract business logic from Laravel controllers into Action classes, this skill identifies specific controller methods and moves database operations and side effects into standalone, testable Action classes automatically. It updates your controllers to delegate to these new classes.

What is the best way to clean up bloated Laravel Livewire components?

The best way to clean up bloated Laravel Livewire components is to decouple their database operations from UI concerns by extracting that logic into standalone Action classes. This keeps your Livewire components focused on presentation.

Do I need the Laractions package to extract logic into Action classes?

Yes, you need the edulazaro/laractions package installed and configured in your Laravel project. This skill requires the package to standardize your business logic into the Laractions pattern, including support for queueing, tracing, and validation.

Can I automate moving database operations from my HTTP layer into separate classes?

Yes, you can automate moving database operations from your HTTP layer by targeting specific class methods. This skill creates standalone Action classes and updates your models and controllers to use them, keeping your HTTP layer focused on responses.

When should I extract logic from a Laravel controller method into an Action class?

You should extract logic from a Laravel controller method into an Action class when the method becomes too complex with database operations and side effects. Moving this logic keeps your HTTP layer clean, decoupled, and easier to test.