wordpress

技能包编程

教会 AI 编程助手正确构建 WordPress 的方法。代理技能是可移植的指令、清单和脚本捆绑包,帮助 AI 助手(如 Claude、Copilot、Codex、Cursor 等)理解 WordPress 开发模式,避免常见错误,并遵循最佳实践。

热度1112Star745Update2026-02-05
暂无实践

README

前往 Source

Agent Skills for WordPress

Teach AI coding assistants how to build WordPress the right way.

Agent Skills are portable bundles of instructions, checklists, and scripts that help AI assistants (Claude, Copilot, Codex, Cursor, etc.) understand WordPress development patterns, avoid common mistakes, and follow best practices.

AI Authorship Disclosure: These skills were generated using GPT-5.2 Codex (High Reasoning) from official Gutenberg and WordPress documentation, then reviewed and edited by WordPress contributors. We tested skills with AI assistants and iterated based on results. This is v1, and skills will improve as the community uses them and contributes fixes. See docs/ai-authorship.md for details. (WordPress AI Guidelines)

Why Agent Skills?

AI coding assistants are powerful, but they often:

  • Generate outdated WordPress patterns (pre-Gutenberg, pre-block themes)
  • Miss critical security considerations in plugin development
  • Skip proper block deprecations, causing "Invalid block" errors
  • Ignore existing tooling in your repo

Agent Skills solve this by giving AI assistants expert-level WordPress knowledge in a format they can actually use.

Available Skills

SkillWhat it teaches
wordpress-routerClassifies WordPress repos and routes to the right workflow
wp-project-triageDetects project type, tooling, and versions automatically
wp-block-developmentGutenberg blocks: block.json, attributes, rendering, deprecations
wp-block-themesBlock themes: theme.json, templates, patterns, style variations
wp-plugin-developmentPlugin architecture, hooks, settings API, security
wp-rest-apiREST API routes/endpoints, schema, auth, and response shaping
wp-interactivity-apiFrontend interactivity with data-wp-* directives and stores
wp-abilities-apiCapability-based permissions and REST API authentication
wp-wpcli-and-opsWP-CLI commands, automation, multisite, search-replace
wp-performanceProfiling, caching, database optimization, Server-Timing
wp-phpstanPHPStan static analysis for WordPress projects (config, baselines, WP-specific typing)
wp-playgroundWordPress Playground for instant local environments
wpdsWordPress Design System

Quick Start

Install globally for Claude Code

# Clone agent-skills
git clone https://github.com/WordPress/agent-skills.git
cd agent-skills

# Build the distribution
node shared/scripts/skillpack-build.mjs --clean

# Install all skills globally (available across all projects)
node shared/scripts/skillpack-install.mjs --global

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

This installs skills to ~/.claude/skills/ where Claude Code will automatically discover them.

Install into your repo

# Clone agent-skills
git clone https://github.com/WordPress/agent-skills.git
cd agent-skills

# Build the distribution
node shared/scripts/skillpack-build.mjs --clean

# Install into your WordPress project
node shared/scripts/skillpack-install.mjs --dest=../your-wp-project --targets=codex,vscode,claude,cursor

This copies skills into:

  • .codex/skills/ for OpenAI Codex
  • .github/skills/ for VS Code / GitHub Copilot
  • .claude/skills/ for Claude Code (project-level)
  • .cursor/skills/ for Cursor (project-level)

Install globally for Cursor

node shared/scripts/skillpack-install.mjs --targets=cursor-global

This installs skills to ~/.cursor/skills/ where Cursor will discover them.

Available options

# List available skills
node shared/scripts/skillpack-install.mjs --list

# Dry run (preview without installing)
node shared/scripts/skillpack-install.mjs --global --dry-run

# Install specific skills to a project (e.g. Claude + Cursor)
node shared/scripts/skillpack-install.mjs --dest=../my-repo --targets=claude,cursor --skills=wp-wpcli-and-ops

Manual installation

Copy any skill folder from skills/ into your project's instructions directory for your AI assistant.

How It Works

Each skill contains:

skills/wp-block-development/
├── SKILL.md              # Main instructions (when to use, procedure, verification)
├── references/           # Deep-dive docs on specific topics
│   ├── block-json.md
│   ├── deprecations.md
│   └── ...
└── scripts/              # Deterministic helpers (detection, validation)
    └── list_blocks.mjs

When you ask your AI assistant to work on WordPress code, it reads these skills and follows the documented procedures rather than guessing.

Compatibility

  • WordPress 6.9+ (PHP 7.2.24+)
  • Works with any AI assistant that supports project-level instructions

Contributing

We welcome contributions! This project is a great way to share your WordPress expertise—you don't need to be a coding wizard. Most skills are written in Markdown, focusing on clear procedures and best practices.

See CONTRIBUTING.md for details on how to get started.

Quick commands:

# Scaffold a new skill
node shared/scripts/scaffold-skill.mjs <skill-name> "<description>"

# Validate skills
node eval/harness/run.mjs

Documentation

License

GPL-2.0-or-later

常见问题

wordpress 是什么?
wordpress 是一个 AI Agent Skill(智能体技能)。教会 AI 编程助手正确构建 WordPress 的方法。代理技能是可移植的指令、清单和脚本捆绑包,帮助 AI 助手(如 Claude、Copilot、Codex、Cursor 等)理解 WordPress 开发模式,避免常见错误,并遵循最佳实践。
wordpress 怎么用?
你可以在 Skill Hub 中国下载 wordpress 的 SKILL.md 文件,放入你的项目目录中。AI Agent(如 Claude Code)会自动识别并加载该 Skill,按照其中定义的规则和流程来辅助你完成任务。目前已有 1 篇实践案例可供参考。
wordpress 有哪些实践案例?
目前 Skill Hub 中国收录了 1 篇 wordpress 的实践案例,涵盖真实项目中的使用场景、操作步骤和踩坑记录。你可以在本页面的「热门实践」区域查看完整列表。
wordpress 和 skill-creator 有什么区别?
wordpress 和 skill-creator 都属于「编程」类别的 AI Skill。wordpress 主要用于教会 AI 编程助手正确构建 WordPress 的方法。代理技能是可移植的指令、清单和脚本捆绑包,帮助 AI 助手(如。skill-creator 则侧重于指导用户如何创建、组织和打包高效的 Skills。你可以根据具体场景选择最合适的 Skill。