/kivo-wise:acorn-livewirefrom kivo-wise
Creates, wires, and fixes Livewire 4 components in Acorn-based WordPress apps. Covers make:livewire, wire:model modifiers, lifecycle hooks, and deployment errors.
Ships in kivo-wise. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Livewire runs inside the Acorn application that your profile boots. There is no roots/acorn-livewire package: you install livewire/livewire next to Acorn and Acorn discovers its service provider. Livewire 4 changed several v3 habits (endpoint URLs, wire:model modifiers, the generator default), so check the version first and read references/state-patterns.md before writing modifiers.
Runner placeholders ({{runner.wp}}, {{runner.acorn}}, {{runner.composer}}, {{runner.test}}, {{runner.cache}}) come from the session context. On Lando they default to lando wp, lando wp acorn, lando composer, the project's test tooling and its cache-clear tooling. Run Composer from the Acorn base path (for an mu-plugin, pass --working-dir=<app path> when the runner starts at the repo root).
Not for: client-only UI (tabs, toggles, motion; use Alpine through tailwind-vite-assets), read-only data for a template (View Composer, acorn-stack), public JSON for JS (acorn-routes-api).
composer.lock (livewire/livewire). This skill targets 4.x; for 3.x stop and say so.config/livewire.php in the base path, if published: class_namespace, view_path, make_command.type, inject_assets, release_token.Application::configure()...->boot()): provider list and withRouting(...) arguments.| Item | sage-theme | acorn-mu-plugin | radicle-app |
|---|---|---|---|
| Installed by default | no | often (check composer.lock) | no |
| Where Composer runs | theme folder | plugin folder | project root |
| Provider | auto-discovered from the theme's vendor/composer/installed.json (extra.laravel.providers) | auto-discovered from the plugin's vendor; many projects also list \Livewire\LivewireServiceProvider::class in withProviders() so a custom Livewire route provider can follow it | auto-discovered from the root vendor; app providers stay in composer.json extra.acorn.providers |
| Boot file to touch | functions.php | the plugin's boot or configurator class | the tracked Acorn boot mu-plugin (write-guarded: show the diff and let the user apply it) |
| Default class namespace | App\Livewire | must match the plugin namespace: set class_namespace | App\Livewire |
| Layout for the directives | resources/views/layouts/app.blade.php in the theme | the plugin's layout, or each template that renders components | the theme layout under the root resources/views |
composer.lock, config/livewire.php and the boot call. If Livewire is already installed, skip to step 4.{{runner.composer}} require livewire/livewire in the base path.APP_KEY. Check it without printing it: {{runner.wp}} eval 'var_dump((bool) config("app.key"));'. If false, run {{runner.acorn}} key:generate or ask the user to set it in the environment.{{runner.acorn}} package:discover.wordpress: true to withRouting(...) as the Roots Livewire guide asks. Know the side effect: every WordPress page then runs the wordpress middleware group, a copy of web (session start, queued cookies). Check that cached pages do not start carrying a session Set-Cookie.@livewireStyles in <head> and @livewireScripts before </body> of every layout that can render a component. Auto-injection (inject_assets, default true) listens to Laravel's RequestHandled event and only rewrites bodies that pass through the HTTP kernel with </html> in them: Acorn routes yes, WordPress-rendered templates no. The directives render once per request, so keeping both is safe.{{runner.acorn}} vendor:publish --tag=livewire:config. On acorn-mu-plugin set class_namespace to <Namespace>\Livewire.resources/views/components/⚡name.blade.php, config make_command.type = sfc). When the project uses classes:
{{runner.acorn}} make:livewire PricingCalculator --class
# app/Livewire/PricingCalculator.php + resources/views/livewire/pricing-calculator.blade.php
Or set 'make_command' => ['type' => 'class'] in config/livewire.php once. Then {{runner.cache}}.WP_Post/WP_Term, never secrets.#[Locked] for values set at mount that the client must not change; #[Computed] for derived data; validation in #[Validate] or rules().booted() for per-request context that must exist before any action (language, current site). Update requests are Acorn routes answered on parse_request: init has run; template_redirect, wp_head and the_content never run.current_user_can()): any visitor can call any public method.wire:key on loop items, wire:target on every loading state, and wire:ignore around DOM owned by Alpine or third-party widgets (references/alpine-interop.md).<livewire:pricing-calculator :plan="$plan" /> or @livewire('pricing-calculator', ['plan' => $plan], key($id)). The name is the kebab-case class path (Forms\Contact becomes forms.contact).Livewire.dispatch(). Changing the set or order of public properties, or APP_KEY, breaks pages still served from cache; plan a purge with the release and consider a release token (references/common-errors.md).{{runner.acorn}} route:list --path=livewire lists POST livewire-<hash>/update, GET livewire-<hash>/livewire.js or livewire.min.js (minified when app.debug is false), the source maps and, when uploads are used, upload-file and preview-file. A project can replace the script and update routes with Livewire::setScriptRoute() / setUpdateRoute(); the update route name must end in livewire.update.POST /livewire-<hash>/update returning 200 and the console has no [wire:model="x"] property does not exist warning.<script> once, and its update URI has no unexpected path prefix (multilingual plugin, subdirectory install).Livewire::test() when the project's test setup boots Acorn; run them with {{runner.test}}.| Symptom | Cause | Fix |
|---|---|---|
| Component markup renders but nothing reacts | Livewire script missing on a WordPress-rendered page (auto-injection does not reach it) | Add @livewireScripts / @livewireStyles to the layout |
Unable to find component | Class outside class_namespace, wrong kebab name, or a stray ⚡ single-file component | Fix the namespace or name; regenerate with --class; dump autoload in the base path |
POST …/update returns 404 in curl but works in the browser | RequireLivewireHeaders aborts with 404 when the X-Livewire header is missing | Not a routing bug; test from the browser or send the header |
404 on /livewire-<hash>/… from cached pages | APP_KEY changed (the hash derives from it), or a language or subdirectory prefix reached the URL | Keep the key identical on every instance; purge cached HTML; pin the root URL if a plugin rewrites home_url() |
| 419 "This page has expired" | Acorn's web group runs no CSRF check; 419 here means release-token mismatch, a corrupt snapshot checksum (APP_KEY differs), a client write to a #[Locked] property, or a type error on a typed property | Reload a fresh copy; align APP_KEY; do not raise session lifetime |
RangeError: Maximum call stack size exceeded in dataSet right after a deploy | Cached HTML carries a snapshot whose public-property order or set no longer matches the class | Purge the cache; avoid reordering public properties; use a release token |
A field change never reaches updated() | v4 wire:model.blur / .change / .enter only sync the client value; no request is sent | Use .live.blur, or call an action |
| Values flip back or DOM is clobbered | Several $wire.prop = … writes in flight, missing wire:key, or no wire:ignore on third-party DOM | One batched action; add keys; add wire:ignore |
| Strings switch language after the first interaction | The update URL carries no language context | Capture the language at mount (#[Locked]) and switch to it in booted() |
More symptoms and diagnostics: references/common-errors.md.
roots-debugging.acorn-routes-api.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub hekivo/kivo-wise --plugin kivo-wise25 skills in this plugin
/acf-nativeUse when building or reviewing ACF field behaviour or the post save flow - validate before publish, required/maxlength settings, hiding a field (conditional_logic), dynamic choices, running code after save - acf/validate_value, acf/load_field, acf/prepare_field, acf/save_post, acf.getField, wp_insert_post_data, save_post - including projects where ACF may not be installed (Radicle). Maps each need to the native mechanism verified in local source. For ACF Composer scaffolding use acorn-scaffolding; for escaping ACF output use wp-security-escaping./acorn-backgroundUse when work must run outside the request, on a schedule, or be logged in an Acorn project - WP-Cron vs Action Scheduler vs Laravel queues (make:job, ShouldQueue, queue:work, failed_jobs), console commands (make:command, wp acorn <command>), Schedule::command and schedule:run from system cron, Laravel Redis and Cache vs transients, logging channels (Log::, LOG_CHANNEL, stderr, storage/logs). For tables use acorn-data; for object cache tuning use wp-performance./acorn-dataUse when storing or querying data through Acorn's database layer - Eloquent models (app/Models, models over wp_posts, postmeta, users), custom tables, migrations (make:migration, migrate --force on deploy), seeders and factories, the DB facade, table prefix errors ("Table wp_wp_x doesn't exist"), and choosing post meta vs options vs a post type vs a custom table. For queues use acorn-background; for endpoints use acorn-routes-api; for post type registration use acorn-scaffolding./acorn-routes-apiUse when adding or fixing an HTTP endpoint or virtual page in an Acorn project - Acorn routes (routes/web.php, routes/api.php, withRouting, Route::get, controllers, middleware, route:list) versus register_rest_route (permission_callback, /wp-json, X-WP-Nonce); webhooks, JSON APIs, CORS, throttle, API-key or JWT auth, "Target class [auth] does not exist", 404 on a defined route. For Livewire use acorn-livewire; for models use acorn-data; for nonces and capabilities in depth use wp-security-escaping./acorn-scaffoldingUse when generating a new artifact in an Acorn project - a Gutenberg block (ACF Composer acf:block, InnerBlocks, $styles, or a native block.json block via make:block), a post type or taxonomy (Poet config/poet.php, config/post-types.php), an ACF field group, partial or options page (acf:field, acf:options), a provider, View Composer, Blade component or command (make:provider, make:composer, make:component). For changing existing Acorn code use acorn-stack; for ACF hooks use acf-native; for block CSS and JS use tailwind-vite-assets./acorn-stackUse when changing how Acorn boots or is wired on a Sage theme, Acorn mu-plugin or Radicle root - Application::configure(), withProviders(), withRouting(), ACORN_BASEPATH, base_path(), provider register() vs boot(), where providers are registered (functions.php, config/app.php, composer.json extra.acorn.providers), config publishing, optimize:clear, "'acorn' is not a registered wp command". For generating providers, blocks or composers use acorn-scaffolding; for hook timing use wp-hooks-lifecycle; for unexplained breakage use roots-debugging.Other plugins' skills for the same job