mcpField
W
woocommerce-performance

woocommerce-performance

github.com/woocommerceDevelopment10.6k328 installsUpdated today
Repository

About woocommerce-performance

A WooCommerce performance skill for developers writing or reviewing PHP that loads collections or runs SQL. It provides guidance on cache priming and query patterns to identify common performance issues.

Key features

  1. 01Post cache priming guidance
  2. 02Options cache priming guidance
  3. 03SQL query pattern guidance
  4. 04Review checks for missing cache priming

Use cases

  1. 01Optimizing product or order collections
  2. 02Reviewing loops that read options
  3. 03Writing or reviewing WooCommerce SQL queries

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/woocommerce/woocommerce --skill woocommerce-performance

After installing, type/woocommerce-performancein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

cache-priming.md
options-cache-priming.md
sql-query-patterns.md

Details

From the project README

WooCommerce Performance

Post Cache Priming — cache-priming.md

Use when writing or reviewing code that loads collections of post-based objects (products, orders) or renders product lists with images. Covers _prime_post_caches() usage patterns — both as a generation guide (apply these patterns when writing new code) and a review guide (flag missing priming in existing code).

Options Cache Priming — options-cache-priming.md

Use when writing or reviewing code that reads multiple non-autoloaded options in a loop or method. Covers wp_prime_option_caches() usage patterns for static key lists, derivable key patterns, and dynamically extracted key sets (excluding autoloaded options, which are already in cache).

SQL Query Patterns — sql-query-patterns.md

Use when writing or reviewing any SQL query in WooCommerce PHP code. Covers: redundant posts joins, fan-out JOIN on wp_term_relationships, N-query loops, OR index-merge, cross-product meta conditions, multi-fan join decoupling, WooCommerce lookup table preference (wc_product_meta_lookup, wc_product_attributes_lookup), and MIN/MAX full-scan elimination.

Comments

Markdown supported