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.mdtools
Verify a WordPress plugin's Abilities API registrations: enumerate abilities, check that callback behavior matches each annotation's claim (the adversarial readonly-but-writes detection), validate permissions and schemas, and validate audit documents produced by wp-abilities-audit.
tools
Audit a WordPress plugin's REST surface and produce a standardized audit document proposing Abilities API registrations. Produces a markdown doc with a YAML schema and prose sections that humans and agents can both consume when planning a registration rollout. Works on any WP plugin.
tools
Use when reviewing WordPress plugins for GPL compliance, checking license headers or compatibility, evaluating upsell/freemium/trialware patterns, validating plugin naming or trademark rules, checking plugin slugs, understanding why a plugin was rejected from WordPress.org, or answering any question about the 18 WordPress.org Plugin Directory guidelines — even if the user doesn't mention 'guidelines' explicitly.
tools
Use when creating, editing, or reviewing WordPress Playground blueprint JSON files. Triggers on mentions of blueprints, playground configuration, or requests to set up a WordPress demo environment.