Skip to main content
skill CX Codex

wp-rest-api — Claude Code skill: what it does, how to install

A skill for WordPress REST API work: register routes, validate arguments, wire permission checks, and track down 401 or 404 responses.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add WordPress/agent-skills --skill wp-rest-api -a claude-code
Open on GitHub

What wp-rest-api does

The skill gives the agent a fixed route through REST API work in WordPress. It starts by finding what already exists: register_rest_route calls, controller classes, the rest_api_init hook. Then it picks an approach, either show_in_rest on a post type or taxonomy, or a custom endpoint built on a controller class.

Reference files cover routes, schemas, responses and fields, authentication, discovery and request params. Two details it flags early: per_page tops out at 100, and unfiltered post HTML sits behind ?context=edit with auth, best paired with _fields=content.raw. Debugging comes with it. A 404 usually means rest_api_init never fired, a typo in the route, or permalinks switched off.

It targets WordPress 7.0+ and PHP 7.4.0+. You need bash and node on the machine, and some workflows ask for WP-CLI. An older WordPress branch is a reason to check the version before installing.

What it helps with

  • register a route with a real permission check
  • debug a 401 on a cookie-authenticated endpoint
  • add a computed field to the response
  • expose a custom post type and taxonomy under wp/v2
  • define an args schema instead of reading superglobals

Example prompts for the agent

  • Add a my-plugin/v1/orders route with register_rest_route, a permission_callback and an args schema
  • Why does my endpoint return 401 when called from wp-admin?
  • Expose the portfolio post type in REST and check it shows up under wp/v2

How to install wp-rest-api

1Skills CLI (Vercel)

npx skills add WordPress/agent-skills --skill wp-rest-api -a claude-code

2Manually: put the files in place

~/.claude/skills/wp-rest-api/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/wp-rest-api/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about wp-rest-api

How do I install wp-rest-api in Claude Code?

Run npx skills add WordPress/agent-skills --skill wp-rest-api -a claude-code. The skill file lands at ~/.claude/skills/wp-rest-api/SKILL.md.

What does wp-rest-api do?

It walks the agent through building and debugging WordPress endpoints: routes, argument schema, permission checks, response fields and meta, and turning on REST for post types.

Which WordPress version does it need?

It targets WordPress 7.0+ and PHP 7.4.0+. It needs bash and node, and some workflows rely on WP-CLI.

Similar skills

All skills for Backend and APIs →

From the same set19

wp-plugin-development This skill guides WordPress plugin work, from project structure and hooks to admin settings, security checks and release packaging. CX Codex +1 8,000installs wp-performance Backend profiling skill for optimizing WordPress sites using WP-CLI, REST headers, and diagnostic scripts without browser access. CX Codex +1 6,100installs wp-block-themes Guides the agent through building WordPress block themes, editing theme.json, and organizing templates. Useful when styles fail to apply in the Site Editor. CX Codex +1 5,800installs wp-block-development A WordPress skill for Claude Code, Codex and Cursor that walks an agent through Gutenberg block work, from block.json metadata down to deprecations. CX Codex +1 5,500installs wordpress-router Identifies the structure of a WordPress codebase and directs the agent to the appropriate workflow. Useful before starting work on plugins, themes, or core checkouts. CX Codex +1 5,600installs wp-project-triage The skill inspects a WordPress repo and prints JSON: project kind, tooling and tests found, version hints. Handy before you touch an unfamiliar plugin or theme. CX Codex +1 5,400installs wp-wpcli-and-ops A skill for WordPress operations through wp: move domains, export the database, install plugins, inspect cron. Useful when the agent has to touch a live site, not just theme files. CX Codex +1 5,500installs wp-playground A thin routing wrapper that picks the right WordPress Playground workflow for the agent: Blueprint, local CLI, browser share links or debugging. CX Codex +1 4,700installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor