跳到正文
cccskills
免费在 GitHub 公开

wordpress-pro

Build custom WordPress themes, plugins, and editor blocks, extend WooCommerce stores, and add REST API endpoints. The skill also guides input protection, permission checks, caching, and database query tuning to improve security and performance.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Develops custom WordPress themes and plugins, creates and registers Gutenberg blocks and block patterns, configures WooCommerce stores, implements WordPress REST API endpoints, applies security hardening (nonces, sanitization, escaping, capability checks), and optimizes performance through caching and query tuning. Use when building WordPress themes, writing plugins, customizing Gutenberg blocks, extending WooCommerce, working with ACF, using the WordPress REST API, applying hooks and filters, or improving WordPress performance and security.

集成工具WordPress
查看安装方法

适用场景

  • Build custom WordPress themes and plugins
  • Create Gutenberg blocks and block patterns
  • Extend WooCommerce stores and REST API endpoints
  • Improve WordPress security and performance

包含的文件(6)

  • SKILL.md6.3 KB
  • references/gutenberg-blocks.md26.1 KB
  • references/hooks-filters.md21.6 KB
  • references/performance-security.md25.5 KB
  • references/plugin-architecture.md32.0 KB
  • references/theme-development.md25.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

WordPress Pro

Expert WordPress developer specializing in custom themes, plugins, Gutenberg blocks, WooCommerce, and WordPress performance optimization.

Core Workflow

  1. Analyze requirements — Understand WordPress context, existing setup, and goals.
  2. Design architecture — Plan theme/plugin structure, hooks, and data flow.
  3. Implement — Build using WordPress coding standards and security best practices.
  4. Validate — Run phpcs --standard=WordPress to catch WPCS violations; verify nonce handling and capability checks manually.
  5. Optimize — Apply transient/object caching, query optimization, and asset enqueuing.
  6. Test & secure — Confirm sanitization/escaping on all I/O, test across target WordPress versions, and run a security audit checklist.

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Theme Developmentreferences/theme-development.mdTemplates, hierarchy, child themes, FSE
Plugin Architecturereferences/plugin-architecture.mdStructure, activation, settings API, updates
Gutenberg Blocksreferences/gutenberg-blocks.mdBlock dev, patterns, FSE, dynamic blocks
Hooks & Filtersreferences/hooks-filters.mdActions, filters, custom hooks, priorities
Performance & Securityreferences/performance-security.mdCaching, optimization, hardening, backups

Key Implementation Patterns

Nonce Verification (form submissions)

// Output nonce field in form
wp_nonce_field( 'my_action', 'my_nonce' );

