livewire-components

Applies Livewire component conventions for version detection, Flux UI, Alpine.js, and optimistic updates.

Updated Aug 25, 2017
One-click install
npx skills add https://github.com/loki495/dotfiles --skill livewire-components-loki495
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: livewire-components
Source: https://github.com/loki495/dotfiles/tree/main/ai/skills/livewire-components
Command: npx skills add https://github.com/loki495/dotfiles --skill livewire-components-loki495

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Livewire projects vary widely in syntax and conventions — Livewire 4 single-file class components, Livewire 3 with Volt, and differing UI library choices — so generated component code often mismatches the existing project style. This Skill ensures Livewire work follows the correct conventions for each project before any code is written. ## Core Features & Use Cases - Version Detection: Checks composer.json to distinguish Livewire 4 single-file class components from Livewire 3 with Volt, and asks rather than assumes when the version is ambiguous. - UI Library Guidance: Prefers free Flux UI components where suitable, and uses Alpine.js for client-only interactivity that doesn't need a server roundtrip. - Optimistic Updates: Applies optimistic UI patterns for toggles, likes, and simple state flips while avoiding them for validation-dependent results. - Use Case: When asked to build a new Livewire component in an existing Laravel project, the Skill first inspects composer.json, matches the project's Livewire 3/Volt or Livewire 4 syntax, and uses Flux components and Alpine.js appropriately. ## Quick Start Create a new Livewire component for this Laravel project following the project's existing Livewire version and conventions.

Frequently Asked Questions about livewire-components

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Livewire component that matches my project version?▼

Check composer.json for the Livewire version first. Livewire 4 uses single-file class components with logic and view together, while Livewire 3 with Volt uses Volt's single-file syntax. Match the existing syntax in the project rather than assuming v4 conventions.

What is the difference between Livewire 4 and Livewire 3 with Volt?▼

Livewire 4 introduced single-file class components that absorbed Volt's patterns, keeping logic and view in one class-based file. Livewire 3 with Volt uses Volt's own single-file syntax, and several active projects still run that style on v3.

When should I use Alpine.js instead of Livewire?▼

Use Alpine.js for interactivity that doesn't need a server roundtrip, such as toggling visibility, dropdowns, tabs, and local form feedback. Reserve Livewire for anything requiring server state or data.

Should I use Flux UI components or custom Tailwind markup?▼

Prefer Flux components when a suitable free component exists for the job, such as buttons, form inputs, or modals. Don't force Flux where it doesn't fit, and check the project's Flux tier before reaching for paid components.

When should I avoid optimistic updates in Livewire?▼

Avoid optimistic updates when the server response determines what's displayed, such as validation-dependent results. Optimistic UI works well for toggles, likes, simple state flips, and list reordering where immediate feedback is safe.