All skills
wordpress avatar

/wp-abilities-api

@20324d2 official
by wordpresswordpress/agent-skills2.2k stars
327

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.

Use this Skill: https://skilld.dev/gh/wordpress/agent-skills/wp-abilities-api

This session only. Nothing lands on disk.

referencesrest-api.md

≈95 tokens on demand. Your agent reads this file only when SKILL.md points to it.

REST API quick guide (wp-abilities/v1)

The Abilities API exposes endpoints under the REST namespace:

  • wp-abilities/v1/abilities
  • wp-abilities/v1/categories

Debug checklist:

  • Confirm the route exists under wp-json/wp-abilities/v1/....
  • Verify the ability/category shows in REST responses.
  • If missing, confirm meta.show_in_rest is enabled for that ability.

Source: SKILL.md on GitHub

1 warning17d5 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    The skill provides comprehensive instructions for implementing and using the WordPress Abilities API. It includes detailed architectural guidance, common development pitfalls, and standardized error handling. The security analysis identifies a low-level risk of indirect prompt injection common to tools that process external codebases.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer7mo

    3/3 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 20324d2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 3 months ago
Other metadata
compatibility
Targets WordPress 7.0+ (PHP 7.4.0+). Filesystem-based agent with bash + node. Some workflows require WP-CLI.
  • wordpress
  • abilities-api
  • php
  • rest-api
  • capabilities
  • permissions
  • javascript
  • wp-cli

README badge

README badge for wordpress/agent-skills/wp-abilities-api

Registers and exposes WordPress abilities (discrete capability units) via the WordPress Abilities API in PHP, then consumes them in JavaScript clients using @wordpress/abilities. Targets WordPress 6.9+ and covers ability registration, REST exposure, category grouping, and permission checks across domain and projection layers.

Generated from the current SKILL.md.

What WordPress versions does this skill support?
WordPress 6.9+ with PHP 7.2.24+. For earlier versions, you may need the separate Abilities API plugin or package instead of relying on core.
Does this skill help with REST exposure of abilities?
Yes. The skill covers exposing abilities to clients via the wp-abilities/v1 REST endpoints by setting `meta.show_in_rest: true` during registration and verifying endpoint responses.
Can I use this skill to consume abilities on the client side?
Yes. The skill covers consuming abilities in JavaScript using the @wordpress/abilities package and ensuring the build tooling includes and bundles that dependency.
What should I read before registering abilities?
Read references/domain-vs-projection.md to understand that abilities live at the domain capability layer, separate from their REST/MCP/Command Palette projection—registration shape and exposure shape are different decisions.
How do I debug an ability that doesn't appear in REST or to clients?
Check that registration code is running on the correct hook, verify `meta.show_in_rest` is enabled, confirm category/ID match, and rule out object/page cache masking changes.

Generated from the current SKILL.md. These answers refresh after source changes.