# Wp hooks lifecycle

> Wp hooks lifecycle is an open-source agent skill for developer tools. Guides an agent through WordPress hook placement, priorities and load order in Acorn. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/hekivo/kivo-wise/tree/main/plugins/kivo-wise/skills/wp-hooks-lifecycle
- **Repository:** https://github.com/hekivo/kivo-wise
- **GitHub stars:** 14
- **License:** MIT
- **Skill name:** wp-hooks-lifecycle
- **Collection:** https://github.com/hekivo/kivo-wise
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill helps an agent add, move or debug WordPress actions and filters inside an Acorn project. It covers where a hook should live, whether in a setup or filters file or in a provider's boot method, and how the chosen profile (theme, mu-plugin or radicle app) changes when Acorn boots relative to WordPress's load sequence.

The skill gives the agent a timing table for hooks, a procedure for choosing the hook and its location, and a list of request types such as Acorn routes, REST, AJAX, cron and Livewire updates, where template hooks never run. It also explains why block editor saves trigger save_post twice and how to guard against autosaves and revisions.

The agent is expected to use WP-CLI and Lando-style runner placeholders for verification, never running PHP or WP-CLI on the host. Related concerns such as ACF hooks and provider structure are delegated to other skills.

## When your agent uses it

> Use when adding, moving or debugging WordPress actions and filters in an Acorn project - add_action/add_filter priority and accepted_args, where a hook belongs (setup or filters files vs a provider boot()), load order (mu-plugins, plugins_loaded, after_setup_theme, init), when Acorn boots per profile, hooks that never fire on Acorn routes, REST or Livewire requests (template_redirect, wp_head), save_post firing twice in the block editor, the_content priorities. For ACF hooks use acf-native; for provider structure use acorn-stack.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/hekivo/kivo-wise/tree/HEAD/plugins/kivo-wise/skills/wp-hooks-lifecycle)
- [License: MIT](https://github.com/hekivo/kivo-wise/tree/HEAD/plugins/kivo-wise/skills/wp-hooks-lifecycle)

## Features

- **Hook placement guidance:** Helps decide whether a hook belongs in a bootstrap file, a setup file, or a provider boot method.
- **WordPress load order reference:** Summarises the order of mu-plugins, plugins, theme loading and init, and when Acorn boots per profile.
- **Request type coverage:** Shows which hooks run on front end, REST, AJAX, cron, WP-CLI and Acorn route requests.
- **Block editor save debugging:** Explains the two-request save flow and how to avoid duplicate or stale-data save_post callbacks.
- **Verification commands:** Provides WP-CLI checks to inspect registered callbacks and hook firing status.
- **Failure mode troubleshooting:** Lists common symptoms such as callbacks never running or wrong accepted args, with fixes.

## Good for

- Add a filter to an Acorn theme and choose the right priority
- Debug why a hook never fires on an Acorn route or REST request
- Fix save_post running twice when saving a post in the block editor
- Move a hook from functions.php into a provider boot method
- Find out why a core content filter alters my markup

## Install

### Claude Code

This skill ships in the `kivo-wise` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add hekivo/kivo-wise
/plugin install kivo-wise@kivo-wise
```

Or copy only this skill to `~/.claude/skills/wp-hooks-lifecycle`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/wp-hooks-lifecycle &&
cp -R "$tmp/plugins/kivo-wise/skills/wp-hooks-lifecycle" ~/.claude/skills/wp-hooks-lifecycle &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/wp-hooks-lifecycle` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/wp-hooks-lifecycle` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/wp-hooks-lifecycle &&
cp -R "$tmp/plugins/kivo-wise/skills/wp-hooks-lifecycle" ~/.agents/skills/wp-hooks-lifecycle &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/wp-hooks-lifecycle` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/wp-hooks-lifecycle` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/wp-hooks-lifecycle &&
cp -R "$tmp/plugins/kivo-wise/skills/wp-hooks-lifecycle" ~/.cursor/skills/wp-hooks-lifecycle &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/wp-hooks-lifecycle` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/hekivo/kivo-wise.git --path plugins/kivo-wise/skills/wp-hooks-lifecycle
```

Or copy the folder to `~/.gemini/skills/wp-hooks-lifecycle` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/wp-hooks-lifecycle`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/hekivo/kivo-wise.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/wp-hooks-lifecycle &&
cp -R "$tmp/plugins/kivo-wise/skills/wp-hooks-lifecycle" ~/.copilot/skills/wp-hooks-lifecycle &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/wp-hooks-lifecycle` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/hekivo/kivo-wise.git
```

Then copy `kivo-wise/plugins/kivo-wise/skills/wp-hooks-lifecycle` into your agent's skills folder as `wp-hooks-lifecycle`. Agents that support SKILL.md read one folder per skill.

## FAQ

### When does Wp hooks lifecycle trigger?

It is used when adding, moving or debugging WordPress actions and filters in an Acorn project, including priority, load order and hooks that fail on certain request types.

### Which ACF hooks does Wp hooks lifecycle cover?

It does not cover ACF-specific hooks; those are handled by the acf-native skill, though it references acf/save_post for ordering.

### Does Wp hooks lifecycle run commands on my machine?

Its verification steps use runner placeholders that default to Lando-based WP-CLI and Acorn commands, and it instructs never to run WP-CLI or PHP on the host.

### How do I install Wp hooks lifecycle in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/wp-hooks-lifecycle to use it in all your projects, or to .claude/skills/wp-hooks-lifecycle in one project. Or install the kivo-wise plugin, which includes it: /plugin marketplace add hekivo/kivo-wise, then /plugin install kivo-wise@kivo-wise.

### Does Wp hooks lifecycle run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Wp hooks lifecycle?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Wp hooks lifecycle?

The closest alternatives to Wp hooks lifecycle are Acorn stack, Acorn background, Acf native, Acorn routes API and Testing wp.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Acorn stack](https://ai-powered.com/skills/acorn-stack): Acorn stack is an open-source agent skill for developer tools.
- [Acorn background](https://ai-powered.com/skills/acorn-background): Acorn background is an open-source agent skill for developer tools.
- [Acf native](https://ai-powered.com/skills/acf-native): Acf native is an open-source agent skill for developer tools.
- [Acorn routes API](https://ai-powered.com/skills/acorn-routes-api): Acorn routes API is an open-source agent skill for developer tools.
- [Testing wp](https://ai-powered.com/skills/testing-wp): Testing wp is an open-source agent skill for developer tools.
- [Acorn scaffolding](https://ai-powered.com/skills/acorn-scaffolding): Acorn scaffolding is an open-source agent skill for developer tools.
- [Acorn livewire](https://ai-powered.com/skills/acorn-livewire): Acorn livewire is an open-source agent skill for developer tools.
- [Wp abilities MCP](https://ai-powered.com/skills/wp-abilities-mcp): Wp abilities MCP is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/wp-hooks-lifecycle
