upgrade-livewire

upgrade-livewire is a command for Claude Code from nasrulhazim/claude. It costs 0 tokens per session (2,545 once invoked), scanned A, original, MIT.

An upgrade assistant for moving Laravel Livewire applications or packages from version 3 to version 4. Laravel is a PHP web framework, and Livewire is its tool for building interactive pages with PHP.

In plain words
What is it for?
Use it to check the project type, update Livewire dependencies, and carry out the required migration and cleanup steps.
Why use it?
It helps identify whether the codebase is an application or a reusable package, then follows the relevant upgrade process instead of applying the wrong changes.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the claude-toolkit plugin — 36 skills, 12 commands, 20 agents shipped together

Good fit Use it to check the project type, update Livewire dependencies, and carry out the required migration and cleanup steps.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nasrulhazim/claude/upgrade-livewire
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.

Clone the repo
git clone --depth 1 https://github.com/nasrulhazim/claude

Made for: Claude Code.

Or install claude-toolkit, the plugin that ships this one along with the rest of its 36 skills, 12 commands, 20 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for upgrade-livewire

README.md
[![agentmods](https://agentmods.dev/badge/commands/nasrulhazim/claude/upgrade-livewire/github.svg)](https://agentmods.dev/commands/nasrulhazim/claude/upgrade-livewire)
Your own site
<a href="https://agentmods.dev/commands/nasrulhazim/claude/upgrade-livewire"><img src="https://agentmods.dev/badge/commands/nasrulhazim/claude/upgrade-livewire/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for upgrade-livewire

Your own site · 80×15
<a href="https://agentmods.dev/commands/nasrulhazim/claude/upgrade-livewire"><img src="https://agentmods.dev/badge/commands/nasrulhazim/claude/upgrade-livewire.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,545 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.02545
Opus 5 $0.00000 $0.01273
Sonnet 5 $0.00000 $0.00509
Haiku 4.5 $0.00000 $0.00254

Measured 9d ago against content hash e0afae54d7f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

upgrade-livewire 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 9d 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.

commands/upgrade-livewire.md · 335 lines

How it starts

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

Livewire 3 to 4 Upgrade Assistant

You are a specialized assistant for upgrading Laravel Livewire from version 3 to version 4.

Step 1: Identify Upgrade Type

CRITICAL: Before any upgrade, determine if this is an APPLICATION or PACKAGE.

Detection Checklist

Check Application Package
composer.json type field "type": "project" "type": "library"
Has public/index.php Yes No
Has app/Http/ directory Yes No
Has src/ directory No Yes
Uses PackageServiceProvider No Usually
Published on Packagist Rarely Yes

Quick Detection Commands

# Check composer.json type
grep '"type"' composer.json

# Check for application indicators
ls public/index.php 2>/dev/null && echo "APPLICATION" || echo "Might be PACKAGE"

# Check for package indicators
ls src/ 2>/dev/null && echo "Might be PACKAGE" || echo "Might be APPLICATION"

Step 2: Follow the Correct Workflow

For Applications

  1. Update composer.json: Change "livewire/livewire": "^3.0" to "livewire/livewire": "^4.0"
  2. Run composer update: composer update livewire/livewire --with-all-dependencies
  3. Clear caches: php artisan optimize:clear
  4. Run tests: composer test
  5. Update deprecated patterns (if any)

For Packages

  1. Update composer.json: Change to "livewire/livewire": "^3.0 || ^4.0"
  2. Add version-aware component registration (see below)
  3. Test with both Livewire 3 and 4
  4. Update CI matrix for dual-version testing

Quick Reference

Backward Compatible (No Changes Needed)

These patterns work identically in Livewire 3 and 4:

// Attributes
#[Layout('layouts.app')]
#[Url]
#[Validate('required')]
#[Computed]
#[On('event-name')]

// Event dispatching
$this->dispatch('event-name');
$this->dispatch('event-name', data: $value);

// Validation
protected array $rules = ['name' => 'required'];

// URL state
protected $queryString = ['search' => ['except' => '']];

// Traits
use WithPagination;
use WithFileUploads;

// Lifecycle
public function mount() {}
public function updatedPropertyName() {}

Read the full file on GitHub · 335 lines

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. 9d ago First seen · 335 lines · 0 tokens per session scan A e0afae54d7f8

Subscribe to this mod's changes

upgrade-livewire is a command published in the GitHub repository nasrulhazim/claude (22 stars, last pushed 6d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,545 tokens. 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-30.