WordPress Agent Skills: How to Use the Official Skills in Claude Code

Cover “Teach the agent WordPress”: a signpost at a fork with arrows to blocks, plugins and tooling icons, the plugins arrow drawn in gold

Quick Summary

  • The official WordPress agent skills live in the WordPress/agent-skills GitHub repository: 20 skills, labeled v1, maintained in the WordPress organization after moving from the now-archived Automattic/agent-skills.
  • For Claude Code, install them with npx skills add WordPress/agent-skills or by cloning the repo and running its build and install scripts. A personal copy in ~/.claude/skills/ wins over a project copy with the same name.
  • Plugins, blocks, block themes, REST and the Abilities API are well covered, but classic PHP themes, ACF and WooCommerce have no dedicated skill, so every AI-written diff still needs a review.

WordPress agent skills are official instructions that teach AI coding assistants like Claude Code to write WordPress code properly. This guide covers what’s in the repository, how to install it, a worked REST example and where the skills stop.

The short version: the official WordPress agent skills live in the WordPress/agent-skills repository: 20 skills, maintained in the WordPress GitHub organization and labeled v1. You install them with npx skills add or by cloning and building, per project or globally. They help most with plugins, blocks, block themes and the REST API. Classic PHP themes get no dedicated skill, and none of it replaces your own review.

What’s in the WordPress agent skills repo

Who maintains it and how mature it is

The project lives at github.com/WordPress/agent-skills under the GPL-2.0-or-later license. Its CODEOWNERS file assigns the repository to a WordPress agent-skills maintainers team. The Make WordPress AI handbook lists it as a project and calls it “the official, shared home” for these instructions.

It started as Automattic/agent-skills in December 2025. That repository is now archived, with a note that all future development happens in the WordPress organization. A WordPress.org News post announced the new home on January 30, 2026, with an openskills install command. The README now uses npx skills add, so check which tool an older tutorial relies on.

The skills were generated with GPT-5.2 Codex from official WordPress and Gutenberg documentation, then reviewed and edited by WordPress contributors. In the README’s words: “This is v1, and skills will improve as the community uses them and contributes fixes.” Also, every skill targets WordPress 7.0+ and PHP 7.4+.

The 20 agent skills in the repo

The README’s table lists 19 skills, but the skills folder holds 20, because wp-patterns has no row. Here’s the full set as of November 2026.

Routing, blocks and themes:

  • wordpress-router: classifies the repo and picks the workflow.
  • wp-project-triage: a script that reports project type, tooling and versions as JSON.
  • wp-block-development: blocks, block.json, attributes, dynamic rendering and deprecations.
  • wp-block-themes: theme.json, templates, template parts and style variations.
  • wp-patterns: creating and reviewing block patterns.
  • wp-interactivity-api: front-end behavior with data-wp-* directives.
  • wpds: WordPress Design System interfaces (needs the WPDS MCP server).

Plugins and APIs:

  • wp-plugin-development: structure, hooks, lifecycle, the Settings API, security and packaging.
  • wp-rest-api: routes, schemas, validation, authentication and responses.
  • wp-plugin-directory-guidelines: the 18 WordPress.org directory guidelines and Plugin Check.
  • wp-abilities-api: registering abilities and exposing them over REST.
  • wp-ability-development: designing and reviewing an ability’s schemas and permissions (added November 5).
  • wp-abilities-audit: proposes ability registrations from a plugin’s REST surface.
  • wp-abilities-verify: checks that abilities behave the way their annotations claim.

Tooling and environments:

  • wp-wpcli-and-ops: WP-CLI, safe search-replace, database work, cron and multisite.
  • wp-performance: backend profiling, slow queries, autoloaded options, object caching and Server-Timing.
  • wp-phpstan: PHPStan setup, baselines and WordPress-specific typing.
  • wp-env: Docker-based local sites with @wordpress/env.
  • wp-playground: WordPress Playground from the CLI or the browser.
  • blueprint: writing and debugging Playground Blueprint JSON.

How to install WordPress agent skills in Claude Code

Both routes put plain folders, each with a SKILL.md, where Claude Code reads them. The WordPress agent skills are installed in my own Claude Code setup, and the README offers these two ways.

Option 1: the skills CLI

The quick start uses npx skills add, from the open skills CLI by Vercel Labs:

Shell
# Install one skill
npx skills add WordPress/agent-skills --skill wp-plugin-development

