From laraclaude
Generates Livewire Volt single-file components following project conventions. Studies existing patterns for consistent PHP, Tailwind, and Livewire usage.
How this skill is triggered — by the user, by Claude, or both
Slash command
/laraclaude:volt-component [component-name][component-name]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create a Livewire Volt single-file component that follows the project's conventions and patterns. All Livewire components in this project MUST use the Volt single-file format -- never create separate PHP class files in `app/Livewire/`.
Create a Livewire Volt single-file component that follows the project's conventions and patterns. All Livewire components in this project MUST use the Volt single-file format -- never create separate PHP class files in app/Livewire/.
| Subcommand | Description |
|---|---|
| (no argument) | Prompt for the component name and purpose, then generate. |
[component-name] | Generate a Volt component at the specified path. Names can use dot or slash notation. |
This is a generator skill -- it always creates files. There is no analyze-only or fix mode.
[component-name] argument is provided, use it as the component name.
properties.edit) or slash notation (e.g., properties/edit).resources/views/livewire/{name}.blade.php (dots become directory separators).Before generating, examine existing components to match the project's conventions:
Glob to find similar components in the same directory or feature area.Read to examine 1-2 existing components to understand:
@text() for all translations with English defaults$color in group context)wire:model (not .live unless real-time updates needed)<x-modal> for modalsCreate the file using Write with this structure:
<?php
use App\Models\RequiredModel;
use Illuminate\Support\Facades\Auth;
use Livewire\Volt\Component;
new class extends Component {
// Public properties for data binding
public $property;
// Form data properties
public string $name = '';
public string $email = '';
// Validation rules
protected function rules(): array
{
return [
'name' => 'required|string|max:255',
'email' => 'required|email',
];
}
public function mount($property = null)
{
// Initialize component state
if ($property) {
$this->property = $property;
$this->name = $property->name;
}
}
public function save()
{
$this->validate();
// Business logic here
session()->flash('success', text('saved_successfully', 'Saved successfully'));
}
}; ?>
<div>
{{-- Template content --}}
</div>
For components that manage a single model (create/edit):
mount() to load existing data for edit modesave() method with validationFor components that display collections:
wire:model.liveFor components that open modals:
$dispatch('open-modal', { id: 'modal-id' }) for opening$dispatch('close-modal') for closingFor standalone form components:
$this->reset() after successful submission@error directives on x-fields componentsBefore writing the file, verify:
new class extends Componentuse statements (never inline \App\Models\...)<div> element wrapping all template content@text('key', 'Default') or text('key', 'Default')$color variable)wire:model used appropriately (not .live unless needed)dark:bg-..., dark:text-...)alert(), confirm(), or browser dialogs@error directives or uses x-fields components (which include them automatically)After creating the component, inform the user if they need to:
routes/app.php, routes/web.php, routes/group.php)<livewire:component-name /> or @livewire('component-name')resources/views/livewire/{feature}/{component}.blade.phpresources/views/livewire/web/{feature}/{component}.blade.phpresources/views/livewire/group/{feature}/{component}.blade.phpresources/views/livewire/{component}.blade.phpresources/views/livewire/modals/{component}.blade.phpapp/Livewire/. All Livewire logic goes in the Blade file.__() for translations. Always use text() or @text().wire:ignore on the JS-managed sections.use Livewire\WithFileUploads; trait and use WithFileUploads; in the class.use Livewire\WithPagination; trait and use WithPagination; in the class.npx claudepluginhub edulazaro/laraclaude --plugin laraclaudeGenerates a modal Volt component using the project's x-modal pattern with Livewire integration. Creates form or confirmation modals with validation and event dispatching.
Builds reactive UI with Livewire 4 on Laravel 13 using wire:model, actions, events, Volt, and Folio without writing JavaScript.
Creates interactive server-driven UI components in WordPress Sage themes using Livewire v3 via Acorn. Handles wire:model, file uploads, computed properties, and real-time form validation without writing JavaScript.