lc:generate-action

Generate and register Laractions action classes in Laravel models.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates the boilerplate overhead of creating and registering Laractions action classes, ensuring consistent architecture across your Laravel project.

Core Features & Use Cases

  • Automated Scaffolding: Generates clean, PSR-compliant action classes with proper namespaces and model properties.
  • Seamless Registration: Automatically updates the target model's actions array and imports, including trait injection if missing.
  • Use Case: When implementing a new business process like a status toggle or data export, use this skill to instantly create the action file and wire it into your Eloquent model.

Quick Start

Use the lc:generate-action skill to create a new action named ProcessOrder for the Order model.

Frequently Asked Questions about lc:generate-action

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

FAQPage Schema
How do I scaffold Laravel action classes automatically?

To scaffold Laravel action classes, this skill generates PSR-compliant files with proper namespaces and updates your Eloquent model's action array. It injects required traits automatically, eliminating manual boilerplate creation for reusable business logic units.

What is the best way to register new actions in a Laravel model?

The best way to register new actions in a Laravel model is by using automated scaffolding to update the model's actions array. This approach handles trait injection and import updates automatically, ensuring consistent architecture across your project.

Do I need the laractions package to generate action classes?

Yes, you need the edulazaro/laractions package installed in your Laravel application. The skill relies on this package to scaffold files, inject traits, and adhere to project-specific naming conventions for models and actions.

How does automated code generation handle trait injection for Laravel actions?

Automated code generation handles trait injection by checking the target Eloquent model and appending missing traits and imports. This ensures the newly scaffolded action classes are properly wired into the model's actions array.

Can I use this scaffolding for any business logic process in Laravel?

Yes, you can use this scaffolding for any Laravel business logic process like status toggles or data exports. It instantly creates the action file and wires it into your Eloquent model, ensuring your business logic units remain reusable.