# See every skill in the repo
npx skills add WordPress/agent-skills --list

# Install several at once
npx skills add WordPress/agent-skills --skill wp-plugin-development wp-abilities-api wp-playground

# Install for your user (all projects) instead of the current project
npx skills add WordPress/agent-skills --skill wp-plugin-development --global

By default the CLI installs into the current project, so your team can commit the skills. Adding --global installs them for your user instead. The CLI supports dozens of agents, so it asks which to target (its README also shows -a claude-code). Later, npx skills update pulls newer versions, which matters at v1.

Option 2: clone and build

Or build from a local clone:

Shell
git clone https://github.com/WordPress/agent-skills.git
cd agent-skills
node shared/scripts/skillpack-build.mjs --clean

# Global: copies every skill to ~/.claude/skills/
node shared/scripts/skillpack-install.mjs --global

# Or only some skills
node shared/scripts/skillpack-install.mjs --global --skills=wp-playground,wp-block-development

# Project: copies the skills into one WordPress repo
node shared/scripts/skillpack-install.mjs --dest=../your-wp-project --targets=codex,vscode,claude,cursor

For a project install, --targets decides which assistants get a copy, and claude writes to .claude/skills/. Add --dry-run to preview. To update, pull the repo and run the build and install steps again.

Project or global, and which copy wins

The README says that when a skill exists in both scopes, the project-level version is used. However, Claude Code’s documentation says the opposite: a personal skill in ~/.claude/skills/ beats a project skill with the same name. So if you install globally and a teammate commits an older copy, Claude Code runs yours. Pick one scope per machine, or keep both copies on the same version.

The router and triage steps run Node scripts, so the agent needs node in its shell.

How the router and triage skills pick a specialist

With the WordPress agent skills installed, Claude Code keeps every skill’s description in context and loads a full skill only when it uses one. The router’s description covers any question about a WordPress codebase. Specialists, however, claim narrower triggers, such as register_rest_route or block.json.

When the router runs, it follows four steps:

  1. Run the triage script, which prints a JSON report.
  2. Read the project kind, tooling, tests and version hints.
  3. Route by project kind and by your prompt’s intent, using a one-page decision tree.
  4. Apply guardrails: confirm unclear versions and prefer the repo’s own build and test commands.

When several kinds match, the decision tree prefers the most specific one, from gutenberg and wp-core down to wp-theme and wp-plugin. Then it routes by keywords. For example, “REST endpoint / register_rest_route / permission_callback” goes to wp-rest-api. Intent wins over project kind, so a REST task inside a full site repo still lands on the REST skill.

Two details matter. First, three routes point at skills that don’t exist yet: build tooling, testing and security are marked “planned”. Security questions therefore fall back on the baseline inside wp-plugin-development. Second, the procedures call scripts by repo-relative paths such as skills/wp-project-triage/scripts/, and the build doesn’t rewrite them. In an installed copy, the agent has to find the script in your skills folder. If triage fails with a missing file, check that first.

You can also skip routing. Type /wp-rest-api to load that skill directly.

A worked example: a REST endpoint in a small plugin

Say you ask Claude Code: “Add an endpoint so editors can save a short internal note on a post.” First, triage reports a plugin. Then “endpoint” routes to wp-rest-api, with wp-plugin-development for security.

What the skills tell the agent

Here’s what the WordPress agent skills say for this task. In short, the wp-rest-api skill tells the agent to:

  • search for existing register_rest_route code first;
  • use a unique vendor/v1 namespace, never wp/*;
  • “Always provide permission_callback”, with __return_true only for public endpoints;
  • check capabilities in that callback, “not just ‘logged in'”;
  • declare typed, validated and sanitized arguments, and never read $_GET or $_POST directly;
  • return data through rest_ensure_response(), and errors as WP_Error with a status;
  • use cookie authentication plus an X-WP-Nonce header (action wp_rest) for calls from wp-admin.

Its schema reference flags a trap that many developers miss. A custom sanitize_callback switches off the built-in schema validation, so you add rest_validate_request_arg to keep it. WordPress core’s source confirms this: the default validate-and-sanitize step only applies when an argument has no sanitize callback. Meanwhile, the plugin skill adds the other half: “Always pair nonces with capability checks”.

The code that follows those rules

Here’s a minimal plugin that does what the skill asks:

PHP
<?php
/**
 * Plugin Name: Post Notes
 * Description: Lets editors save a short internal note on a post through the REST API.
 * Version:     0.1.0
 * Text Domain: post-notes
 */

