Agent skill

Wordpress Ability

by wp-media in wp-media/wp-rocket

A skill your agent uses when adding or modifying WordPress abilities

GPL-2.0Auto-check passedTesting & QA

Install Wordpress Ability

skills CLI
$ npx skills add wp-media/wp-rocket --skill wordpress-ability -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install wp-media/wp-rocket wordpress-ability --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/wp-media/wp-rocket.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/wordpress-ability .claude/skills/wordpress-ability && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
wordpress-ability
GitHub stars
767
Token cost
~911 tokens
SKILL.md length
480 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
GPL-2.0

At a glance

A skill your agent uses when adding or modifying WordPress abilities

  • Modifying WordPress abilities
  • SKILL.md covers Unit tests and Integration tests
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Wordpress Ability is an agent skill from wp-media/wp-rocket. Use this skill when adding or modifying WordPress abilities

Its SKILL.md is about 910 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA. It works with WordPress. The repository describes itself as: Performance optimization plugin for WordPress. The licence is GPL-2.0.

When your agent uses it

  • Modifying WordPress abilities

Example prompts

  • “/wordpress-ability”

What it can do on your machine

Read from SKILL.md and the folder at commit 3a96b66. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are php).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Wordpress Ability loads about 911 tokens when it runs. Until then it costs about 19 tokens; SKILL.md has 480 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~19
When it runs · the whole SKILL.md, loaded when a task matches
~911

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from wp-media/wp-rocket at commit 3a96b66, republished under its GPL-2.0 licence (© wp-media). 480 words, ~911 tokens.

