wp-abilities-apilisted
Install: claude install-skill aiskillstore/marketplace
# WP Abilities API
## When to use
Use this skill when the task involves:
- registering abilities or ability categories in PHP,
- exposing abilities to clients via REST (`wp-abilities/v1`),
- consuming abilities in JS (notably `@wordpress/abilities`),
- diagnosing “ability doesn’t show up” / “client can’t see ability” / “REST returns empty”.
## Inputs required
- Repo root (run `wp-project-triage` first if you haven’t).
- Target WordPress version(s) and whether this is WP core or a plugin/theme.
- Where the change should live (plugin vs theme vs mu-plugin).
## Procedure
### 1) Confirm availability and version constraints
- If this is WP core work, check `signals.isWpCoreCheckout` and `versions.wordpress.core`.
- If the project targets WP < 6.9, you may need the Abilities API plugin/package rather than relying on core.
### 2) Find existing Abilities usage
Search for these in the repo:
- `wp_register_ability(`
- `wp_register_ability_category(`
- `wp_abilities_api_init`
- `wp_abilities_api_categories_init`
- `wp-abilities/v1`
- `@wordpress/abilities`
If none exist, decide whether you’re introducing Abilities API fresh (new registrations + client consumption) or only consuming.
### 3) Register categories (optional)
If you need a logical grouping, register an ability category early (see `references/php-registration.md`).
### 4) Register abilities (PHP)
Implement the ability in PHP registration with:
- stable `id` (namespaced),
- `label`/`description`,
- `category`,