Skip to content
Back to skills

Abilities Authoring

ASecurity

Creates custom WordPress Abilities for the WP MCP Adapter (WP 6.9+). An Ability is a PHP class extending Roots\AcornAi\Abilities\Ability that exposes a JSON schema and execute() method — auto-discovered by the MCP Adapter and callable via Claude's execute-ability tool. Covers: lando wp acorn make:ability, AbilitiesServiceProvider registration, JSON schema definition, discover-abilities validation. Invoke for: abilities, make ability, custom mcp endpoint, discover-abilities, execute-ability, a...

  • 13 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 11, 2026
toolsphpbash

Works with

  • claude code
  • mcp

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 11, 2026

npx -y skills add hekivo/superpowers-sage --skill abilities-authoring --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Abilities Authoring?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Abilities Authoring
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hekivo-abilities-authoring/badge)](https://www.skillsdirectory.com/skills/hekivo-abilities-authoring)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: superpowers-sage:abilities-authoring
description: >
  Creates custom WordPress Abilities for the WP MCP Adapter (WP 6.9+). An Ability is a PHP
  class extending Roots\AcornAi\Abilities\Ability that exposes a JSON schema and execute()
  method — auto-discovered by the MCP Adapter and callable via Claude's execute-ability tool.
  Covers: lando wp acorn make:ability, AbilitiesServiceProvider registration, JSON schema
  definition, discover-abilities validation. Invoke for: abilities, make ability,
  custom mcp endpoint, discover-abilities, execute-ability, acorn ability,
  abilities-authoring, mcp endpoint, wp ability, make:ability.
---

# abilities-authoring — WordPress MCP Abilities

An Ability exposes a callable MCP endpoint via the WordPress MCP Adapter. Claude calls it via `execute-ability` after `discover-abilities` lists it.

## Anatomy of an Ability

```php
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
    }
}
```

## Creating an Ability

```bash
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.

## Registration

In `app/Providers/AbilitiesServiceProvider.php`:

```php
use App\Abilities\ListProjectsAbility;

public function boot(): void
{
    $this->app->make(AbilityRegistry::class)->register([
        new ListProjectsAbility(),
    ]);
}
```

See [`references/registration.md`](references/registration.md) for full ServiceProvider setup.

## JSON Schema

The `$schema` array follows JSON Schema Draft-07. See [`references/schema.md`](references/schema.md).

## MCP exposure

For an Ability to appear in `discover-abilities`, the MCP Adapter must be running. See [`references/mcp-exposure.md`](references/mcp-exposure.md).

## Common patterns

See [`references/patterns.md`](references/patterns.md) for query, CRUD, search, ACF field groups, and Livewire components patterns.

## Verification

```bash
bash scripts/list-abilities.sh
```

Then in your Claude Code session: call `discover-abilities` — the Ability should appear.

## Failure modes

### Problem: Ability not appearing in `discover-abilities`
- **Cause:** The Ability is not registered in `AbilitiesServiceProvider`, or the service provider is not in `config/app.php` providers array.
- **Fix:** Verify the Ability class is added to `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.

### Problem: `execute()` fails with "schema validation error"
- **Cause:** Input does not match the `$schema` definition. The MCP Adapter validates before calling your method.
- **Fix:** Review the schema properties, required fields, and type constraints. Ensure the input JSON matches enum values, integer ranges, and required field names exactly.

### Problem: Ability returns invalid response (not JSON-serializable)
- **Cause:** The `execute()` method returns an object, resource, or value that cannot be JSON-serialized (e.g., a `WP_Post` object).
- **Fix:** Return plain arrays only. Extract post data with `array_map()` and map each `WP_Post` to an associative array.

## Escalation

- For complex schema validation, consult the JSON Schema Draft-07 reference in `references/schema.md`.
- For ACF integration, see the ACF field groups pattern in `references/patterns.md`.
- If the Ability needs to expose Livewire components or act on multiple post types, see the Livewire pattern in `references/patterns.md`.

Files in this skill

  • SKILL.md3.9 KB
  • references/mcp-exposure.md840 B
  • references/patterns.md1.3 KB
  • references/registration.md783 B
  • references/schema.md796 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.