// Verify on submission — bail early if invalid
if ( ! isset( $_POST['my_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST['my_nonce'] ) ), 'my_action' ) ) {
    wp_die( esc_html__( 'Security check failed.', 'my-textdomain' ) );
}

Sanitization & Escaping

// Sanitize input (store)
$title   = sanitize_text_field( wp_unslash( $_POST['title'] ?? '' ) );
$content = wp_kses_post( wp_unslash( $_POST['content'] ?? '' ) );
$url     = esc_url_raw( wp_unslash( $_POST['url'] ?? '' ) );

// Escape output (display)
echo esc_html( $title );
echo wp_kses_post( $content );
echo '<a href="' . esc_url( $url ) . '">' . esc_html__( 'Link', 'my-textdomain' ) . '</a>';

Enqueuing Scripts & Styles

add_action( 'wp_enqueue_scripts', 'my_theme_assets' );
function my_theme_assets(): void {
    wp_enqueue_style(
        'my-theme-style',
        get_stylesheet_uri(),
        [],
        wp_get_theme()->get( 'Version' )
    );
    wp_enqueue_script(
        'my-theme-script',
        get_template_directory_uri() . '/assets/js/main.js',
        [ 'jquery' ],
        '1.0.0',
        true // load in footer
    );
    // Pass server data to JS safely
    wp_localize_script( 'my-theme-script', 'MyTheme', [
        'ajaxUrl' => admin_url( 'admin-ajax.php' ),
        'nonce'   => wp_create_nonce( 'my_ajax_nonce' ),
    ] );
}

Prepared Database Queries

global $wpdb;
$results = $wpdb->get_results(
    $wpdb->prepare(
        "SELECT * FROM {$wpdb->prefix}my_table WHERE user_id = %d AND status = %s",
        absint( $user_id ),
        sanitize_text_field( $status )
    )
);

Capability Checks

// Always check capabilities before sensitive operations
if ( ! current_user_can( 'manage_options' ) ) {
    wp_die( esc_html__( 'You do not have permission to do this.', 'my-textdomain' ) );
}

Constraints

MUST DO

  • Follow WordPress Coding Standards (WPCS); validate with phpcs --standard=WordPress
  • Use nonces for all form submissions and AJAX requests
  • Sanitize all user inputs with appropriate functions (sanitize_text_field, wp_kses_post, etc.)
  • Escape all outputs (esc_html, esc_url, esc_attr, wp_kses_post)
  • Use prepared statements for all database queries ($wpdb->prepare)
  • Implement proper capability checks before privileged operations
  • Enqueue scripts/styles via wp_enqueue_scripts / admin_enqueue_scripts hooks
  • Use WordPress hooks instead of modifying core
  • Write translatable strings with text domains (__(), esc_html__(), etc.)
  • Test across target WordPress versions

MUST NOT DO

  • Modify WordPress core files
  • Use PHP short tags or deprecated functions
  • Trust user input without sanitization
  • Output data without escaping
  • Hardcode database table names (use $wpdb->prefix)
  • Skip capability checks in admin functions
  • Ignore SQL injection vectors
  • Bundle unnecessary libraries when WordPress APIs suffice
  • Allow unsafe file upload handling
  • Skip internationalization (i18n)

Output Templates

When implementing WordPress features, provide:

  1. Main plugin/theme file with proper headers
  2. Relevant template files or block code
  3. Functions with proper WordPress hooks
  4. Security implementations (nonces, sanitization, escaping)
  5. Brief explanation of WordPress-specific patterns used

Knowledge Reference

WordPress 6.4+, PHP 8.1+, Gutenberg, WooCommerce, ACF, REST API, WP-CLI, block development, theme customizer, widget API, shortcode API, transients, object caching, query optimization, security hardening, WPCS

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Build Angular 17+ applications with standalone components, routing, and shared application state. Covers reactive data handling with RxJS, performance improvements, and unit and integration tests, with code and explanations of architecture choices.

中文简介正在准备中。当前显示英语简介。

  • Building Angular screens with standalone components
  • Managing shared application state with NgRx
  • Configuring lazy-loaded routes and access guards
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design REST or GraphQL APIs by defining data relationships, requests, responses, and authentication. Produce OpenAPI specifications, machine-readable API descriptions, with consistent errors, pagination, and versioning plans, then validate contracts using a mock server.

中文简介正在准备中。当前显示英语简介。

  • Designing a new API from business requirements
  • Creating and validating OpenAPI specifications
  • Standardizing errors and paginated responses
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design or review a system’s overall structure, compare technology choices, and plan for growth and failures. Produce architecture diagrams and Architecture Decision Records, documents that explain key choices, alternatives, and their consequences.

中文简介正在准备中。当前显示英语简介。

  • Designing the overall structure of a new system
  • Comparing monolith and microservices architectures
  • Recording technology decisions and alternatives
Jeffallan/claude-skills1.2万2026年10月17日 更新

Connect AI agents to Jira and Confluence through MCP, a protocol for accessing external tools. This skill guides issue searches and updates, page management, sprint workflows, authentication setup, and troubleshooting of Atlassian integrations.

中文简介正在准备中。当前显示英语简介。

  • Find Jira issues by assignee or status
  • Search and update Confluence pages
  • Turn meeting notes into Jira ticket updates
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design controlled failure experiments for distributed systems to examine how services recover. Produce failure injection scripts, monitoring plans, rollback procedures, and exercise guides, then turn findings into documented improvements.

中文简介正在准备中。当前显示英语简介。

  • Planning controlled failure experiments
  • Testing recovery after Kubernetes Pod failures
  • Checking service behavior under network delays
Jeffallan/claude-skills1.2万2026年10月17日 更新

Design and implement command-line tools with subcommands, options, interactive prompts, and progress indicators. Get command structures, configuration handling, clear error messages, and shell completion scripts, with guidance for automated use and testing across operating systems.

中文简介正在准备中。当前显示英语简介。

  • Build a command-line tool with subcommands and options
  • Add interactive prompts and progress indicators
  • Provide bash, zsh, and fish command completion
Jeffallan/claude-skills1.2万2026年10月17日 更新

查看 Jeffallan 的全部技能

报告此技能的问题