livewire-flux
БесплатноБез исполняемых скриптовНе проверенLivewire 4 + Flux UI component scaffolder and pattern guide for Laravel projects. Generates Livewire components using Flux UI primitives — forms, data tables…
от nasrulhazim★ 26 звёзд на GitHubОб этом скилле
Livewire 4 + Flux UI Component Scaffolder
Scaffold production-ready Livewire 4 components using Flux UI primitives — never raw Alpine when Flux already has a component. Covers forms, data tables, modals, notifications, file uploads, and Spatie package integrations.
Kickoff Baseline
This skill assumes the project already has:
- Laravel 11+
- Livewire 4 installed and configured
- Flux UI installed with dark mode support
- Tailwind CSS 4+
If the user hasn't set these up yet, point them to the official installation docs before proceeding.
Command Reference
| Command / Request | Description |
|---|---|
/livewire component <Name> |
Scaffold a Livewire component (full-class or Volt) |
/livewire form <Model> |
Generate a Flux-based form for a model with validation |
/livewire table <Model> |
Generate a data table with sorting, filtering, pagination |
/livewire patterns |
Show Livewire 4 + Flux best practices and anti-patterns |
1. Component Scaffolding
1.1 Full-Class Components
When the user asks for a component, generate both the class and Blade view.
Class file (app/Livewire/{Name}.php):
<?php
namespace App\Livewire;
use Livewire\Component;
use Livewire\Attributes\Layout;
use Livewire\Attributes\Title;
#[Layout('components.layouts.app')]
#[Title('Page Title')]
class UserIndex extends Component
{
public function render()
{
return view('livewire.user-index');
}
}
Blade view (resources/views/livewire/{name}.blade.php):
<div>
{{-- Content using Flux components --}}
</div>
1.2 Volt Single-File Components
When the user requests Volt or a simpler component, use single-file format:
<?php
use Livewire\Volt\Component;
new class extends Component {
public string $name = '';
public function save(): void
{
// ...
}
}; ?>
<div>
<flux:input wire:model="name" label="Name" />
<flux:button wire:click="save">Save</flux:button>
</div>
Place Volt components in resources/views/pages/ for automatic route registration,
or resources/views/livewire/ for embedded use.
1.3 Choosing Between Full-Class and Volt
| Use Case | Recommendation |
|---|---|
| Full page with complex logic | Full-class component |
| Simple interactive widget | Volt single-file |
| Reusable across multiple pages | Full-class component |
| Quick prototype / admin page | Volt single-file |
| Needs form object | Full-class component |
2. Form Generation (/livewire form)
2.1 Form Object Pattern
Always use Livewire Form Objects for forms with more than two fields:
<?php
namespace App\Livewire\Forms;
use Livewire\Form;
use Livewire\Attributes\Validate;
use App\Models\User;
class UserForm extends Form
{
#[Validate('required|string|max:255')]
public string $name = '';
#[Validate('required|email|unique:users,email')]
public string $email = '';
#[Validate('nullable|string|max:20')]
public string $phone = '';
#[Validate('required|in:admin,editor,viewer')]
public string $role = 'viewer';
#[Validate('boolean')]
public bool $is_active = true;
public function setUser(User $user): void
{
$this->name = $user->name;
$this->email = $user->email;
$this->phone = $user->phone ?? '';
$this->role = $user->roles->first()?->name ?? 'viewer';
$this->is_active = $user->is_active;
}
public function store(): User
{
$this->validate();
return User::create($this->except('role'));
}
public function update(User $user): User
{
$this->validate();
$user->update($this->except('role'));
return $user;
}
}
2.2 Flux Form View
Use Flux components for every form element — never raw HTML inputs:
<div>
<form wire:submit="save">
<div class="space-y-6">
<flux:input
wire:model="form.name"
label="Full Name"
placeholder="Enter full name"
description="As it appears on official documents."
/>
<flux:input
wire:model="form.email"
label="Email Address"
type="email"
placeholder="[email protected]"
/>
<flux:input
wire:model="form.phone"
label="Phone Number"
type="tel"
placeholder="+60 12-345 6789"
/>
<flux:select wire:model="form.role" label="Role" placeholder="Select a role">
<flux:select.option value="admin">Admin</flux:select.option>
<flux:select.option value="editor">Editor</flux:select.option>
<flux:select.option value="viewer">Viewer</flux:select.option>
</flux:select>
<flux:checkbox
wire:model="form.is_active"
label="Active"
de
Установить livewire-flux в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл livewire-flux?
Livewire 4 + Flux UI component scaffolder and pattern guide for Laravel projects. Generates Livewire components using Flux UI primitives — forms, data tables, modals, notifications, file uploads with Spatie Media Library, and role-gated UI with Spatie Permission. Supports both full-class and Volt single-file components. Use this skill whenever the user asks to create a Livewire component, build a form, scaffold a data table, add a modal, wire up file uploads, or integrate Spatie packages with Livewire — including: "buat Livewire form untuk user", "create a data table component", "scaffold CRUD with Livewire", "tambah modal delete confirmation", "buat file upload guna Media Library", "wire up role-based UI", "tolong buat component pakai Flux", "generate Volt component", or "I need a Livewire page with filters and sorting". Also triggers when the user mentions Flux UI components, Livewire patterns, or asks about best practices for reactive Laravel UIs. Assumes Livewire 4 and Flux are already installed with dark mode support.
Как установить скилл livewire-flux?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл livewire-flux запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic