What problem does it solve?
It solves the pain of creating or modifying WordPress REST API routes safely, validating inputs, shaping responses, and fixing authentication/permission issues that cause 401/403/404 failures.
Core Features & Use Cases
- Route and controller implementation: Register custom endpoints with register_rest_route and use WP_REST_Controller for non-trivial logic.
- Schema-backed validation: Define args with types and required fields, and validate/sanitize using WordPress REST schema helpers.
- Safe REST behaviors: Handle permission_callback correctly, add meta/fields via register_rest_field or register_meta, and preserve core endpoint compatibility.
- REST exposure for content types: Enable show_in_rest for CPTs and taxonomies (including rest_base and optional rest_controller_class) so clients can discover resources consistently.
- Debugging and troubleshooting: Triage REST usage, locate route failures, and verify discovery, OPTIONS behavior, and expected status codes.
Quick Start
Use this skill to implement a custom endpoint at /wp-json/<namespace>/<route> by following the skill procedure, starting with triaging the repo for existing REST usage and then registering routes on rest_api_init with a strict args schema and an explicit permission_callback.