with one click
build-ability
Generate a complete ability through an interview-driven workflow
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Generate a complete ability through an interview-driven workflow
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
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.
Spin up a WordPress Playground instance with the plugin mounted and activated
Create a GitHub issue via interview — asks clarifying questions, inspects codebase, and files a well-structured issue
Scaffold a new ability with PHP backend, JS chat interface, and test case
Create a pull request with proper branch, description, and labels
Version bump, commit, push, and create GitHub release with notes
| name | build-ability |
| description | Generate a complete ability through an interview-driven workflow |
| argument-hint | <ability-name> |
| allowed-tools | Bash(npm *), Bash(npx *), Bash(composer *), Read, Write, Edit, Grep, Glob |
Generate a complete WP-Agentic-Admin ability (PHP backend + JS frontend + index + tests) through an interview-driven workflow. If the user provides an ability name with the command (e.g., /build-ability theme-list), use it directly.
If no ability name was provided, ask for it (kebab-case format).
Then ask these questions (batch into 1-2 messages, skip any already answered):
core/* abilities)Derive from the answers:
readonly, destructive, idempotent annotationsrequiresConfirmation is neededparseIntent is needed (if input comes from natural language)permission_callback capability (default: manage_options)Before generating code, read these files to match project conventions:
src/extensions/abilities/plugin-list.js + includes/abilities/plugin-list.phpsrc/extensions/abilities/cache-flush.js + includes/abilities/cache-flush.phpsrc/extensions/abilities/revision-cleanup.js + includes/abilities/revision-cleanup.phpsrc/extensions/abilities/revision-cleanup.jssrc/extensions/abilities/plugin-activate.js + src/extensions/abilities/shared/plugin-helpers.jssrc/extensions/abilities/index.js — to see current registration patterntests/abilities/core-abilities.test.js — to see test case formatAlso read the full patterns reference: references/ability-patterns.md
Create files in this order:
File: includes/abilities/{name}.php
Rules:
wp_agentic_admin_register_{snake} and wp_agentic_admin_execute_{snake}permission_callbackinput_schema with top-level default for optional/no-input abilitiesoutput_schemaannotations matching the operation typearray( 'success' => bool, 'message' => string, ... )array( 'key' => 'value' ) not array('key'=>'value')File: src/extensions/abilities/{name}.js
Rules:
register{PascalCase}label and description must be string literals (test loader uses regex)label: action-oriented, for LLM system prompt (e.g., "List installed plugins with status")description: one sentence under 30 words, explains when to use this toolkeywords: array of lowercase trigger wordssummarize(): human-readable summary, handle error case (!result.success)interpretResult(): plain-English for LLM, concise single-line format preferredexecute(): call executeAbility() with the ability ID and paramsrequiresConfirmation: true for destructive, false otherwiseregisterAbility( 'id', { ... } ) not registerAbility('id', {...})File: src/extensions/abilities/index.js
Add:
registerAllAbilities()File: tests/abilities/core-abilities.test.js
Add 2-3 test cases with different phrasings to the tests array.
If the ability belongs to a family with existing helpers, import and use them. If creating a new family, create:
includes/abilities/shared/{domain}-helpers.phpsrc/extensions/abilities/shared/{domain}-helpers.jsRun these commands:
npx wp-scripts lint-js src/extensions/abilities/{name}.js
composer lint -- includes/abilities/{name}.php
npm run build
Fix any lint errors before finishing.
Print a summary:
npm run test:abilities -- --file tests/abilities/core-abilities.test.js