# wp-abilities-api

A skill for WordPress Abilities API work: registering abilities and categories in PHP, exposing them over REST, reading them in JS. Useful when a client can't see an ability.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 4300 installs · ★ 2298
- Author: WordPress
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/WordPress/agent-skills/tree/HEAD/skills/wp-abilities-api/SKILL.md
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/skills/wp-abilities-api

## What it does

The skill walks an agent through Abilities API work in order. It confirms the target WordPress version, greps the repo for `wp_register_ability(`, `wp_register_ability_category(` and the init hooks, then registers a category and the ability itself with a stable `id`, label, description and the `show_in_rest` flag.

Reference files carry the detail it points to along the way: `references/php-registration.md` for hooks and meta, `references/rest-api.md` for endpoints, `references/grouping-heuristic.md` for how many abilities to actually ship, plus notes on shared services, delegate helpers and a vocabulary of `WP_Error` codes. `domain-vs-projection.md` makes the case that registration and exposure are separate decisions, so a change in what a consumer needs doesn't force a re-registration.

It targets WordPress 7.0+ on PHP 7.4.0+. The agent needs bash and node, and some workflows lean on WP-CLI. On a project below 6.9 the core functions aren't there, so you'll need the Abilities API plugin or package instead. Worth checking the version before you start.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add WordPress/agent-skills --skill wp-abilities-api -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/wp-abilities-api/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/wp-abilities-api/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add WordPress/agent-skills --skill wp-abilities-api -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/wp-abilities-api/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add WordPress/agent-skills --skill wp-abilities-api -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/wp-abilities-api/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install WordPress/agent-skills wp-abilities-api
```

2. **Manually: put the files in place**
- File: `.github/skills/wp-abilities-api/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add WordPress/agent-skills --skill wp-abilities-api -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/WordPress/agent-skills --path skills/wp-abilities-api
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/wp-abilities-api/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add WordPress/agent-skills --skill wp-abilities-api -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/WordPress/agent-skills/tree/HEAD/skills/wp-abilities-api/SKILL.md

## When to use it
- register an ability in PHP without losing `show_in_rest`
- split abilities into categories instead of one flat list
- debug an ability that never shows up in `wp-abilities/v1`
- bundle `@wordpress/abilities` on the client side
- pick `WP_Error` codes an agent can act on

## Example prompts
- Register a `vibe/get-post-summary` ability with `show_in_rest: true` so the client can reach it over `wp-abilities/v1`.
- The REST endpoint returns nothing even though registration runs. Check the init hook and `meta.show_in_rest`.
- Move client-side ability access to `@wordpress/abilities` and confirm the dependency gets bundled.

## Similar
- [wordpress-pro](https://affpapa.org/en/nevibecode/skills/wordpress-pro.md) — skill · 9700 installs
- [wordpress-advanced-architecture](https://affpapa.org/en/nevibecode/skills/wordpress-advanced-architecture.md) — skill · 441 installs
- [wordpress-setup](https://affpapa.org/en/nevibecode/skills/wordpress-setup.md) — skill · 1500 installs
- [laravel-api-tool-kit](https://affpapa.org/en/nevibecode/plugins/laravel-api-tool-kit.md) — plugin · ★ 533
- [woocommerce-dev-cycle](https://affpapa.org/en/nevibecode/skills/woocommerce-dev-cycle.md) — skill · 361 installs
- [wordpress-elementor](https://affpapa.org/en/nevibecode/skills/wordpress-elementor.md) — skill · 2900 installs

From the same set: [wordpress/agent-skills](https://affpapa.org/en/nevibecode/by/wordpress/agent-skills.md) — 19 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
