wp-abilities-api

Register WordPress Abilities and expose them via REST endpoints.

14|1|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/wpgaurav/WordPress-skills --skill wp-abilities-api-wpgaurav
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wp-abilities-api
Source: https://github.com/wpgaurav/WordPress-skills/tree/main/skills/wordpress/wp-abilities-api
Command: npx skills add https://github.com/wpgaurav/WordPress-skills --skill wp-abilities-api-wpgaurav

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Registering WordPress Abilities and exposing them via REST can be error-prone and require careful coordination between PHP backends and JS clients.

Core Features & Use Cases

  • Centralized registration of abilities and categories in PHP with proper metadata (id, label, category, meta, and show_in_rest).
  • Exposing abilities to clients via REST under wp-abilities/v1 and consuming them with @wordpress/abilities.
  • Quick diagnosis of visibility issues such as missing abilities in REST or client-side gating.

Quick Start

Provide a PHP registration snippet that defines a new ability with a stable id, label, category, and REST exposure, then verify the endpoints exist.

Frequently Asked Questions about wp-abilities-api

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

FAQPage Schema
How do I register WordPress abilities and expose them through the REST API?

To register WordPress abilities, you define their id, label, category, and meta in PHP, then enable show_in_rest to expose them via the wp-abilities/v1 REST endpoints for client-side consumption.

What is the WordPress Abilities API and when do I need it for plugin development?

The WordPress Abilities API provides centralized registration for abilities and categories in PHP, exposing them via REST for client-side gating. You need it when coordinating permission checks between PHP backends and JS clients.

Why are my registered WordPress abilities not showing up in the REST API response?

Abilities missing from the REST API response typically lack proper show_in_rest exposure or correct initialization hooks. Centralized PHP registration with proper metadata ensures WordPress abilities appear under the wp-abilities/v1 routes.

Can I use the @wordpress/abilities package with my custom PHP plugin endpoints?

Yes, the @wordpress/abilities package consumes abilities exposed by your PHP plugin. You must register abilities with show_in_rest enabled to make them available at the wp-abilities/v1 REST routes for JS client consumption.

Does registering WordPress abilities require specific metadata fields for REST exposure?

Registering WordPress abilities requires defining a stable id, label, category, and meta. Enabling show_in_rest in your PHP registration ensures the ability is properly exposed via the wp-abilities/v1 REST endpoints.

What's the best way to structure WordPress abilities registration for PHP and JS coordination?

The best way to coordinate abilities registration is using a centralized PHP approach that defines id, label, category, and meta, then exposes them via REST endpoints for seamless @wordpress/abilities client consumption.