wp-abilities-api

Register WordPress plugin abilities with JSON Schema contracts and permission callbacks.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/vikingokft/wp-agent-skills --skill wp-abilities-api-vikingokft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wp-abilities-api
Source: https://github.com/vikingokft/wp-agent-skills/tree/main/wordpress/wp-abilities-api
Command: npx skills add https://github.com/vikingokft/wp-agent-skills --skill wp-abilities-api-vikingokft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The wp-abilities-api skill solves the problem of integrating WordPress plugin functionality into a standardized, discoverable “tool surface” that AI agents and external clients can safely invoke with machine-readable schemas.

Core Features & Use Cases

  • Ability registration and contracts: Design reliable wp_register_ability entries with clear label, description, categories, and JSON-Schema-typed input/output so agents choose the right action.
  • Permission-safe execution: Use permission_callback and WP_Ability::execute() patterns to enforce authorization and keep execution gated.
  • Optional REST exposure and JS/AI clients: Decide when to enable meta.show_in_rest so capabilities become callable via the Abilities REST endpoints and/or through @wordpress/abilities, @wordpress/core-abilities, and WP AI Client workflows.

Quick Start

Tell your AI to register a WordPress Abilities API endpoint for my plugin action, with a specific input schema, permission callback, and REST exposure so agents can discover and run it.

Frequently Asked Questions about wp-abilities-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose WordPress plugin actions to AI agents?

Expose WordPress plugin actions to AI agents by registering them through the standardized Abilities API, using wp_register_ability to define JSON Schema contracts for input and output. This creates a discoverable tool surface that AI clients can safely invoke.

How do I add a permission callback to a WordPress REST API endpoint for AI tools?

Add a permission callback to a WordPress REST API endpoint by using the permission_callback rule within the Abilities API registration. This ensures permission-safe execution, gating WP_Ability::execute() patterns so only authorized clients can run the action.

What is the WordPress Abilities API and when do I need it?

The WordPress Abilities API is a standardized registry that exposes plugin operations to AI agents and external tools using JSON Schema contracts. You need it when integrating plugin functionality into a machine-readable, discoverable tool surface for safe client-side invocation.

Does the WordPress Abilities API support client-side invocation through JavaScript?

Yes, the WordPress Abilities API supports client-side invocation through the @wordpress/core-abilities and @wordpress/abilities packages. You can enable meta.show_in_rest to make capabilities callable via Abilities REST endpoints and WP AI Client workflows.

How do I define input and output schemas for a WordPress AI tool integration?

Define input and output schemas for a WordPress AI tool integration by using JSON-Schema-typed parameters within your wp_register_ability entries. This ensures correct schema handling for input normalization and output validation when agents discover and execute the ability.

What are the naming requirements for registering a WordPress ability?

Registering a WordPress ability requires enforcing category prerequisites and using stable namespace and ability naming conventions. Correct schema handling for input normalization and output validation must also be applied to ensure agents choose the right action.