superpowers-sage:wp-capabilities

Manage WordPress roles and capabilities in Sage/Acorn projects.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

WordPress authorization and role-based access control in Sage/Acorn projects are complex without a centralized framework. This Skill provides clear patterns for managing roles, capabilities, meta capabilities, and the mapping between WordPress permissions and Laravel-style Gates and Policies.

Core Features & Use Cases

  • Manage roles and capabilities with add_role/add_cap and map_meta_cap for granular control.
  • Integrate with Sage/Acorn workflows, REST API permission callbacks, and JWT middleware guards.
  • Use Gates/Policies to authorize actions across admin dashboards and custom post types.

Quick Start

Define a custom role, grant its capabilities, and verify access in your Sage/Acorn project.

Frequently Asked Questions about superpowers-sage:wp-capabilities

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

FAQPage Schema
How do I manage WordPress roles and capabilities in a Sage theme?

Managing WordPress roles and capabilities in Sage requires mapping permissions using add_role, add_cap, and map_meta_cap. This approach provides granular access control across admin dashboards and custom post types within Acorn projects.

Can I use Laravel Gates and Policies for WordPress authorization in Acorn?

Yes, Laravel-style Gates and Policies can authorize actions in WordPress via Acorn. This pattern bridges WordPress capabilities with structured authorization, enforcing fine-grained access control for REST API endpoints and admin menus.

What is the best way to secure REST API endpoints with JWT in WordPress?

Securing WordPress REST API endpoints with JWT involves applying middleware guards and permission callbacks. This restricts access based on user capabilities, ensuring authenticated requests are validated against custom role definitions.

How does map_meta_cap work for custom post type permissions?

The map_meta_cap function maps meta capabilities to primitive capabilities, granting granular control over custom post types. It translates requested actions into core WordPress permissions that registered roles must possess to proceed.

Do I need custom roles for a Sage and Acorn project?

Custom roles in Sage and Acorn projects are necessary when default WordPress roles lack the required granularity. Registering custom capabilities ensures users only access specific admin dashboards and authorized REST endpoints.