defined( 'ABSPATH' ) || exit;

add_action( 'rest_api_init', 'pnotes_register_routes' );

function pnotes_register_routes() {
	register_rest_route(
		'pnotes/v1', // Unique vendor/v1 namespace, never wp/*.
		'/posts/(?P<id>\d+)/note',
		array(
			'methods'             => WP_REST_Server::EDITABLE,
			'callback'            => 'pnotes_save_note',
			'permission_callback' => 'pnotes_can_edit_note',
			'args'                => array(
				'id'   => array(
					'type'     => 'integer',
					'required' => true,
				),
				'note' => array(
					'type'              => 'string',
					'required'          => true,
					'maxLength'         => 500,
					// A custom sanitize_callback replaces the default schema check, so keep it explicitly.
					'validate_callback' => 'rest_validate_request_arg',
					'sanitize_callback' => 'sanitize_textarea_field',
				),
			),
		)
	);
}

// Authorization: may this user edit THIS post? Being logged in is not enough.
function pnotes_can_edit_note( WP_REST_Request $request ) {
	$post = get_post( $request['id'] );

	if ( ! $post ) {
		return new WP_Error( 'pnotes_post_not_found', __( 'Post not found.', 'post-notes' ), array( 'status' => 404 ) );
	}

	return current_user_can( 'edit_post', $post->ID );
}

function pnotes_save_note( WP_REST_Request $request ) {
	$post_id = $request['id'];
	$note    = $request['note']; // Already validated and sanitized by the args above.

	update_post_meta( $post_id, '_pnotes_note', $note );

	return rest_ensure_response(
		array(
			'id'   => $post_id,
			'note' => $note,
		)
	);
}

// Admin script that calls the endpoint with cookie auth + the wp_rest nonce.
add_action( 'admin_enqueue_scripts', 'pnotes_enqueue_admin_script' );

function pnotes_enqueue_admin_script() {
	wp_enqueue_script( 'pnotes-admin', plugins_url( 'admin.js', __FILE__ ), array(), '0.1.0', array( 'in_footer' => true ) );
	wp_localize_script(
		'pnotes-admin',
		'pnotesSettings',
		array(
			'root'  => esc_url_raw( rest_url() ),
			'nonce' => wp_create_nonce( 'wp_rest' ),
		)
	);
}

The admin script then sends the nonce with each request:

JavaScript
// admin.js: pnotesSettings comes from wp_localize_script() in the plugin.
fetch( pnotesSettings.root + 'pnotes/v1/posts/42/note', {
	method: 'POST',
	headers: {
		'Content-Type': 'application/json',
		'X-WP-Nonce': pnotesSettings.nonce, // Without it, WordPress treats the request as logged out.
	},
	body: JSON.stringify( { note: 'Check the pricing table before publishing.' } ),
} )
	.then( ( response ) => response.json() )
	.then( ( data ) => console.log( data ) );

What you still decide and test

Notice that the endpoint never calls wp_verify_nonce(). That’s because, for cookie-authenticated REST requests, WordPress checks the wp_rest nonce itself. Without the nonce, the current user becomes 0, even for a logged-in admin. So an agent that forgets the header ships an endpoint that answers 401 to your editors.

Likewise, the capability is your call. Here, edit_post with the post ID means “can edit this post”, which fits a per-post note. Finally, the skill’s verification list asks for proof, so test three cases:

Shell
# Namespace registered: expect 200 and a route list (404 means the route never registered)
curl -s https://example.test/wp-json/pnotes/v1

# No credentials: expect 401 rest_forbidden
curl -i -X POST https://example.test/wp-json/pnotes/v1/posts/42/note -d "note=Hello"

# An editor's application password over HTTPS: expect 200 and the saved note
curl -i -X POST https://example.test/wp-json/pnotes/v1/posts/42/note --user "editor:abcd efgh ijkl mnop qrst uvwx" -d "note=Hello"

Where WordPress agent skills fall short

It’s v1, and it says so

The authorship note admits that the skills “have not (yet) been run across a formal evaluation system, as one does not exist.” The README adds that its evaluation scenarios still need manual runs. It also warns: “Skills will contain errors.”

