AgentSkillsCN

wordpress-handbook

搜索 WordPress 官方插件、主题、区块编辑器、REST API、常用 API、编码规范以及高级管理手册。适用于开发者询问 WordPress 开发概念、最佳实践、编码规范或架构指南时使用。

SKILL.md
--- frontmatter
name: wordpress-handbook
description: >
  Search WordPress official Plugin, Theme, Block Editor, REST API,
  Common APIs, Coding Standards, and Advanced Administration handbooks.
  Use when the developer asks about WordPress development concepts,
  best practices, coding standards, or architecture guidelines.
license: MIT
metadata:
  author: hideokamoto
  version: "0.3.0"

WordPress Handbook Search Skill

This skill enables searching and retrieving content from WordPress official developer handbooks.

Available Scripts

search

Search handbooks by keywords.

bash
python3 search.py "custom post type" "plugin-handbook,theme-handbook" 10

Arguments:

  • query (required): Search keywords
  • subtypes (optional): Comma-separated list of handbook types
  • per_page (optional): Number of results (default: 5)

get_content

Retrieve full content of a specific document.

bash
python3 get_content.py plugin-handbook 11070

Arguments:

  • subtype (required): Handbook type from search results
  • id (required): Document ID from search results

Available Handbook Types

SubtypeDescription
plugin-handbookPlugin development guide
theme-handbookTheme development guide
blocks-handbookBlock Editor (Gutenberg) development
rest-api-handbookREST API usage and extension
apis-handbookCommon WordPress APIs
wpcs-handbookWordPress Coding Standards
adv-admin-handbookAdvanced administration

Usage Workflow

Step 1: Search for Documentation

Run the search script with your query:

bash
python3 search.py "register post type" "plugin-handbook" 5

Output:

json
[
  {
    "id": 11070,
    "title": "Working with Custom Post Types",
    "url": "https://developer.wordpress.org/plugins/post-types/...",
    "subtype": "plugin-handbook"
  }
]

Step 2: Retrieve Full Content

Use the ID and subtype from the search results:

bash
python3 get_content.py plugin-handbook 11070

The content is returned in Markdown format for easy reading.

Search Tips

  • Specific handbook search: Set subtypes to target specific handbooks
  • Cross-handbook search: Specify multiple subtypes (comma-separated)
  • No results: Try alternative keywords or broaden the search

Example Queries

  1. "How to register a custom post type" -> Search plugin-handbook
  2. "Theme template hierarchy" -> Search theme-handbook
  3. "Create a custom block" -> Search blocks-handbook
  4. "REST API authentication" -> Search rest-api-handbook
  5. "WordPress coding standards for PHP" -> Search wpcs-handbook