From superpowers-sage
Creates custom MCP Abilities for WordPress, defining PHP classes with JSON schemas and execute() methods that are auto-discovered and callable via Claude's execute-ability tool.
How this skill is triggered — by the user, by Claude, or both
Slash command
/superpowers-sage:abilities-authoringThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
An Ability exposes a callable MCP endpoint via the WordPress MCP Adapter. Claude calls it via `execute-ability` after `discover-abilities` lists it.
An Ability exposes a callable MCP endpoint via the WordPress MCP Adapter. Claude calls it via execute-ability after discover-abilities lists it.
class ListProjectsAbility extends Ability
{
public string $name = 'projects/list';
public string $description = 'Return all published Project CPT posts.';
public array $schema = [ /* JSON Schema for input */ ];
public function execute(array $args): array
{
// returns array — serialized as JSON by the adapter
}
}
lando wp acorn make:ability <Name>
# Example: lando wp acorn make:ability ListProjects
# Creates: app/Abilities/ListProjectsAbility.php
Use templates in assets/ability-*.php.tpl for query, CRUD, and search patterns.
In app/Providers/AbilitiesServiceProvider.php:
use App\Abilities\ListProjectsAbility;
public function boot(): void
{
$this->app->make(AbilityRegistry::class)->register([
new ListProjectsAbility(),
]);
}
See references/registration.md for full ServiceProvider setup.
The $schema array follows JSON Schema Draft-07. See references/schema.md.
For an Ability to appear in discover-abilities, the MCP Adapter must be running. See references/mcp-exposure.md.
See references/patterns.md for query, CRUD, search, ACF field groups, and Livewire components patterns.
bash scripts/list-abilities.sh
Then in your Claude Code session: call discover-abilities — the Ability should appear.
discover-abilitiesAbilitiesServiceProvider, or the service provider is not in config/app.php providers array.AbilityRegistry::register() in the service provider. Check that the provider is listed in config/app.php and is actually being booted. Claude Code caches discover-abilities — restart the editor after registration changes.execute() fails with "schema validation error"$schema definition. The MCP Adapter validates before calling your method.execute() method returns an object, resource, or value that cannot be JSON-serialized (e.g., a WP_Post object).array_map() and map each WP_Post to an associative array.references/schema.md.references/patterns.md.references/patterns.md.npx claudepluginhub hekivo/superpowers-sageGuides WordPress plugin development: architecture, hooks, admin interfaces, REST API, security practices, and WP 7.0 features like Real-Time Collaboration, AI Connectors, Abilities API. Use for custom plugins and extensions.
WordPress capabilities and roles for Sage/Acorn projects — add_role, remove_role, add_cap, current_user_can, map_meta_cap, CPT capabilities, and ACF field role visibility.
Guides modern WordPress plugin development: scaffolding, debugging, testing, and refactoring. Covers WooCommerce, Gutenberg blocks, custom post types, WordPress REST API, hooks, admin pages, WPCS, PHPUnit, Playwright, and wp-scripts.