Download SKILL.mdSave it as .claude/skills/wordpress-ability/SKILL.md (or your agent's skills folder).
name
wordpress-ability
description
Use this skill when adding or modifying WordPress abilities

WordPress ability core functions

  • wp_register_ability( string $name, array $args ) to register a new ability
  • wp_register_ability_category( string $slug, array $args ) to register a new ability category

Always check if the function exists before calling it, to ensure compatibility with WordPress versions prior to 6.9:

php
if ( ! function_exists( 'wp_register_ability' ) ) {
    return;
}

Adding a new ability

To add a new ability, follow these steps:

  • One ability = one class implementing AbilitiesInterface
  • Place the class adjacent to the feature it belongs to
  • Register the ability class in the feature's ServiceProvider
  • Register the ability in the related subscriber, using the wp_abilities_api_init hook

An ability name must be unique and follow the format wp-rocket/ability-name, where wp-rocket is the vendor name and ability-name is a descriptive name for the ability. Use hyphens to separate words in the ability name.

The check_permissions()method should always verify against the current user capabilities, using current_user_can( 'rocket_manage_options ) by default, to ensure that only authorized users can execute the ability, except explicitly required otherwise.

An ability must be associated to an ability category. If the category doesn't exist yet, register a new one in the related subscriber using the wp_abilities_api_categories_init hook.

Make the ability available to the REST API and the MCP by adding meta.show_in_rest=true and meta.mcp.public=true when registering the ability, unless explicitly required otherwise.

Annotations should be added to the meta field when registering the ability, as an array of key-value pairs:

  • readonly: true or false, to indicate if the ability doesn't modify data
  • destructive: true or false, to indicate if the ability may delete/destroy data
  • idempotent: true or false, to indicate Same input → same output

An example of an ability class can be found in the /inc/Engine/Abilities/Options/GetOptions.php file.

Show full SKILL.md (210 more words)Show less

Input and Output Schema

If an ability requires input parameters, the parameters of the execute() method should always match the input schema defined when registering the ability.

The return value of the execute() method of an ability should always match the output schema defined when registering the ability.

Testing

Unit tests

Test only the execute() method of the ability class, which contains the logic to perform the action associated with the ability. Mock any dependencies and assert that the method behaves as expected under different conditions.

An example of unit tests for an ability class can be found in the /tests/Unit/inc/Engine/Abilities/Options/GetOptions/ExecuteTest.php file.

Integration tests

Check for WordPress version compatibility, abilities are available starting WordPress 6.9. Mark skip test if version under test is lower than 6.9.

Set up user to ensure ability permissions are correctly applied. Add scenario where user has the ability and another where they don't, and assert that the expected outcomes occur in both cases.

Test ability execution output by getting the ability WP_Ability object using wp_get_ability( $ability_name ) and calling the execute() method. Assert that the output is correct based on the input parameters and the expected behavior of the ability.

An example of integration tests for an ability class can be found in the /tests/Integration/inc/Engine/Abilities/Options/GetOptions/RegisterGetOptionsAbilityTest.php file.

© wp-media, GPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/wordpress-ability of wp-media/wp-rocket.

Open the folder on GitHubat commit 3a96b66

Compare with similar skills

Wordpress Ability next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Wordpress Ability compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Wordpress Ability this skillwp-media/wp-rocket767—~911Automated safety check: PassGPL-2.0
Populate Logbonny/WordPress-Simple-History317—~1.2kAutomated safety check: NotesNone
Wp Test Strategyjorgerosal/wordpress-skills100—~974Automated safety check: PassMIT
Testingbonny/WordPress-Simple-History317—~5kAutomated safety check: NotesNone
Wp Test Strategyjorgerosal/wordpress-skills100—~280Automated safety check: PassMIT
WooCommerce Dev Cyclewoocommerce/woocommerce11k3 repos~431Automated safety check: PassCustom licence

Similar skills

  • Populate Log

    bonny/WordPress-Simple-History

    Populates the event log with test data via WP-CLI. An agent skill from bonny/WordPress-Simple-History.

    317 GitHub stars~1.2k tokensUpdated 3 days ago
    Testing & QAAuto-check: notes
  • Wp Test Strategy

    jorgerosal/wordpress-skills

    WordPress testing strategy and review guidance. An agent skill from jorgerosal/wordpress-skills.

    100 GitHub stars~974 tokensUpdated 4 mo ago
    Testing & QAAuto-check passed
  • Testing

    bonny/WordPress-Simple-History

    Guidance for writing and running tests in Simple History, including the Premium add-on.

    317 GitHub stars~5k tokensUpdated 3 days ago
    Testing & QAAuto-check: notes
  • Wp Test Strategy

    jorgerosal/wordpress-skills

    WordPress test strategy guidance for Codex. An agent skill from jorgerosal/wordpress-skills.

    100 GitHub stars~280 tokensUpdated 4 mo ago
    Testing & QAAuto-check passed
  • WooCommerce Dev Cycle

    woocommerce/woocommerce

    Workflow for WooCommerce development: run PHP and JavaScript tests, lint and fix code style on the current branch, and follow guides for i18n and markdown.

    11k GitHub starsUsed in 3 repos~431 tokens
    DevelopmentAuto-check passed
  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed

More from wp-media/wp-rocket

All 15 skills in this repo
  • Knowledge Graph

    wp-media/wp-rocket

    Read and refresh wp-rocket's pre-built dependency graph at .claude/graph/dependency-graph.json.

    767 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Wordpress Compliance

    wp-media/wp-rocket

    A skill your agent uses when modifying templates, admin UI, output, hooks, plugin metadata, sanitization, escaping, or any code that must remain compliant with WordPress.org and repository PHPCS…

    767 GitHub stars~809 tokensUpdated yesterday
    Auto-check passed
  • Wp Rocket Architecture

    wp-media/wp-rocket

    A skill your agent uses when changing service structure, Subscribers, ServiceProviders, Container wiring, bootstrapping, Context classes, or any code that may affect the core caching engine in WP…

    767 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Challenge

    wp-media/wp-rocket

    Adversarially review a grooming spec before implementation starts.

    767 GitHub stars~674 tokensUpdated yesterday
    Auto-check passed
  • Compliance

    wp-media/wp-rocket

    Check a change against WordPress.org plugin rules and PHPCS standards.

    767 GitHub stars~551 tokensUpdated yesterday
    Auto-check passed
  • Docs

    wp-media/wp-rocket

    Update developer-facing documentation to reflect code changes on the current branch.

    767 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Wordpress Ability

What does Wordpress Ability do?

A skill your agent uses when adding or modifying WordPress abilities. Wordpress Ability is an agent skill from wp-media/wp-rocket.

When should I use Wordpress Ability?

Wordpress Ability fits situations like: modifying WordPress abilities.

How do I install Wordpress Ability in Claude Code?

Run `npx skills add wp-media/wp-rocket --skill wordpress-ability -a claude-code`. Or copy the skill folder (.claude/skills/wordpress-ability in wp-media/wp-rocket) into .claude/skills/wordpress-ability in your project. Claude Code loads it when a task matches its description.

How do I install Wordpress Ability in Codex?

Run `npx skills add wp-media/wp-rocket --skill wordpress-ability -a codex`. Or copy the skill folder (.claude/skills/wordpress-ability in wp-media/wp-rocket) into .agents/skills/wordpress-ability in your project. Codex loads it when a task matches its description.

Can I use Wordpress Ability in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add wp-media/wp-rocket --skill wordpress-ability -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/wordpress-ability, .gemini/skills/wordpress-ability, .github/skills/wordpress-ability and .opencode/skills/wordpress-ability in your project.

What does Wordpress Ability need to run?

SKILL.md names no scripts, command-line tools or credentials: Wordpress Ability is instructions for the agent only.

Does Wordpress Ability access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Wordpress Ability safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Wordpress Ability use?

Wordpress Ability is published under the GPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Wordpress Ability use?

About 911 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Wordpress Ability?

Skills that share tags, products or a category with Wordpress Ability: Populate Log (bonny/WordPress-Simple-History, 317 stars), Wp Test Strategy (jorgerosal/wordpress-skills, 100 stars), Testing (bonny/WordPress-Simple-History, 317 stars) and Wp Test Strategy (jorgerosal/wordpress-skills, 100 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Wordpress Ability?

wp-media (a GitHub organization) maintains it in wp-media/wp-rocket, which has 767 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 6, 2026.

Source: wp-media/wp-rocket on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.