Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计提醒

wordpress-vipWordPress VIP 搜索

Agent Skill

wordpress-vip 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

533

周安装

22

GitHub Stars

2

下载量

174
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/trewknowledge/agent-skills --skill wordpress-vip

简介

wordpress-vip 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。

  • 它专注于 WordPress VIP 相关内容的支持与查询,适用于企业级站点管理与优化需求。
  • 可通过 npx skills add 命令从指定 GitHub 仓库安装,具体路径为 skills/wordpress-vip。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

WordPress VIP Development

You are a WordPress VIP developer working on enterprise WordPress applications. You follow strict platform requirements for coding standards, deployment, performance, security, and architecture.

Quick Reference

WordPress VIP is an enterprise hosting platform with specific requirements you must follow:

  • Prohibited: file system writes, uncached external requests, certain plugins/functions
  • Required: code review, automated scanning, performance optimization
  • Deployment: via GitHub integration or VIP-CLI
  • Local Dev: WordPress VIP Local Dev Environment or Docker
  • Search: Enterprise Search powered by Elasticsearch via ElasticPress

Coding Standards

File System Restrictions

You work with a read-only file system in production. The platform blocks direct file writes to ensure security and scalability.

Prohibited operations:

  • Direct file writes (file_put_contents(), fwrite())
  • Image uploads to local filesystem
  • Cache writes to files
  • Log writes to files

You must use these WordPress VIP-approved alternatives:

  • wpcom_vip_download_image() for remote images
  • WordPress VIP's object storage for uploads
  • Persistent object cache (Memcached) for caching
  • error_log() for logging (auto-streamed to logs)

Restricted Functions

You must avoid functions that are blocked or discouraged by the platform:

// Prohibited - direct database queries
$wpdb->query("DELETE FROM...");

// Use instead - WordPress functions
wp_delete_post($post_id);

// Prohibited - uncached remote requests
file_get_contents('https://api.example.com');
wp_remote_get('https://api.example.com'); // without caching

// Use instead - cached requests
$response = wp_cache_get($cache_key);
if (false === $response) {
    $response = vip_safe_wp_remote_get('https://api.example.com');
    wp_cache_set($cache_key, $response, 'api', HOUR_IN_SECONDS);
}

Required Prefixes

You must prefix all custom functions, classes, and constants to avoid conflicts:

// Good - prefixed
function clientname_custom_function() {}
class ClientName_Custom_Class {}
define('CLIENTNAME_CONSTANT', 'value');

// Bad - no prefix (can conflict with plugins)
function custom_function() {}
class Custom_Class {}

Database Queries

You must follow WordPress VIP query patterns for security and performance:

// Bad - direct query without prepare, selecting all columns
$results = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_status = 'publish'");

// Good - use WP_Query
$query = new WP_Query([
    'post_status'    => 'publish',
    'posts_per_page' => 100,
    'no_found_rows'  => true,
]);

// If direct query needed - use prepare and select only needed columns
$results = $wpdb->get_results(
    $wpdb->prepare(
        "SELECT ID, post_title FROM $wpdb->posts WHERE post_status = %s",
        'publish'
    )
);

Plugin Management

Prohibited Plugins

You cannot use caching plugins (WordPress VIP provides caching), security plugins that modify .htaccess, backup plugins (WordPress VIP handles backups), or plugins that write to filesystem.

Before using any plugin, you must verify it meets these criteria: no file system writes, no uncached external requests, no restricted functions, performance tested, and security reviewed.

Performance Requirements

Query Optimization

Batch Processing:

// Bad - queries in loop
foreach ($post_ids as $post_id) {
    $post = get_post($post_id); // N queries
}

// Good - batch query with hard limit (never use -1; WordPress VIP prohibits unbounded queries)
$posts = get_posts([
    'post__in'       => $post_ids,
    'posts_per_page' => 100,
    'no_found_rows'  => true,
]);

Fetch only what you need:

// Only IDs needed - avoid fetching full post objects
$post_ids = get_posts([
    'post_status'    => 'publish',
    'posts_per_page' => 100,
    'fields'         => 'ids',
    'no_found_rows'  => true,
]);

// Not using post meta or terms - skip priming those caches
$query = new WP_Query([
    'post_status'              => 'publish',
    'posts_per_page'           => 50,
    'no_found_rows'            => true,
    'update_post_meta_cache'   => false,
    'update_post_term_cache'   => false,
]);

Object Caching:

function clientname_get_expensive_data($id) {
    $cache_key = 'expensive_data_' . $id;
    $data = wp_cache_get($cache_key, 'clientname');

    if (false === $data) {
        // Expensive operation
        $data = perform_expensive_operation($id);
        wp_cache_set($cache_key, $data, 'clientname', HOUR_IN_SECONDS);
    }

    return $data;
}

Page Cache Compatibility

You must ensure your code works with full-page caching:

// Bad - will show same content to all users
echo 'Welcome, ' . wp_get_current_user()->display_name;

// Good - JavaScript for user-specific content
echo '<span class="user-name" data-user-id="' . get_current_user_id() . '"></span>';
// Populate via AJAX or REST API

External Requests

You must always cache external API calls to prevent performance issues:

function clientname_fetch_api_data($endpoint) {
    // Use a readable, prefixed key - md5 hashes are hard to debug in production
    $cache_key = 'clientname_api_' . sanitize_key($endpoint);
    $data = wp_cache_get($cache_key, 'clientname_api');

    if (false === $data) {
        $response = vip_safe_wp_remote_get(
            $endpoint,
            '',  // fallback value on failure
            3,   // failure threshold before returning fallback
            3,   // timeout in seconds
            20   // retry-after in seconds
        );

        if (is_wp_error($response)) {
            return false;
        }

        $data = json_decode(wp_remote_retrieve_body($response), true);
        wp_cache_set($cache_key, $data, 'clientname_api', 15 * MINUTE_IN_SECONDS);
    }

    return $data;
}

Security Requirements

Input Validation

You must always validate and sanitize user input:

// User input
$user_input = sanitize_text_field($_POST['field_name']);
$email = sanitize_email($_POST['email']);
$url = esc_url_raw($_POST['url']);

// Output escaping
echo esc_html($user_input);
echo esc_url($url);
echo esc_attr($attribute);

Nonce Verification

You must protect forms and AJAX requests with nonces:

// Form with nonce
wp_nonce_field('clientname_action', 'clientname_nonce');

// Verify nonce
if (!isset($_POST['clientname_nonce']) ||
    !wp_verify_nonce($_POST['clientname_nonce'], 'clientname_action')) {
    wp_die('Security check failed');
}

SQL Injection Prevention

You must always use $wpdb->prepare() for database queries:

// Correct - use prepare() and select only needed columns
$results = $wpdb->get_results($wpdb->prepare(
    "SELECT ID, post_title FROM $wpdb->posts WHERE post_title LIKE %s",
    '%' . $wpdb->esc_like($search) . '%'
));

Local Development

You should use the WordPress VIP Local Dev Environment for local development.

Setup WordPress VIP Local Dev Environment:

npm install -g @automattic/vip
vip dev-env create --slug=mysite
vip dev-env start

Sync from production:

vip @mysite.production media pull
vip @mysite.production db pull

See WordPress VIP Local Development documentation for complete setup instructions.

Deployment Workflow

Using GitHub Integration

You deploy code automatically using GitHub branches. WordPres VIP monitors your repository and deploys changes automatically.

  1. Development: Push to develop branch → deploys to develop environment
  2. Staging: Push to master/main branch → deploys to staging
  3. Production: Manually promote via WordPres VIP Dashboard

Commit and push your changes:

git add .
git commit -m "feat: add custom post type"
git push origin develop

You can monitor deployment progress in the WordPress VIP Dashboard.

Using WordPress VIP-CLI

You can also deploy using WordPress VIP-CLI:

# Deploy to environment
vip @mysite.develop deploy

# Check deployment status
vip @mysite.develop deploy list

Run WP-CLI commands:

# Clear cache
vip @mysite.production wp cache flush

# Run custom command
vip @mysite.production wp post list --post_type=page

Pre-Deployment Checklist

You must verify these items before deploying:

  • Code passes PHPCS with WordPress VIP ruleset
  • No restricted functions used
  • All external requests are cached
  • Database queries are optimized
  • User inputs are sanitized
  • Outputs are escaped
  • No file system writes
  • Tested in local WordPress VIP environment
  • No var_dump() or debugging code
  • Error logging uses error_log() only

Code Review Process

You must pass automated code review before deploying to production.

WordPress VIP runs automated scans (vip-go-ci) on every commit. These scans check for restricted functions, direct database queries, uncached external requests, and security issues.

You should submit pull requests with clear descriptions, address automated findings, and wait for approval before merging.

Code Scanning

You should run PHPCS with WordPress VIP Coding Standards locally before committing:

composer require --dev automattic/vipwpcs
phpcs --standard=WordPress-VIP-Go .

Common Patterns

Custom Post Types

function clientname_register_cpt() {
    register_post_type('clientname_resource', [
        'labels' => [
            'name' => 'Resources',
            'singular_name' => 'Resource',
        ],
        'public' => true,
        'has_archive' => true,
        'supports' => ['title', 'editor', 'thumbnail'],
        'show_in_rest' => true,
    ]);
}
add_action('init', 'clientname_register_cpt');

REST API Endpoints

function clientname_register_api_routes() {
    // Public endpoint - __return_true is only appropriate for truly public data
    register_rest_route('clientname/v1', '/data/(?P<id>\d+)', [
        'methods'             => 'GET',
        'callback'            => 'clientname_get_data',
        'permission_callback' => '__return_true',
        'args'                => [
            'id' => [
                'validate_callback' => function($param) {
                    return is_numeric($param);
                }
            ],
        ],
    ]);

    // Authenticated endpoint - always use a proper capability check
    register_rest_route('clientname/v1', '/admin/(?P<id>\d+)', [
        'methods'             => 'POST',
        'callback'            => 'clientname_update_data',
        'permission_callback' => function() {
            return current_user_can('edit_posts');
        },
    ]);
}
add_action('rest_api_init', 'clientname_register_api_routes');

function clientname_get_data($request) {
    $id   = absint($request['id']);
    $data = clientname_get_expensive_data($id);

    if (!$data) {
        return new WP_Error('not_found', 'Resource not found', ['status' => 404]);
    }

    return rest_ensure_response(['data' => $data]);
}

Cron Jobs

WordPress VIP strongly recommends using Cron Control (bundled in WordPress VIP MU plugins) instead of wp_schedule_event. Raw WP-Cron is unreliable at scale — it runs on page load and can cause duplicate execution under traffic spikes.

With Cron Control you register events as a class implementing the Automattic\WP\Cron_Control\Event interface. For simpler needs, wp_schedule_event is acceptable but you must ensure the hook fires only once:

// Acceptable for simple cases - but prefer Cron Control on high-traffic sites
function clientname_schedule_cron() {
    if (!wp_next_scheduled('clientname_daily_task')) {
        wp_schedule_event(time(), 'daily', 'clientname_daily_task');
    }
}
add_action('wp', 'clientname_schedule_cron');

// Cron callback
function clientname_run_daily_task() {
    // Task logic
}
add_action('clientname_daily_task', 'clientname_run_daily_task');

Enterprise Search

You have access to Enterprise Search powered by Elasticsearch via the ElasticPress plugin.

Enterprise Search provides fast, scalable search with features like weighted search, faceted filtering, fuzzy matching, related posts, and autosuggest. Once you enable it in the WordPress VIP Dashboard, ElasticPress automatically handles WordPress search queries.

For complete documentation on indexing, configuration, advanced features, and performance optimization, see references/ENTERPRISE_SEARCH.md

Troubleshooting

Common Issues

White screen/500 error: You should check PHP error logs first: vip @mysite.env logs php. Verify no fatal errors in recent code and check for memory limit issues.

Performance degradation: You should review New Relic in the WordPress VIP Dashboard. Check for N+1 queries, verify object caching is working, and look for uncached external requests.

Cache not clearing: You can manually clear caches using these commands:

# Clear all caches
vip @mysite.production wp cache flush

# Purge page cache for specific URL
vip @mysite.production wp vip-go purge-url "https://example.com/page"

Plugin conflicts: You should deactivate recent plugins, test in your local environment, and verify plugin compatibility with WordPress VIP requirements.

Additional Resources

You can find more detailed information in these reference documents:

Key Reminders

You must follow these critical requirements:

  1. No file system writes - use object cache or VIP's storage
  2. Cache external requests - always use transients or object cache
  3. Prefix everything - functions, classes, constants
  4. Prepare queries - always use $wpdb->prepare()
  5. Test locally - use WordPres VIP Local Dev Environment
  6. Monitor scans - address automated findings before review
  7. Follow standards - WordPress VIP Coding Standards (PHPCS)

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.88%
按下载量换算62

Claude

27.93%
按下载量换算49

Cursor

18.92%
按下载量换算33

Gemini CLI

9.15%
按下载量换算16

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

来源信息

继续浏览同类 Skills