.cursor/skills/livewire-development/SKILL.md
Develops reactive Livewire 3 components. Activates when creating, updating, or modifying Livewire components; working with wire:model, wire:click, wire:loading, or any wire: directives; adding real-time updates, loading states, or reactivity; debugging component behavior; writing Livewire tests; or when the user mentions Livewire, component, counter, or reactive UI.
npx skillsauth add orlyapps/mathe-puzzle livewire-developmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Activate this skill when:
Use search-docs for detailed Livewire 3 patterns and documentation.
Use the php artisan make:livewire [Posts\CreatePost] Artisan command to create new components.
These things changed in Livewire 3, but may not have been updated in this application. Verify this application's setup to ensure you follow existing conventions.
wire:model.live for real-time updates, wire:model is now deferred by default.App\Livewire namespace (not App\Http\Livewire).$this->dispatch() to dispatch events (not emit or dispatchBrowserEvent).components.layouts.app view as the typical layout path (not layouts.app).wire:show, wire:transition, wire:cloak, wire:offline, wire:target are available for use.wire:loading and wire:dirty for delightful loading states.@foreach ($items as $item) <div wire:key="item-{{ $item->id }}"> {{ $item->name }} </div> @endforeach
</code-snippet>Prefer lifecycle hooks like mount(), updatedFoo() for initialization and reactive side effects:
public function mount(User $user) { $this->user = $user; } public function updatedSearch() { $this->resetPage(); }
</code-snippet>You can listen for livewire:init to hook into Livewire initialization:
document.addEventListener('livewire:init', function () { Livewire.hook('request', ({ fail }) => { if (fail && fail.status === 419) { alert('Your session expired'); } });
Livewire.hook('message.failed', (message, component) => {
console.error(message);
});
});
</code-snippet>Livewire::test(Counter::class) ->assertSet('count', 0) ->call('increment') ->assertSet('count', 1) ->assertSee(1) ->assertStatus(200);
</code-snippet> <code-snippet name="Testing Livewire Component Exists on Page" lang="php">$this->get('/posts/create') ->assertSeeLivewire(CreatePost::class);
</code-snippet>wire:key in loops causes unexpected behavior when items changewire:model expecting real-time updates (use wire:model.live instead in v3)development
Styles applications using Tailwind CSS v4 utilities. Activates when adding styles, restyling components, working with gradients, spacing, layout, flex, grid, responsive design, dark mode, colors, typography, or borders; or when the user mentions CSS, styling, classes, Tailwind, restyle, hero section, cards, buttons, or any visual/UI changes.
development
Tests applications using the Pest 3 PHP framework. Activates when writing tests, creating unit or feature tests, adding assertions, testing Livewire components, architecture testing, debugging test failures, working with datasets or mocking; or when the user mentions test, spec, TDD, expects, assertion, coverage, or needs to verify functionality works.
development
Develops UIs with Flux UI Pro components. Activates when creating buttons, forms, modals, inputs, tables, charts, date pickers, or UI components; replacing HTML elements with Flux; working with flux: components; or when the user mentions Flux, component library, UI components, form fields, or asks about available Flux components.
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.