Challenges of AI-Assisted WordPress Development
WordPress powers over 60% of the global CMS market, with a vast ecosystem of plugins and themes. However, when using AI coding assistants like Claude Code, Cursor, or GitHub Copilot for WordPress development, developers often face significant pain points. Generated code frequently uses outdated APIs, lacks security checks, fails to follow WordPress coding standards, and often produces errors when working with the Gutenberg block editor.
General-purpose AI models lack deep understanding of WordPress-specific mechanisms like the hook system, REST API design, and block architecture. This forces developers to spend excessive time explaining context and correcting code. To address this, the WordPress project has introduced the official agent-skills package.
What is agent-skills?
agent-skills is an official, open-source set of AI instructions and skill packs from WordPress. It aims to directly "inject" WordPress best practices, development standards, and security guidelines into AI assistants. By configuring these skill packs, AI can automatically generate code that adheres to WordPress 6.9+ standards, significantly improving development efficiency and code quality.
Core Skill Packs Overview
The agent-skills package includes 13 specialized skill packs covering core WordPress development scenarios. Here are the main ones:
| Skill Name | Description |
|---|---|
| wordpress-router | Automatically identifies repository type (theme, plugin, block) and routes tasks to the appropriate workflow. |
| wp-block-development | Guides Gutenberg block development, including block.json configuration, attribute definition, render logic, and deprecation handling. |
| wp-plugin-development | Standardizes plugin architecture, hook usage, Settings API, and security checks. |
| wp-rest-api | Designs REST API routes, endpoints, data schemas, and authentication. |
| wp-performance | Performance analysis, caching strategies, database query optimization, and Server-Timing integration. |
| wp-interactivity-api | Handles frontend interactivity using data-wp-* directives and stores. |
| wp-phpstan | Provides PHPStan static analysis configuration and WordPress-specific type checking. |
| wp-playground | Leverages WordPress Playground to quickly set up an instant local environment. |
Installation and Configuration Guide
agent-skills supports various AI tools, including Claude Code, Cursor, and GitHub Copilot. The installation process involves two main phases: building and deploying.
1. Clone and Build
First, clone the project from GitHub and build the skill packs:
git clone https://github.com/WordPress/agent-skills.git
cd agent-skills
node shared/scripts/skillpack-build.mjs --clean
2. Global Installation (Recommended for Claude Code)
Run the following command to install skill packs to a global directory, which Claude Code will automatically discover:
node shared/scripts/skillpack-install.mjs --global
The default installation path is ~/.claude/skills/. To install only specific skills, use the --skills parameter:
node shared/scripts/skillpack-install.mjs --global --skills=wp-playground,wp-block-development
3. Project-Level Installation (Cursor, Copilot, etc.)
To integrate skill packs into a specific project for use with Cursor or VS Code/Copilot, run:
node shared/scripts/skillpack-install.mjs --dest=../your-wp-project --targets=codex,vscode,claude,cursor
This copies the skill packs to the following corresponding directories in your project:
.codex/skills/(OpenAI Codex).github/skills/(VS Code / GitHub Copilot).claude/skills/(Claude Code project-level).cursor/skills/(Cursor project-level)
4. Cursor Global Installation
For a global installation for Cursor:
node shared/scripts/skillpack-install.mjs --targets=cursor-global
5. Installation Command Reference
node shared/scripts/skillpack-install.mjs --dest= [options]
Options:
--dest= Destination repo root (required, unless using --global)
--from= Source directory (default: dist)
--targets= Comma-separated targets: codex, vscode, claude, claude-global, cursor, cursor-global (default: codex,vscode)
--skills= Comma-separated skill names to install (default: all)
--mode= 'replace' (default) or 'merge'
--global Shorthand for --targets=claude-global (installs to ~/.claude/skills)
--dry-run Show what would be installed without making changes
--list List available skills and exit
Targets:
codex Install to /.codex/skills/
vscode Install to /.github/skills/
claude Install to /.claude/skills/ (project-level)
claude-global Install to ~/.claude/skills/ (user-level, ignores --dest)
cursor Install to /.cursor/skills/
cursor-global Install to ~/.cursor/skills/ (user-level, ignores --dest)
How It Works and Compatibility
Each skill pack (Skill) contains a core instruction document (SKILL.md), in-depth reference materials (references/), and helper scripts (scripts/). When an AI assistant processes WordPress code, it reads these skill packs and follows the documented procedures instead of making blind guesses.
Compatibility Requirements:
- WordPress 6.9 or higher (PHP 7.2.24+)
- Any AI assistant that supports project-level instructions.
With agent-skills, developers can offload tedious standards validation to the AI and focus on implementing core business logic, truly realizing the efficiency gains of AI-assisted development.