wp-abilities-api

Register WordPress abilities and categories and expose them via REST API.

27|1|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/dr-robert-li/cowork-wordpress-expert --skill wp-abilities-api-dr-robert-li
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wp-abilities-api
Source: https://github.com/dr-robert-li/cowork-wordpress-expert/tree/main/references/wp-abilities-api
Command: npx skills add https://github.com/dr-robert-li/cowork-wordpress-expert --skill wp-abilities-api-dr-robert-li

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of defining, exposing, and managing abilities and their categories within WordPress, ensuring consistent permissions and client-side visibility.

Core Features & Use Cases

  • Ability Registration: Define custom abilities and categories in PHP.
  • REST Exposure: Ensure abilities are correctly exposed via the WordPress REST API.
  • Client-Side Consumption: Facilitate the use of abilities in JavaScript applications.
  • Use Case: Troubleshoot why a specific user role cannot access a certain feature in the WordPress admin by verifying the ability registration and REST API endpoint.

Quick Start

Use the wp-abilities-api skill to register a new ability named 'edit_custom_posts' within the 'content' category.

Frequently Asked Questions about wp-abilities-api

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

FAQPage Schema
How do I expose custom WordPress permissions via the REST API for JavaScript?

You can register custom abilities in PHP and expose them via the WordPress REST API, allowing your JavaScript applications to consume and verify permissions client-side. This ensures consistent visibility across the admin interface.

Does the WordPress Abilities API require a specific PHP version?

Yes, using the WordPress Abilities API requires PHP 7.2.24 or higher. It targets WordPress 6.9+ and supports specific workflows using WP-CLI to manage ability registration and REST exposure effectively.

How do I register a custom ability in a specific category using PHP?

To register a custom ability in PHP, define the ability name and specify its category, such as 'content'. This process streamlines permissions management by grouping related capabilities together within the WordPress admin.

Why can't a specific user role access a feature in the WordPress admin?

Troubleshooting role access involves verifying the ability registration in PHP and checking the corresponding REST API endpoint. Ensuring the ability is properly defined and exposed resolves client-side visibility issues.

Can I manage WordPress abilities and permissions using WP-CLI?

Yes, you can use WP-CLI for specific workflows to manage WordPress abilities and permissions. This approach allows you to automate the registration of abilities and categories alongside your standard REST API exposure tasks.