wp-abilities-api

Register WordPress abilities and categories for REST exposure via PHP hooks.

12|9|Updated Oct 23, 2025
One-click install
npx skills add https://github.com/jnealey88/designsetgo --skill wp-abilities-api-jnealey88
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: wp-abilities-api
Source: https://github.com/jnealey88/designsetgo/tree/main/.claude/skills/wp-abilities-api
Command: npx skills add https://github.com/jnealey88/designsetgo --skill wp-abilities-api-jnealey88

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

WordPress Abilities lets developers define capabilities, expose them via REST, and consume them from client code in a consistent, secure way. This skill provides a structured approach to registering abilities and categories, exposing them via REST, and integrating with JavaScript workflows using the Abilities API.

Core Features & Use Cases

  • Register categories and abilities in PHP using the appropriate hooks (wp_abilities_api_categories_init, wp_abilities_api_init).
  • Expose registered abilities to REST under wp-abilities/v1 with show_in_rest enabled, enabling discovery and programmatic access.
  • Consume abilities from JavaScript using @wordpress/abilities for runtime checks and UI gating.
  • Diagnose visibility or permission issues when a client cannot see an ability or a REST endpoint returns not found.

Quick Start

Register a new ability in PHP using wp_register_ability and expose it via REST using the Abilities API.

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 via REST?▼

Register abilities and categories using the wp_abilities_api_categories_init and wp_abilities_api_init hooks in PHP. Set show_in_rest to true to expose them under the wp-abilities/v1 REST endpoint for client discovery.

What is the WordPress Abilities API for?▼

The WordPress Abilities API lets developers define capabilities in PHP, expose them via REST, and consume them from JavaScript. It provides a consistent, secure way to handle runtime permission checks and UI gating in client code.

Can I consume registered WordPress abilities from JavaScript?▼

Yes, registered WordPress abilities can be consumed from JavaScript using the @wordpress/abilities package for runtime permission checks and UI gating, accessing them via the wp-abilities/v1 REST endpoint.

Does the WordPress Abilities API require a specific WordPress version?▼

The WordPress Abilities API requires WordPress 6.9 or higher for PHP-based plugins and themes. This version provides the necessary wp_abilities_api_init hooks for proper category and ability registration.

Why does my REST client return not found when querying WordPress abilities?▼

A REST endpoint returns not found for WordPress abilities when show_in_rest is false or permission handling is misconfigured. Verify registration via wp_register_ability and ensure proper permission callbacks are applied to expose visibility.