They do. Until October 2026, wp-performance told agents to run wp doctor check with no arguments, which only prints an error. Pull request #114 eventually fixed it. Versions are another trap. By default, the guidance assumes WordPress 7.0+, so give the agent the real versions for older client sites.

Project types: covered and not covered

Coverage is strongest for block-era work and tooling. Three areas get much less:

  • Classic PHP themes. Triage labels a theme without both theme.json and a templates folder as wp-theme. The decision tree maps that to “classic theme workflows (templates PHP, functions.php, style.css)”, but no skill holds those workflows. Nothing covers the template hierarchy or get_template_part().
  • ACF and WooCommerce. Neither has a skill. Both appear only in passing, for example as PHPStan stubs.
  • Security, testing and build tooling. The router lists dedicated skills for these as planned, not shipped.

That first gap matters to me. In September 2026 I rebuilt this site as a custom classic WordPress theme with ACF Flexible Content. On that kind of project, the WordPress agent skills help through their general parts: plugin security, REST, performance and WP-CLI.

You still review every diff

A skill changes what the agent is told, not what it does. The agent can still skip a step, misread a reference or follow a skill that’s wrong. Skills lower the odds of outdated patterns and missed security checks, but your review catches the rest.

Combine WordPress agent skills with your own project skills

The WordPress agent skills know WordPress, but they don’t know your project. Instead, your prefix, text domain, ACF field groups, build steps and existing hooks belong in your own skills, or in CLAUDE.md for short rules. My guide on writing your first Claude Code skill covers the format.

A few rules keep the two layers from fighting:

  • Use your own names. A project skill called wp-plugin-development would collide with the official one, and Claude Code settles that by location, not quality.
  • Reference instead of copying. Write “follow wp-rest-api, plus these project rules”, then list only the differences.
  • Answer the official skills’ questions once. For instance, wp-plugin-development asks for target WordPress and PHP versions and whether the site is a multisite. Answer that in your project skill.
  • Keep style separate from domain knowledge. Ponytail for Claude Code pushes the agent to write less code. That’s about how much gets written, so it sits beside the WordPress skills.

A review checklist for AI-written WordPress code

Run this on every diff, whether the WordPress agent skills were loaded or not. Items 1 to 7 come from the WordPress developer handbook, and items 8 and 9 from the skills’ own rules.

  1. Input is validated, then sanitized. “Don’t trust any data.” Validate first, then sanitize with the matching function, such as sanitize_text_field(). More in my notes on sanitizing PHP form input.
  2. Output is escaped late. “You always want to escape when you echo, not before.” Match the context with esc_html(), esc_attr(), esc_url() or wp_kses_post() (more on esc_html, esc_attr and esc_url).
  3. State changes carry a nonce. Forms use wp_nonce_field() and check_admin_referer(), AJAX uses check_ajax_referer(), and REST calls send the wp_rest nonce.
  4. State changes check a capability. Nonces “should never be relied on for authentication, authorization, or access control.” Use current_user_can() with the most specific capability.
  5. Globals are prefixed. Functions and classes need a prefix of at least four letters (five recommended) unless they’re namespaced. Global variables, options and transients always need one. Avoid wp_ and leading underscores.
  6. Strings are translatable. The text domain matches the plugin slug and is a literal string. Values go in through sprintf() placeholders, with a translators: comment above.
  7. Assets are enqueued. Use wp_enqueue_script() on wp_enqueue_scripts or admin_enqueue_scripts, never hardcoded tags. Pass PHP data with wp_localize_script().
  8. Code runs on hooks. Avoid heavy side effects at file load, and attach logic to the right action and filter hooks.
  9. SQL uses $wpdb->prepare(). Reject any query built by string concatenation.

The takeaway on WordPress agent skills

The official WordPress agent skills are a sensible default layer for Claude Code. They steer the agent toward current APIs, a security baseline and your repo’s own tooling. Install them in one scope, keep them updated while they’re at v1 and add a project skill for what they can’t know. Then review every diff, especially on classic themes, where the skills say the least. If you’d like a hand with a WordPress build or a review of AI-written plugin code, that’s part of my custom WordPress development work.

Sources

Share on X (opens in a new tab) Share on LinkedIn (opens in a new tab) Share on Facebook (opens in a new tab)

ChatGPT (opens in a new tab) Claude (opens in a new tab) Gemini (opens in a new tab) Perplexity (opens in a new tab) Grok (opens in a new tab)

More Insights

See all articles