KS
Killer-Skills

livewire-development — how to use livewire-development how to use livewire-development, livewire-development setup guide, what is livewire-development, livewire-development vs laravel, livewire-development install, livewire-development tutorial for beginners, livewire-development best practices, livewire-development documentation, livewire-development examples

v1.0.0
GitHub

About this Skill

Perfect for Full Stack Agents needing advanced Livewire component development capabilities. Livewire-development is a skill that enables the creation and modification of Livewire components, utilizing wire: directives and implementing islands or async actions for efficient development.

Features

Creates and modifies Livewire components using wire: directives
Implements islands for efficient rendering and async actions for seamless user experience
Utilizes wire: model, click, loading, sort, and intersect directives for dynamic functionality
Supports writing Livewire component tests for robust quality assurance
Follows project conventions outlined in .ai/guidelines/project-guideline for consistency

# Core Topics

TijmenWierenga TijmenWierenga
[0]
[0]
Updated: 3/7/2026

Quality Score

Top 5%
45
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add TijmenWierenga/fitapp/reference/javascript-hooks.md

Agent Capability Analysis

The livewire-development MCP Server by TijmenWierenga is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use livewire-development, livewire-development setup guide, what is livewire-development.

Ideal Agent Persona

Perfect for Full Stack Agents needing advanced Livewire component development capabilities.

Core Value

Empowers agents to create and modify Livewire components, leveraging wire: directives such as model, click, and loading, while implementing islands or async actions for enhanced user experience, utilizing Livewire 4 patterns and documentation.

Capabilities Granted for livewire-development MCP Server

Creating dynamic Livewire components with wire: directives
Implementing async actions for improved performance
Writing comprehensive tests for Livewire components

! Prerequisites & Limits

  • Requires Livewire 4 knowledge and setup
  • Specific to Livewire development, not applicable to other frameworks
Project
SKILL.md
5.7 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Livewire Development

When to Apply

Activate this skill when:

  • Creating or modifying Livewire components
  • Using wire: directives (model, click, loading, sort, intersect)
  • Implementing islands or async actions
  • Writing Livewire component tests

Documentation

Use search-docs for detailed Livewire 4 patterns and documentation.

Project Conventions

These conventions are specific to this project. When proposing changes to these conventions, update .ai/guidelines/project-guidelines.md.

Authorization

Use $this->authorize() with policies in Livewire action methods. Use #[CurrentUser] for injecting the authenticated user instead of the Auth facade.

<!-- Livewire Authorization -->
php
1// Good 2use Illuminate\Container\Attributes\CurrentUser; 3 4public function saveReport(#[CurrentUser] User $user): void 5{ 6 $this->authorize('create', [InjuryReport::class, $this->injury]); 7 // ... 8} 9 10// Bad 11public function saveReport(): void 12{ 13 if (Auth::id() !== $this->injury->user_id) { 14 return; 15 } 16 // ... 17}

Authorize at the action level (e.g. saveReport, deleteReport), not in mount(). This keeps authorization close to the mutation and leverages policies consistently.

Mount Methods

Omit mount() when it only assigns typed public properties — Livewire handles this automatically.

Basic Usage

Creating Components

<!-- Component Creation Commands -->
bash
1 2# Single-file component (default in v4) 3 4{{ $assist->artisanCommand('make:livewire create-post') }} 5 6# Multi-file component 7 8{{ $assist->artisanCommand('make:livewire create-post --mfc') }} 9 10# Class-based component (v3 style) 11 12{{ $assist->artisanCommand('make:livewire create-post --class') }} 13 14# With namespace 15 16{{ $assist->artisanCommand('make:livewire Posts/CreatePost') }}

Converting Between Formats

Use php artisan livewire:convert create-post to convert between single-file, multi-file, and class-based formats.

Component Format Reference

FormatFlagStructure
Single-file (SFC)defaultPHP + Blade in one file
Multi-file (MFC)--mfcSeparate PHP class, Blade, JS, tests
Class-based--classTraditional v3 style class
View-based⚡ prefixBlade-only with functional state

Single-File Component Example

<!-- Single-File Component Example -->
php
1<?php 2use Livewire\Component; 3 4new class extends Component { 5 public int $count = 0; 6 7 public function increment(): void 8 { 9 $this->count++; 10 } 11} 12?> 13 14<div> 15 <button wire:click="increment">Count: @{{ $count }}</button> 16</div>

Livewire 4 Specifics

Key Changes From Livewire 3

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.

  • Use Route::livewire() for full-page components; config keys renamed: layoutcomponent_layout, lazy_placeholdercomponent_placeholder.
  • wire:model now ignores child events by default (use wire:model.deep for old behavior); wire:scroll renamed to wire:navigate:scroll.
  • Component tags must be properly closed; wire:transition now uses View Transitions API (modifiers removed).
  • JavaScript: $wire.$js('name', fn)$wire.$js.name = fn; commit/request hooks → interceptMessage()/interceptRequest().

New Features

  • Component formats: single-file (SFC), multi-file (MFC), view-based components.
  • Islands (@island) for isolated updates; async actions (wire:click.async, #[Async]) for parallel execution.
  • Deferred/bundled loading: defer, lazy.bundle for optimized component loading.
FeatureUsagePurpose
Islands@island(name: 'stats')Isolated update regions
Asyncwire:click.async or #[Async]Non-blocking actions
Deferreddefer attributeLoad after page render
Bundledlazy.bundleLoad multiple together

New Directives

  • wire:sort, wire:intersect, wire:ref, .renderless, .preserve-scroll are available for use.
  • data-loading attribute automatically added to elements triggering network requests.
DirectivePurpose
wire:sortDrag-and-drop sorting
wire:intersectViewport intersection detection
wire:refElement references for JS
.renderlessComponent without rendering
.preserve-scrollPreserve scroll position

Best Practices

  • Always use wire:key in loops
  • Use wire:loading for loading states
  • Use wire:model.live for instant updates (default is debounced)
  • Validate and authorize in actions (treat like HTTP requests)

Configuration

  • smart_wire_keys defaults to true; new configs: component_locations, component_namespaces, make_command, csp_safe.

Alpine & JavaScript

  • wire:transition uses browser View Transitions API; $errors and $intercept magic properties available.
  • Non-blocking wire:poll and parallel wire:model.live updates improve performance.

For interceptors and hooks, see reference/javascript-hooks.md.

Testing

<!-- Testing Example -->
php
1Livewire::test(Counter::class) 2 ->assertSet('count', 0) 3 ->call('increment') 4 ->assertSet('count', 1);

Verification

  1. Browser console: Check for JS errors
  2. Network tab: Verify Livewire requests return 200
  3. Ensure wire:key on all @foreach loops

Common Pitfalls

  • Missing wire:key in loops → unexpected re-rendering
  • Expecting wire:model real-time → use wire:model.live
  • Unclosed component tags → syntax errors in v4
  • Using deprecated config keys or JS hooks
  • Including Alpine.js separately (already bundled in Livewire 4)

Related Skills

Looking for an alternative to livewire-development or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication