Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

php-wordpressPHP WordPress 命令行

Agent Skill

php-wordpress 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,458

周安装

59

GitHub Stars

2

下载量

458
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:php-wordpress(PHP WordPress 命令行)
来源仓库:https://github.com/pluginagentmarketplace/custom-plugin-php
仓库路径:skills/php-wordpress
安装命令:
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-php --skill php-wordpress
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-php --skill php-wordpress

简介

php-wordpress 用于 WordPress 插件开发与 PHP 代码协作支持。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中处理仓库状态和代码变更时调用。
  • 可辅助生成插件结构或分析 Issue、Pull Request 内容。
  • 安装前需确认是否有命令执行或文件写入权限。
  • 建议核对原始 SKILL.md 获取准确的使用限制和输入格式。

SKILL.md

WordPress Development Skill

Atomic skill for mastering WordPress theme and plugin development

Overview

Comprehensive skill for building WordPress themes, plugins, and Gutenberg blocks. Covers WordPress 6.x with focus on modern development practices and security.

Skill Parameters

Input Validation

interface SkillParams {
  topic:
    | "themes"           // Classic, block, FSE
    | "plugins"          // Architecture, hooks, settings
    | "gutenberg"        // Blocks, patterns, InnerBlocks
    | "rest-api"         // Custom endpoints, authentication
    | "security"         // Nonces, sanitization, escaping
    | "woocommerce";     // Store extensions

  level: "beginner" | "intermediate" | "advanced";
  wp_version?: "6.4" | "6.5" | "6.6" | "6.7";
  theme_type?: "classic" | "block" | "hybrid";
}

Validation Rules

validation:
  topic:
    required: true
    allowed: [themes, plugins, gutenberg, rest-api, security, woocommerce]
  level:
    required: true
  wp_version:
    default: "6.6"

Learning Modules

Module 1: Theme Development

beginner:
  - Theme structure and files
  - Template hierarchy
  - Enqueuing styles/scripts

intermediate:
  - Custom post types
  - Theme customizer
  - Block theme basics

advanced:
  - Full Site Editing
  - theme.json deep dive
  - Performance optimization

Module 2: Plugin Development

beginner:
  - Plugin structure
  - Actions and filters
  - Shortcodes

intermediate:
  - Settings API
  - Custom database tables
  - AJAX handling

advanced:
  - Plugin architecture patterns
  - WP-CLI commands
  - Multisite support

Module 3: Gutenberg Blocks

beginner:
  - Block basics and block.json
  - Edit and save functions
  - Block attributes

intermediate:
  - InnerBlocks
  - Block variations
  - Server-side rendering

advanced:
  - Interactivity API
  - Block Bindings
  - Custom block categories

Error Handling & Retry Logic

errors:
  HOOK_ERROR:
    code: "WP_001"
    recovery: "Check hook name and timing"

  SECURITY_ERROR:
    code: "WP_002"
    recovery: "Add proper escaping/sanitization"

retry:
  max_attempts: 3
  backoff:
    type: exponential
    initial_delay_ms: 100

Code Examples

Plugin Header

<?php
/**
 * Plugin Name: My Custom Plugin
 * Description: A custom WordPress plugin
 * Version: 1.0.0
 * Requires PHP: 8.0
 * Author: Developer
 */

declare(strict_types=1);

defined('ABSPATH') || exit;

final class MyCustomPlugin
{
    public function __construct()
    {
        add_action('init', [$this, 'registerPostType']);
        add_action('rest_api_init', [$this, 'registerRoutes']);
    }

    public function registerPostType(): void
    {
        register_post_type('portfolio', [
            'labels' => ['name' => __('Portfolio')],
            'public' => true,
            'show_in_rest' => true,
            'supports' => ['title', 'editor', 'thumbnail'],
        ]);
    }

    public function registerRoutes(): void
    {
        register_rest_route('myplugin/v1', '/items', [
            'methods' => 'GET',
            'callback' => [$this, 'getItems'],
            'permission_callback' => '__return_true',
        ]);
    }

    public function getItems(\WP_REST_Request $request): \WP_REST_Response
    {
        $items = get_posts(['post_type' => 'portfolio']);
        return new \WP_REST_Response($items, 200);
    }
}

new MyCustomPlugin();

Gutenberg Block (block.json)

{
  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 3,
  "name": "myplugin/testimonial",
  "title": "Testimonial",
  "category": "widgets",
  "icon": "format-quote",
  "description": "Display a testimonial",
  "supports": {
    "html": false,
    "align": ["wide", "full"]
  },
  "attributes": {
    "content": { "type": "string" },
    "author": { "type": "string" }
  },
  "textdomain": "myplugin",
  "editorScript": "file:./index.js",
  "style": "file:./style-index.css"
}

Security Best Practices

<?php
// Input sanitization
$title = sanitize_text_field($_POST['title'] ?? '');
$content = wp_kses_post($_POST['content'] ?? '');
$id = absint($_POST['id'] ?? 0);

// Output escaping
echo esc_html($title);
echo esc_attr($attribute);
echo esc_url($url);
echo wp_kses_post($content);

// Nonce verification
if (!wp_verify_nonce($_POST['_wpnonce'], 'my_action')) {
    wp_die('Security check failed');
}

// Capability check
if (!current_user_can('edit_posts')) {
    wp_die('Unauthorized');
}

// Database queries
global $wpdb;
$results = $wpdb->get_results(
    $wpdb->prepare(
        "SELECT * FROM {$wpdb->prefix}custom_table WHERE id = %d",
        $id
    )
);

Troubleshooting

ProblemSolution
Hook not firingCheck hook name spelling and timing
Block not appearingVerify block.json, run npm build
REST API 403Check permission_callback
White screenEnable WP_DEBUG, check error.log

Debug Constants

// wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
define('SCRIPT_DEBUG', true);

Quality Metrics

MetricTarget
Security compliance100%
Hook correctness100%
WPCS compliance100%

Usage

Skill("php-wordpress", {topic: "gutenberg", level: "intermediate"})

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.37%
按下载量换算167

Claude

30.99%
按下载量换算142

Cursor

16.99%
按下载量换算78

Gemini CLI

9.3%
按下载量换算43

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills