skills/wp-abilities-api/SKILL.md
Use when working with the WordPress Abilities API (wp_register_ability, wp_register_ability_category, /wp-json/wp-abilities/v1/*, @wordpress/abilities) including defining abilities, categories, meta, REST exposure, and permissions checks for clients.
npx skillsauth add WordPress/agent-skills wp-abilities-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the task involves:
wp-abilities/v1),@wordpress/abilities),wp-project-triage first if you haven’t).Before deciding what to register, read references/domain-vs-projection.md — abilities live at the domain capability layer; MCP / Command Palette / REST exposure is a projection. Registration shape and exposure shape are different decisions, and conflating them forces re-registration every time a consumer's constraints change.
signals.isWpCoreCheckout and versions.wordpress.core.Search for these in the repo:
wp_register_ability(wp_register_ability_category(wp_abilities_api_initwp_abilities_api_categories_initwp-abilities/v1@wordpress/abilitiesIf none exist, decide whether you’re introducing Abilities API fresh (new registrations + client consumption) or only consuming.
If you need a logical grouping, register an ability category early (see references/php-registration.md).
For grouping decisions (how many abilities to register, and where to put filters vs. new ability names), read references/grouping-heuristic.md first — it keeps you from shipping one atomic ability per REST operation.
To avoid drift between the ability and the existing UI / REST code path, see references/shared-core-service.md — abilities, REST handlers, CLI commands, and UI controllers should be thin adapters over a shared service. The reference also covers the metric trap (REST handlers that emit usage telemetry) and the AGENTS.md rule for keeping registrations in sync when underlying code paths change.
For shared helper patterns when multiple execute callbacks delegate to existing REST controllers, see references/plugin-family-patterns.md (identify the shared-API-client vs zero-arg-controllers shape) and references/delegate-helper-pattern.md (one helper shape that works, and when not to use it).
For standardized WP_Error codes that let agents reason about retry vs. escalation, see references/error-code-vocabulary.md.
Implement the ability in PHP registration with:
id (namespaced),label/description,category,meta:
readonly: true when the ability is informational,show_in_rest: true for abilities you want visible to clients.Use the documented init hooks for Abilities API registration so they load at the right time (see references/php-registration.md).
references/rest-api.md).meta.show_in_rest is enabled and you’re querying the right endpoint.@wordpress/abilities APIs for client-side access and checks.wp-project-triage indicates signals.usesAbilitiesApi: true after your change (if applicable).wp-abilities/v1 return your ability and category when expected.meta.show_in_rest,input_schema defaults aren't being applied, pagination key drift between the ability and the backing, or empty()-based ID validation — see references/input-schema-gotchas.md.references/rest-api.mdreferences/php-registration.mddevelopment
Use when the deliverable is WordPress Playground Blueprint JSON or a Blueprint bundle, including creating, editing, reviewing, validating schema keys, choosing steps/resources, and debugging Blueprint files. For only running or sharing a Playground environment, use wp-playground.
tools
Use as the WordPress Playground routing wrapper for ambiguous Playground work, local CLI runs with @wp-playground/cli, playground.wordpress.net share links, browser previews, snapshots, mounts, version switching, and Xdebug. For Blueprint JSON authoring or review, use the blueprint skill directly.
development
Use when developing WordPress block themes: theme.json (global settings/styles), templates and template parts, patterns, style variations, and Site Editor troubleshooting (style hierarchy, overrides, caching).
tools
Use when the user asks about WordPress codebases (plugins, themes, block themes, Gutenberg blocks, WP core checkouts) and you need to quickly classify the repo and route to the correct workflow/skill (blocks, theme.json, REST API, WP-CLI, performance, security, testing, release packaging).