PluginBench
Skill
Fail
Audit score 45

wordpress-pro

jeffallan/claude-skills

Expert WordPress theme, plugin, and Gutenberg development with security hardening and performance optimization.

What is wordpress-pro?

Develops custom WordPress themes and plugins, creates Gutenberg blocks, configures WooCommerce, and implements REST API endpoints. Use when building WordPress sites, writing secure plugins, customizing blocks, extending WooCommerce, or optimizing performance and security.

  • Develops custom WordPress themes and child themes following WordPress Coding Standards
  • Creates and registers Gutenberg blocks, block patterns, and Full Site Editing components
  • Builds WordPress plugins with proper activation hooks, settings API, and update handling
  • Implements WordPress REST API endpoints and custom routes
  • Applies security hardening: nonces, input sanitization, output escaping, and capability checks
  • Optimizes performance through transient caching, query optimization, and asset enqueuing

How to install wordpress-pro

npx skills add https://github.com/jeffallan/claude-skills --skill wordpress-pro
Prerequisites
  • WordPress 6.4 or later
  • PHP 8.1 or later
  • phpcs with WordPress Coding Standards for validation
  • Basic understanding of WordPress hooks and filters
Claude Code
Cursor
Windsurf
Cline

How to use wordpress-pro

  1. 1.Analyze your WordPress requirements and existing setup
  2. 2.Design your theme/plugin architecture and hook strategy
  3. 3.Implement code following WordPress Coding Standards and security patterns
  4. 4.Validate with phpcs --standard=WordPress to catch violations
  5. 5.Apply caching and query optimization for performance
  6. 6.Test across target WordPress versions and run security audit checklist

Use cases

Good for
  • Building a custom WordPress theme with Gutenberg block support and FSE compatibility
  • Creating a WooCommerce extension plugin with custom product types and checkout modifications
  • Implementing a REST API endpoint to expose custom post types for headless WordPress
  • Hardening an existing plugin by adding nonce verification and sanitization to all forms
  • Optimizing a slow WordPress site through query tuning and strategic caching with transients
Who it's for
  • WordPress theme developers
  • WordPress plugin developers
  • WooCommerce developers
  • Full-stack developers extending WordPress
  • Teams building headless WordPress applications

wordpress-pro FAQ

How do I ensure my plugin is secure?

Always verify nonces on form submissions, sanitize all user inputs with functions like sanitize_text_field() or wp_kses_post(), escape all outputs with esc_html() or esc_url(), use prepared statements for database queries, and implement capability checks before privileged operations.

What's the best way to enqueue scripts and styles?

Use wp_enqueue_scripts hook for frontend and admin_enqueue_scripts for admin. Always specify dependencies and versions. Use wp_localize_script() to safely pass server data like nonces and AJAX URLs to JavaScript.

When should I use transients vs object caching?

Use transients for time-limited data (API responses, expensive queries) with expiration times. Use object caching for frequently accessed data within a request. Transients persist across requests; object cache is per-request unless persistent caching is enabled.

How do I create a custom Gutenberg block?

Register a block type with register_block_type(), provide a block.json manifest with metadata, implement edit and save components in JavaScript, and use wp_enqueue_block_editor_assets to load block editor scripts.

What WordPress versions should I test against?

Test against your minimum supported version and the latest stable WordPress version. The skill targets WordPress 6.4+ with PHP 8.1+. Use wp-cli or local environments to test multiple versions.

Full instructions (SKILL.md)

Source of truth, from jeffallan/claude-skills.


name: wordpress-pro description: 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. license: MIT metadata: author: https://github.com/Jeffallan version: "1.1.0" domain: platform triggers: WordPress, WooCommerce, Gutenberg, WordPress theme, WordPress plugin, custom blocks, ACF, WordPress REST API, hooks, filters, WordPress performance, WordPress security role: expert scope: implementation output-format: code related-skills: php-pro, laravel-specialist, fullstack-guardian, security-reviewer

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

Documentation