superpowers-sage:wp-rest-api

Codify WordPress REST API patterns for Sage projects with authentication and schema validation.

13|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/codigodoleo/superpowers-sage --skill superpowers-sage-wp-rest-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: superpowers-sage:wp-rest-api
Source: https://github.com/codigodoleo/superpowers-sage/tree/main/skills/wp-rest-api
Command: npx skills add https://github.com/codigodoleo/superpowers-sage --skill superpowers-sage-wp-rest-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

WordPress REST API design and debugging often require careful orchestration between native REST endpoints and Acorn Routes, plus consistent authentication and schema practices. This Skill codifies decision matrices, best practices, and patterns to streamline endpoint creation, security, and maintainability in Sage projects.

Core Features & Use Cases

  • Guides when to use native REST vs Acorn Routes and how to coexist within a Sage project.
  • Details best practices for registering REST endpoints with rest_api_init and always including a permission_callback.
  • Outlines authentication patterns (cookie/nonce, Application Passwords, JWT) and how to expose custom fields and CPTs.
  • Provides troubleshooting guidance, anti-patterns, and escalation steps for REST API development.

Quick Start

Review the Skill and integrate native REST and Acorn Routes patterns into your WordPress Sage project.

Frequently Asked Questions about superpowers-sage:wp-rest-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I register WordPress REST API endpoints with a permission callback?

To register WordPress REST API endpoints, use rest_api_init and always include a permission_callback to enforce access control. This Skill provides best-practice patterns for secure endpoint registration in Sage projects.

When should I use native WordPress REST API versus Acorn Routes?

Choose native WordPress REST API or Acorn Routes based on your project's specific routing needs. This Skill outlines decision matrices to help coexist with both approaches effectively within a Sage workflow.

What authentication patterns work best for WordPress REST API endpoints?

Common WordPress REST API authentication patterns include cookie/nonce, Application Passwords, and JWT. This Skill details how to implement these methods to secure your custom endpoints and exposed custom fields.

How do I expose custom post types and custom fields through the WordPress REST API?

Exposing custom post types and custom fields through the WordPress REST API requires proper schema validation and registration patterns. This Skill codifies the steps to securely integrate custom data structures.

Why does my WordPress REST API endpoint return an authentication error?

WordPress REST API authentication errors often occur when the permission_callback is missing or the nonce cookie is invalid. This Skill provides troubleshooting guidance and anti-patterns to resolve these debugging issues.

Does this Skill provide schema validation patterns for WordPress REST API?

Yes, this Skill provides schema validation patterns for WordPress REST API development. It codifies best practices to ensure robust data integrity and maintainability for endpoints registered in Sage projects.