livewire-development

A development guide for Livewire 4, a Laravel tool for building web components that update from the server without writing all the browser-side code yourself. It covers component formats, reactive controls, loading states, and tests.

In plain words
What is it for?
Use it to build components, handle wire directives, add real-time updates and asynchronous actions, manage loading states, and write component tests.
Why use it?
It provides consistent ways to create, change, convert, and debug Livewire components across the available file formats.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/spatie/freek.dev/livewire-development
Any agent
npx skills add spatie/freek.dev --skill livewire-development
Clone the repo
git clone --depth 1 https://github.com/spatie/freek.dev

Made for: Claude Code, Codex.

Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,281 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00082 $0.01281
Opus 5 $0.00041 $0.00641
Sonnet 5 $0.00016 $0.00256
Haiku 4.5 $0.00008 $0.00128

Measured 2d ago against content hash 9673d6056077, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

livewire-development scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/livewire-development/SKILL.md · 163 lines

How it starts

The opening of the file, as written. The whole thing — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Basic Usage

Creating Components

Single-file component (default in v4)

{{ $assist->artisanCommand('make:livewire create-post') }}

Multi-file component

{{ $assist->artisanCommand('make:livewire create-post --mfc') }}

Class-based component (v3 style)

{{ $assist->artisanCommand('make:livewire create-post --class') }}

With namespace

{{ $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

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

Single-File Component Example

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().

Read the full file on GitHub · 163 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 163 lines · 82 tokens per session scan A 9673d6056077

Subscribe to this mod's changes

livewire-development is a skill published in the GitHub repository spatie/freek.dev (652 stars, last pushed 26d ago), licensed MIT. It adds 82 tokens to every session and 1,281 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

electrik-slate

Build Laravel Blade UI with Electrik Slate 3.x and optional slate-blocks. Use when writing x-slate or x-slate-block components, Livewire forms, tokens, toasts, blocks, or when the user mentions Slate, electrik/slate, electrik/slate-blocks, or slate.electrik.dev.

electrikhq/slate · 72 tokens

nextjs-nextra-starter-distill-zh

蒸馏并应用当前仓库的 Next.js Nextra 启动模板架构、已实现功能、二次开发扩展点与迁移模式。适用于理解本项目、继续二次开发、修改 docs/landing/i18n/theme/auth/UI 行为,或把这些 Next.js 16 + Nextra 4 + Tailwind CSS 4 模式复用到其他项目。.

pdsuwwz/nextjs-nextra-starter · 97 tokens

nextjs-nextra-starter-distill

Distill and apply this repository's Next.js Nextra starter architecture, implemented features, extension points, and migration patterns. Use when Codex needs to understand this project, continue second-stage development, add or change docs/landing/i18n/theme/auth/UI behavior, or reuse these Next.js 16 + Nextra 4 +…

pdsuwwz/nextjs-nextra-starter · 85 tokens

laravel-best-practices

Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization…

gdarko/laravel-vue-starter · 114 tokens

fortify-development

ACTIVATE when the user works on authentication in Laravel. This includes login, registration, password reset, email verification, two-factor authentication (2FA/TOTP/QR codes/recovery codes), profile updates, password confirmation, or any auth-related routes and controllers. Activate when the user mentions Fortify…

gdarko/laravel-vue-starter · 189 tokens

vue-component-development

Activate when creating or modifying Vue 3 components, pages, layouts, stores, or services in the frontend. Covers component patterns, DaisyUI usage, icon system, toast notifications, drawer patterns, form handling, and the SPA routing/auth flow. Use when working in resources/app/.

gdarko/laravel-vue-starter · 60 tokens