.claude/skills/livewire-development/SKILL.md
Develops reactive Livewire 4 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 spatie/freek.dev 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 4 patterns and documentation.
{{ $assist->artisanCommand('make:livewire create-post') }}
{{ $assist->artisanCommand('make:livewire create-post --mfc') }}
{{ $assist->artisanCommand('make:livewire create-post --class') }}
{{ $assist->artisanCommand('make:livewire Posts/CreatePost') }}
</code-snippet>Use php artisan livewire:convert create-post to convert between single-file, multi-file, and class-based formats.
| Format | Flag | Structure |
|--------|------|-----------|
| Single-file (SFC) | default | PHP + Blade in one file |
| Multi-file (MFC) | --mfc | Separate PHP class, Blade, JS, tests |
| Class-based | --class | Traditional v3 style class |
| View-based | ⚡ prefix | Blade-only with functional state |
These things changed in Livewire 4, but may not have been updated in this application. Verify this application's setup to ensure you follow existing conventions.
Route::livewire() for full-page components; config keys renamed: layout → component_layout, lazy_placeholder → component_placeholder.wire:model now ignores child events by default (use wire:model.deep for old behavior); wire:scroll renamed to wire:navigate:scroll.wire:transition now uses View Transitions API (modifiers removed).$wire.$js('name', fn) → $wire.$js.name = fn; commit/request hooks → interceptMessage()/interceptRequest().@island) for isolated updates; async actions (wire:click.async, #[Async]) for parallel execution.defer, lazy.bundle for optimized component loading.| Feature | Usage | Purpose |
|---------|-------|---------|
| Islands | @island(name: 'stats') | Isolated update regions |
| Async | wire:click.async or #[Async] | Non-blocking actions |
| Deferred | defer attribute | Load after page render |
| Bundled | lazy.bundle | Load multiple together |
wire:sort, wire:intersect, wire:ref, .renderless, .preserve-scroll are available for use.data-loading attribute automatically added to elements triggering network requests.| Directive | Purpose |
|-----------|---------|
| wire:sort | Drag-and-drop sorting |
| wire:intersect | Viewport intersection detection |
| wire:ref | Element references for JS |
| .renderless | Component without rendering |
| .preserve-scroll | Preserve scroll position |
wire:key in loopswire:loading for loading stateswire:model.live for instant updates (default is debounced)smart_wire_keys defaults to true; new configs: component_locations, component_namespaces, make_command, csp_safe.wire:transition uses browser View Transitions API; $errors and $intercept magic properties available.wire:poll and parallel wire:model.live updates improve performance.For interceptors and hooks, see reference/javascript-hooks.md.
Livewire::test(Counter::class) ->assertSet('count', 0) ->call('increment') ->assertSet('count', 1);
</code-snippet>wire:key on all @foreach loopswire:key in loops → unexpected re-renderingwire:model real-time → use wire:model.livedevelopment
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 4 PHP framework. Activates when writing tests, creating unit or feature tests, adding assertions, testing Livewire components, browser 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
Use when user says "send to Ray," "show in Ray," "debug in Ray," "log to Ray," "display in Ray," or wants to visualize data, debug output, or show diagrams in the Ray desktop application.
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.