wp-rest-api

Installation
Summary

Register, validate, and debug WordPress REST API endpoints with schema enforcement and permission controls.

  • Covers route registration via register_rest_route() and WP_REST_Controller subclasses, custom field exposure through register_rest_field and meta registration, and CPT/taxonomy REST exposure via show_in_rest
  • Enforces schema validation, argument sanitization, and permission callbacks; supports cookie + nonce, application passwords, and custom auth plugins
  • Includes triage workflow to locate existing REST usage, debug common errors (404, 401/403, invalid params), and verify endpoint discovery and response structure
  • Targets WordPress 6.9+ with filesystem-based bash and Node.js tooling; some workflows require WP-CLI
SKILL.md

WP REST API

When to use

Use this skill when you need to:

  • create or update REST routes/endpoints
  • debug 401/403/404 errors or permission/nonce issues
  • add custom fields/meta to REST responses
  • expose custom post types or taxonomies via REST
  • implement schema + argument validation
  • adjust response links/embedding/pagination

Inputs required

  • Repo root + target plugin/theme/mu-plugin (path to entrypoint).
  • Desired namespace + version (e.g. my-plugin/v1) and routes.
  • Authentication mode (cookie + nonce vs application passwords vs auth plugin).
  • Target WordPress version constraints (if below 6.9, call out).
Related skills

More from wordpress/agent-skills

Installs
1.8K
GitHub Stars
1.5K
First Seen
Feb 1, 2026