# Wp REST API

> Wp REST API is an open-source agent skill for developer tools. Guides an agent through building and debugging WordPress REST API routes and fields. 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/third-party/wp-rest-api
- **Repository:** https://github.com/hekivo/kivo-wise
- **GitHub stars:** 14
- **License:** MIT
- **Skill name:** wp-rest-api
- **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 walks a coding agent through work on WordPress REST API endpoints, from registering routes and controller classes to shaping responses and exposing custom post types and taxonomies through show_in_rest. It points the agent to a triage script that locates existing REST usage in a plugin or theme before any code is changed, then directs it to reference notes on routes, schema, responses, authentication and discovery.

The guidance covers practical rules such as using a unique namespace, always supplying a permission_callback, validating arguments with schema helpers instead of reading superglobals, and adding fields rather than removing core ones. It also includes a checklist for confirming routes appear in the index and return the expected status codes, plus a debugging section for common 401, 403 and 404 failures.

The skill expects a WordPress codebase at a known path, a chosen namespace and version, and a decided authentication mode such as cookie with nonce or application passwords. It targets WordPress 7.0 and PHP 7.4 or later, and it runs a Node script for triage, with WP-CLI needed for some workflows.

## When your agent uses it

> Use when building, extending, or debugging WordPress REST API endpoints/routes: register_rest_route, WP_REST_Controller/controller classes, schema/argument validation, permission_callback/authentication, response shaping, register_rest_field/register_meta, or exposing CPTs/taxonomies via show_in_rest.

## 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/third-party/wp-rest-api)
- [License: MIT](https://github.com/hekivo/kivo-wise/tree/HEAD/third-party/wp-rest-api)

## Features

- **Route registration patterns:** Covers register_rest_route usage, namespaces, HTTP method constants and controller classes.
- **Argument validation:** Explains defining argument schemas and applying schema-based validation and sanitization.
- **Custom fields and meta:** Describes adding computed fields and exposing registered meta through the REST response.
- **Post type and taxonomy exposure:** Shows how to make custom content types available under wp/v2 using show_in_rest.
- **Authentication and permissions:** Outlines nonce-based cookie auth, application passwords and capability checks in callbacks.
- **Debugging checklist:** Lists common causes of 404, 401 and 403 errors and the verification steps to confirm a working endpoint.

## Good for

- Add a custom REST endpoint to a WordPress plugin
- Expose a custom post type through the wp/v2 API
- Fix a 403 error on a WordPress REST route
- Add a computed field to post responses
- Validate and sanitize arguments for a REST endpoint

## 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-rest-api`:

```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-rest-api &&
cp -R "$tmp/third-party/wp-rest-api" ~/.claude/skills/wp-rest-api &&
rm -rf "$tmp"
```

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

### Codex

Copy the skill folder to `~/.agents/skills/wp-rest-api` 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-rest-api &&
cp -R "$tmp/third-party/wp-rest-api" ~/.agents/skills/wp-rest-api &&
rm -rf "$tmp"
```

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

### Cursor

Copy the skill folder to `~/.cursor/skills/wp-rest-api` 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-rest-api &&
cp -R "$tmp/third-party/wp-rest-api" ~/.cursor/skills/wp-rest-api &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/wp-rest-api` 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 third-party/wp-rest-api
```

Or copy the folder to `~/.gemini/skills/wp-rest-api` yourself.

### VS Code

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

```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-rest-api &&
cp -R "$tmp/third-party/wp-rest-api" ~/.copilot/skills/wp-rest-api &&
rm -rf "$tmp"
```

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

### Other agents

Get the folder:

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

Then copy `kivo-wise/third-party/wp-rest-api` into your agent's skills folder as `wp-rest-api`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need before Wp REST API starts?

It needs the repository root, the target plugin, theme or mu-plugin path, a desired namespace and version, the authentication mode, and the WordPress version constraints.

### Which WordPress versions does Wp REST API target?

It targets WordPress 7.0 and later with PHP 7.4.0 or later, and it calls out cases where the site is below 7.0.

### When does the skill trigger?

It triggers when building, extending or debugging REST endpoints, routes, controllers, schema validation, permission callbacks, or exposing post types and taxonomies via show_in_rest.

### How do I install Wp REST API in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/wp-rest-api to use it in all your projects, or to .claude/skills/wp-rest-api 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 REST API 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 REST API?

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 REST API?

The closest alternatives to Wp REST API are Wp abilities API, API design, API design, API design and Acorn routes API.

## Where this comes from

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

## Alternatives

- [Wp abilities API](https://ai-powered.com/skills/wp-abilities-api): Wp abilities API is an open-source agent skill for developer tools.
- [API design](https://ai-powered.com/skills/api-design): API design is an open-source agent skill for developer tools.
- [API design](https://ai-powered.com/skills/api-design-fmarzochi): API design is an open-source agent skill for developer tools.
- [API design](https://ai-powered.com/skills/api-design-abdullayevtemurmalik): API design 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.
- [Wp performance](https://ai-powered.com/skills/wp-performance): Wp performance is an open-source agent skill for developer tools.
- [Wp security escaping](https://ai-powered.com/skills/wp-security-escaping): Wp security escaping is an open-source agent skill for security.
- [Acf native](https://ai-powered.com/skills/acf-native): Acf native is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/wp-rest-api
