[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EVFJ96E4ZCBV7GQBXY611Y":3,"skill-same:01M7EVFJ96E4ZCBV7GQBXY611Y":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M7EVFJ96E4ZCBV7GQBXY611Y","wordpress",null,"Use when building or hardening WordPress sites or WooCommerce stores and treating WordPress as the product rather than just writing PHP — block themes with theme.json, plugins with block.json and proper hooks, wp-config security hardening, performance (object cache, asset loading, autoloaded options), and WP-CLI operations. NOT a Laravel app (that is `laravel`).","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fwordpress-ericrisco__rsc-harness\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: wordpress\ndescription: \"Use when building or hardening WordPress sites or WooCommerce stores and treating WordPress as the product rather than just writing PHP — block themes with theme.json, plugins with block.json and proper hooks, wp-config security hardening, performance (object cache, asset loading, autoloaded options), and WP-CLI operations. NOT a Laravel app (that is `laravel`).\"\ntags: [wordpress, woocommerce, block-themes, wp-cli, php, security-hardening, performance]\nrecommends: [php, secure-coding, performance, mysql, shopify]\norigin: risco\n---\n\n# WordPress\n\nYou are building the WordPress application layer — themes, plugins, the dashboard\u002FCLI surface, security, and stores — for someone treating WordPress as the product. Know the difference between a `functions.php` hack and a real plugin. Refuse to paste secrets into the dashboard file editor. Pick block themes over page builders by default. Reach for `wp` before clicking through wp-admin.\n\nThis is not generic PHP. If there is no WordPress API in sight (value objects, Composer\u002FPSR-4, PHPStan), that is [php](..\u002Fphp\u002FSKILL.md). A Laravel app is [laravel](..\u002Flaravel\u002FSKILL.md).\n\n## Version & runtime targeting\n\nTarget current. Stale version assumptions are the most common way WP code rots.\n\n- **WordPress 6.9** (released 2025-12-02) is current; it refines speculative loading and supports PHP 8.5. WP 6.8 (\"Cecil\", 2025-04-15) added bcrypt password hashing and speculative loading. *Why: features below assume 6.6+ APIs (`wp_enqueue_block_style`, theme.json v3).*\n- **PHP 8.4 is the recommended runtime for 2026.** WP 6.9 fully supports PHP 8.5; WP 6.8+ fully supports 8.4; WP 6.4+ supports 8.3. **Never target PHP 7.x or 8.0–8.2 for new code — all EOL.** *Why: writing for a dead runtime ships deprecation bugs the host will eventually refuse to run.*\n- **theme.json v3** is the schema for new block themes (WP 6.6+). Locally set `WP_DEVELOPMENT_MODE` to `all` so theme.json edits are not cached for 30+ seconds. *Why: without it you will edit theme.json, see nothing change, and waste an hour.*\n\n```php\n\u002F\u002F wp-config.php — local dev only, never on production\ndefine( 'WP_DEVELOPMENT_MODE', 'all' );\ndefine( 'WP_DEBUG', true );\ndefine( 'SCRIPT_DEBUG', true );\n```\n\n## Decision: how heavy is the change?\n\nPick the lightest artifact that survives an update. The failure mode is everyone reaching for `functions.php` or editing files that get overwritten.\n\n| You need to… | Artifact | Do NOT |\n| --- | --- | --- |\n| One-line tweak, site-specific behavior | mu-plugin in `wp-content\u002Fmu-plugins\u002F` | dump it in the active theme's `functions.php` |\n| Change look of a third-party theme | **child theme** | edit the parent theme — updates wipe it |\n| Reusable feature, hooks, blocks, CPTs | **standalone plugin** | hide app logic in `functions.php` |\n| Full custom front end | **block theme** + theme.json v3 | reach for a page builder for structural layout |\n| Sell products | block theme + **WooCommerce** | hand-roll a cart |\n\n## Block themes\n\nA block theme is `theme.json` + HTML templates in `templates\u002F` and `parts\u002F`. Start from a v3 skeleton:\n\n```json\n{\n  \"$schema\": \"https:\u002F\u002Fschemas.wp.org\u002Ftrunk\u002Ftheme.json\",\n  \"version\": 3,\n  \"settings\": {\n    \"appearanceTools\": true,\n    \"color\": {\n      \"palette\": [\n        { \"slug\": \"base\", \"color\": \"#ffffff\", \"name\": \"Base\" },\n        { \"slug\": \"contrast\", \"color\": \"#111111\", \"name\": \"Contrast\" }\n      ]\n    },\n    \"typography\": {\n      \"fluid\": true,\n      \"fontFamilies\": [\n        { \"fontFamily\": \"system-ui, sans-serif\", \"slug\": \"system\", \"name\": \"System\" }\n      ]\n    },\n    \"layout\": { \"contentSize\": \"640px\", \"wideSize\": \"1100px\" }\n  },\n  \"styles\": {\n    \"color\": { \"background\": \"var(--wp--preset--color--base)\", \"text\": \"var(--wp--preset--color--contrast)\" }\n  }\n}\n```\n\nTemplates resolve by hierarchy: `templates\u002Findex.html` is the fallback; `single.html`, `archive.html`, `page.html`, `404.html` override it. Reusable chunks live in `parts\u002F` (`header.html`, `footer.html`).\n\nRegister patterns by dropping PHP-headered HTML in `patterns\u002F`; they appear in the inserter automatically. Enqueue CSS **per block** so it only loads when the block renders:\n\n```php\nadd_action( 'init', function () {\n\twp_enqueue_block_style( 'core\u002Fgroup', array(\n\t\t'handle' => 'mytheme-group',\n\t\t'src'    => get_theme_file_uri( 'assets\u002Fblocks\u002Fgroup.css' ),\n\t\t'path'   => get_theme_file_path( 'assets\u002Fblocks\u002Fgroup.css' ),\n\t) );\n} );\n```\n\nRule: never hand-write `\u003Clink>`\u002F`\u003Cscript>` tags in templates — the browser cannot cache them and you lose dependency management. Always enqueue. And never edit a parent theme directly; make a child theme.\n\n## Plugins\n\nA plugin is a folder with a headered main file. That header is what makes it a plugin:\n\n```php\n\u003C?php\n\u002F**\n * Plugin Name: Acme Books\n * Description: Registers the book CPT and a related block.\n * Version:     1.0.0\n * Requires PHP: 8.4\n * Requires at least: 6.9\n *\u002F\ndefined( 'ABSPATH' ) || exit; \u002F\u002F never expose a direct hit\n```\n\nHooks split two ways: **actions** fire at a point in execution (`add_action('init', …)`); **filters** transform a value and must `return` it (`add_filter('the_content', …)`). Confusing them is a top-five WP bug.\n\nRegister a block from a `block.json` — never duplicate metadata in PHP:\n\n```php\nadd_action( 'init', function () {\n\tregister_block_type( __DIR__ . '\u002Fbuild\u002Frelated-books' ); \u002F\u002F reads block.json\n} );\n```\n\nRegister a custom post type with explicit capabilities and labels:\n\n```php\nadd_action( 'init', function () {\n\tregister_post_type( 'book', array(\n\t\t'public'       => true,\n\t\t'show_in_rest' => true, \u002F\u002F required for the block editor\n\t\t'supports'     => array( 'title', 'editor', 'thumbnail' ),\n\t\t'labels'       => array( 'name' => 'Books', 'singular_name' => 'Book' ),\n\t) );\n} );\n```\n\nEvery write path needs a **capability check + nonce**, and every output\u002Fquery needs escaping\u002Fsanitizing. This is the line between a plugin and a vulnerability.\n\n```php\n\u002F\u002F Bad — SQL injection, no auth\n$rows = $wpdb->get_results( \"SELECT * FROM {$wpdb->posts} WHERE post_author = $id\" );\n\n\u002F\u002F Good — capability, nonce, prepared statement\nif ( ! current_user_can( 'edit_posts' ) ) { wp_die( 'nope' ); }\ncheck_admin_referer( 'acme_save' );\n$rows = $wpdb->get_results( $wpdb->prepare(\n\t\"SELECT * FROM {$wpdb->posts} WHERE post_author = %d\", $id\n) );\necho esc_html( $rows[0]->post_title );\n```\n\nSanitize on input (`sanitize_text_field`, `absint`), escape on output (`esc_html`, `esc_attr`, `esc_url`, `wp_kses` for allowed HTML).\n\n## Security hardening\n\nThe single highest-impact habit is keeping core, plugins, and themes updated — 2024 saw 7,966 new ecosystem vulnerabilities, +34% YoY, and the vast majority hit known-vulnerable extensions. Baseline `wp-config.php` constants:\n\n```php\ndefine( 'DISALLOW_FILE_EDIT', true );  \u002F\u002F kills dashboard Theme\u002FPlugin editor; SFTP\u002FGit unaffected\ndefine( 'WP_AUTO_UPDATE_CORE', 'minor' );\ndefine( 'FORCE_SSL_ADMIN', true );\n```\n\nUse **Application Passwords** (WP 5.6+) for REST\u002FAPI machine auth — individually revocable, cannot log into `wp-login.php`, and the right answer when a script or [nextjs](..\u002Fnextjs\u002FSKILL.md) front end needs to talk to WP. Never reuse the admin password in a script.\n\nFor the full block — file-permission matrix (dirs 755 \u002F files 644 \u002F wp-config 600), `DISALLOW_FILE_MODS`, nginx\u002F.htaccess security headers, login lockdown, XML-RPC and user-enumeration disabling, version-disclosure removal — see [references\u002Fhardening.md](references\u002Fhardening.md). Generic OWASP\u002Fthreat-modeling not tied to the WP attack surface is [secure-coding](..\u002Fsecure-coding\u002FSKILL.md).\n\n## Performance\n\nTwo caches, different jobs: an **object cache** (Redis\u002FMemcached via a drop-in) memoizes DB query results across requests; a **page cache** stores whole rendered HTML pages. You usually want both. Then:\n\n- **Audit autoloaded options** first when wp-admin crawls — a few MB of autoloaded junk loads on *every* request. Find offenders with the SQL in the reference.\n- Enqueue assets per block (above); defer\u002Fasync non-critical scripts.\n- Speculative loading (prerender\u002Fprefetch on hover) ships in 6.8+; tune it rather than bolting on a plugin.\n\nFull Redis wiring, the autoload audit query, transients, and a WP-tied Core Web Vitals checklist are in [references\u002Fperformance.md](references\u002Fperformance.md). Generic CWV\u002Fload-testing methodology divorced from WordPress is the [performance](..\u002Fperformance\u002FSKILL.md) sibling.\n\n## WooCommerce\n\n**HPOS** (High-Performance Order Storage) is the default order datastore for new installs since WooCommerce 8.2 — orders live in dedicated tables, not `wp_posts`. Enable\u002Fmigrate and verify with WP-CLI:\n\n```bash\nwp wc hpos enable            # turn on custom order tables\nwp wc cot sync               # backfill\u002Fsync existing orders\nwp wc cot verify_cot_data    # confirm parity before flipping authority\n```\n\nAny plugin that touches orders **must declare HPOS compatibility**, or WooCommerce disables it in HPOS mode:\n\n```php\nadd_action( 'before_woocommerce_init', function () {\n\tif ( class_exists( \\Automattic\\WooCommerce\\Utilities\\FeaturesUtil::class ) ) {\n\t\t\\Automattic\\WooCommerce\\Utilities\\FeaturesUtil::declare_compatibility(\n\t\t\t'custom_order_tables', __FILE__, true\n\t\t);\n\t}\n} );\n```\n\nStore\u002Fcheckout\u002Fproduct setup checklist and migration caveats: [references\u002Fwoocommerce.md](references\u002Fwoocommerce.md). A Shopify store is the [shopify](..\u002Fshopify\u002FSKILL.md) sibling.\n\n## WP-CLI & local dev\n\n`wp` is the operational backbone — scriptable, faster than the dashboard, and safe on serialized data.\n\n- **Local stack:** `wp-env start` (Dockerized WP). Scaffold a block\u002Fplugin with `npx @wordpress\u002Fcreate-block acme-block`.\n- **Migrations:** `wp search-replace` is serialization-safe — never run a raw SQL `REPLACE` on the DB, it corrupts serialized arrays. Dry-run first:\n\n```bash\nwp search-replace 'https:\u002F\u002Fstaging.example.com' 'https:\u002F\u002Fexample.com' --all-tables --dry-run\nwp db export backup.sql        # always export before a real run\nwp search-replace 'https:\u002F\u002Fstaging.example.com' 'https:\u002F\u002Fexample.com' --all-tables\n```\n\n- **Cron:** WP's pseudo-cron only fires on traffic. For reliable schedules, define `DISABLE_WP_CRON` true and run `wp cron event run --due-now` from real system cron.\n\n## Anti-patterns\n\n| Anti-pattern | Why it's wrong | Do instead |\n| --- | --- | --- |\n| App logic in `functions.php` | Dies with the theme; not portable | Standalone plugin or mu-plugin |\n| Editing a parent theme \u002F core files | Wiped on update | Child theme; hooks\u002Ffilters |\n| `query_posts()` | Breaks the main query, no pagination | `WP_Query` or `pre_get_posts` |\n| `$wpdb->query(\"… $var …\")` | SQL injection | `$wpdb->prepare()` with `%d`\u002F`%s` |\n| `\u003Cscript src>`\u002F`\u003Clink>` in templates | Not cached, no dependency graph | `wp_enqueue_script\u002Fstyle`, `wp_enqueue_block_style` |\n| Secrets pasted in dashboard file editor | Logged, world-readable, version-control blind | `wp-config.php` constants + `DISALLOW_FILE_EDIT` |\n| Page builder for structural layout | Bloat, lock-in, broken CWV | Block theme + patterns |\n| Disabling auto-updates, never patching | 7,966 vulns\u002Fyr land on stale plugins | `WP_AUTO_UPDATE_CORE`; `wp plugin update --all` |\n| Raw SQL `REPLACE` to change URLs | Corrupts serialized data | `wp search-replace` |\n| Order-touching plugin without HPOS declaration | WooCommerce disables it | `FeaturesUtil::declare_compatibility` |\n\n## verify.sh\n\n`scripts\u002Fverify.sh \u003Cpath>` statically scans theme\u002Fplugin\u002Fconfig code for these anti-patterns — committed DB creds or `AUTH_KEY`\u002Fsalt literals, missing `DISALLOW_FILE_EDIT` when a `wp-config.php` is in scope, `eval(`\u002F`base64_decode(`, `query_posts(`, unprepared `$wpdb` interpolation, and hardcoded `\u003Cscript src=`\u002F`\u003Clink rel=\"stylesheet\">` in PHP templates. Read-only; exits 0 on a clean or empty target, non-zero on any FAIL so it can gate CI.\n","# WordPress\n\nYou are building the WordPress application layer — themes, plugins, the dashboard\u002FCLI surface, security, and stores — for someone treating WordPress as the product. Know the difference between a `functions.php` hack and a real plugin. Refuse to paste secrets into the dashboard file editor. Pick block themes over page builders by default. Reach for `wp` before clicking through wp-admin.\n\nThis is not generic PHP. If there is no WordPress API in sight (value objects, Composer\u002FPSR-4, PHPStan), that is [php](..\u002Fphp\u002FSKILL.md). A Laravel app is [laravel](..\u002Flaravel\u002FSKILL.md).\n\n## Version & runtime targeting\n\nTarget current. Stale version assumptions are the most common way WP code rots.\n\n- **WordPress 6.9** (released 2025-12-02) is current; it refines speculative loading and supports PHP 8.5. WP 6.8 (\"Cecil\", 2025-04-15) added bcrypt password hashing and speculative loading. *Why: features below assume 6.6+ APIs (`wp_enqueue_block_style`, theme.json v3).*\n- **PHP 8.4 is the recommended runtime for 2026.** WP 6.9 fully supports PHP 8.5; WP 6.8+ fully supports 8.4; WP 6.4+ supports 8.3. **Never target PHP 7.x or 8.0–8.2 for new code — all EOL.** *Why: writing for a dead runtime ships deprecation bugs the host will eventually refuse to run.*\n- **theme.json v3** is the schema for new block themes (WP 6.6+). Locally set `WP_DEVELOPMENT_MODE` to `all` so theme.json edits are not cached for 30+ seconds. *Why: without it you will edit theme.json, see nothing change, and waste an hour.*\n\n```php\n\u002F\u002F wp-config.php — local dev only, never on production\ndefine( 'WP_DEVELOPMENT_MODE', 'all' );\ndefine( 'WP_DEBUG', true );\ndefine( 'SCRIPT_DEBUG', true );\n```\n\n## Decision: how heavy is the change?\n\nPick the lightest artifact that survives an update. The failure mode is everyone reaching for `functions.php` or editing files that get overwritten.\n\n| You need to… | Artifact | Do NOT |\n| --- | --- | --- |\n| One-line tweak, site-specific behavior | mu-plugin in `wp-content\u002Fmu-plugins\u002F` | dump it in the active theme's `functions.php` |\n| Change look of a third-party theme | **child theme** | edit the parent theme — updates wipe it |\n| Reusable feature, hooks, blocks, CPTs | **standalone plugin** | hide app logic in `functions.php` |\n| Full custom front end | **block theme** + theme.json v3 | reach for a page builder for structural layout |\n| Sell products | block theme + **WooCommerce** | hand-roll a cart |\n\n## Block themes\n\nA block theme is `theme.json` + HTML templates in `templates\u002F` and `parts\u002F`. Start from a v3 skeleton:\n\n```json\n{\n  \"$schema\": \"https:\u002F\u002Fschemas.wp.org\u002Ftrunk\u002Ftheme.json\",\n  \"version\": 3,\n  \"settings\": {\n    \"appearanceTools\": true,\n    \"color\": {\n      \"palette\": [\n        { \"slug\": \"base\", \"color\": \"#ffffff\", \"name\": \"Base\" },\n        { \"slug\": \"contrast\", \"color\": \"#111111\", \"name\": \"Contrast\" }\n      ]\n    },\n    \"typography\": {\n      \"fluid\": true,\n      \"fontFamilies\": [\n        { \"fontFamily\": \"system-ui, sans-serif\", \"slug\": \"system\", \"name\": \"System\" }\n      ]\n    },\n    \"layout\": { \"contentSize\": \"640px\", \"wideSize\": \"1100px\" }\n  },\n  \"styles\": {\n    \"color\": { \"background\": \"var(--wp--preset--color--base)\", \"text\": \"var(--wp--preset--color--contrast)\" }\n  }\n}\n```\n\nTemplates resolve by hierarchy: `templates\u002Findex.html` is the fallback; `single.html`, `archive.html`, `page.html`, `404.html` override it. Reusable chunks live in `parts\u002F` (`header.html`, `footer.html`).\n\nRegister patterns by dropping PHP-headered HTML in `patterns\u002F`; they appear in the inserter automatically. Enqueue CSS **per block** so it only loads when the block renders:\n\n```php\nadd_action( 'init', function () {\n\twp_enqueue_block_style( 'core\u002Fgroup', array(\n\t\t'handle' => 'mytheme-group',\n\t\t'src'    => get_theme_file_uri( 'assets\u002Fblocks\u002Fgroup.css' ),\n\t\t'path'   => get_theme_file_path( 'assets\u002Fblocks\u002Fgroup.css' ),\n\t) );\n} );\n```\n\nRule: never hand-write `\u003Clink>`\u002F`\u003Cscript>` tags in templates — the browser cannot cache them and you lose dependency management. Always enqueue. And never edit a parent theme directly; make a child theme.\n\n## Plugins\n\nA plugin is a folder with a headered main file. That header is what makes it a plugin:\n\n```php\n\u003C?php\n\u002F**\n * Plugin Name: Acme Books\n * Description: Registers the book CPT and a related block.\n * Version:     1.0.0\n * Requires PHP: 8.4\n * Requires at least: 6.9\n *\u002F\ndefined( 'ABSPATH' ) || exit; \u002F\u002F never expose a direct hit\n```\n\nHooks split two ways: **actions** fire at a point in execution (`add_action('init', …)`); **filters** transform a value and must `return` it (`add_filter('the_content', …)`). Confusing them is a top-five WP bug.\n\nRegister a block from a `block.json` — never duplicate metadata in PHP:\n\n```php\nadd_action( 'init', function () {\n\tregister_block_type( __DIR__ . '\u002Fbuild\u002Frelated-books' ); \u002F\u002F reads block.json\n} );\n```\n\nRegister a custom post type with explicit capabilities and labels:\n\n```php\nadd_action( 'init', function () {\n\tregister_post_type( 'book', array(\n\t\t'public'       => true,\n\t\t'show_in_rest' => true, \u002F\u002F required for the block editor\n\t\t'supports'     => array( 'title', 'editor', 'thumbnail' ),\n\t\t'labels'       => array( 'name' => 'Books', 'singular_name' => 'Book' ),\n\t) );\n} );\n```\n\nEvery write path needs a **capability check + nonce**, and every output\u002Fquery needs escaping\u002Fsanitizing. This is the line between a plugin and a vulnerability.\n\n```php\n\u002F\u002F Bad — SQL injection, no auth\n$rows = $wpdb->get_results( \"SELECT * FROM {$wpdb->posts} WHERE post_author = $id\" );\n\n\u002F\u002F Good — capability, nonce, prepared statement\nif ( ! current_user_can( 'edit_posts' ) ) { wp_die( 'nope' ); }\ncheck_admin_referer( 'acme_save' );\n$rows = $wpdb->get_results( $wpdb->prepare(\n\t\"SELECT * FROM {$wpdb->posts} WHERE post_author = %d\", $id\n) );\necho esc_html( $rows[0]->post_title );\n```\n\nSanitize on input (`sanitize_text_field`, `absint`), escape on output (`esc_html`, `esc_attr`, `esc_url`, `wp_kses` for allowed HTML).\n\n## Security hardening\n\nThe single highest-impact habit is keeping core, plugins, and themes updated — 2024 saw 7,966 new ecosystem vulnerabilities, +34% YoY, and the vast majority hit known-vulnerable extensions. Baseline `wp-config.php` constants:\n\n```php\ndefine( 'DISALLOW_FILE_EDIT', true );  \u002F\u002F kills dashboard Theme\u002FPlugin editor; SFTP\u002FGit unaffected\ndefine( 'WP_AUTO_UPDATE_CORE', 'minor' );\ndefine( 'FORCE_SSL_ADMIN', true );\n```\n\nUse **Application Passwords** (WP 5.6+) for REST\u002FAPI machine auth — individually revocable, cannot log into `wp-login.php`, and the right answer when a script or [nextjs](..\u002Fnextjs\u002FSKILL.md) front end needs to talk to WP. Never reuse the admin password in a script.\n\nFor the full block — file-permission matrix (dirs 755 \u002F files 644 \u002F wp-config 600), `DISALLOW_FILE_MODS`, nginx\u002F.htaccess security headers, login lockdown, XML-RPC and user-enumeration disabling, version-disclosure removal — see [references\u002Fhardening.md](references\u002Fhardening.md). Generic OWASP\u002Fthreat-modeling not tied to the WP attack surface is [secure-coding](..\u002Fsecure-coding\u002FSKILL.md).\n\n## Performance\n\nTwo caches, different jobs: an **object cache** (Redis\u002FMemcached via a drop-in) memoizes DB query results across requests; a **page cache** stores whole rendered HTML pages. You usually want both. Then:\n\n- **Audit autoloaded options** first when wp-admin crawls — a few MB of autoloaded junk loads on *every* request. Find offenders with the SQL in the reference.\n- Enqueue assets per block (above); defer\u002Fasync non-critical scripts.\n- Speculative loading (prerender\u002Fprefetch on hover) ships in 6.8+; tune it rather than bolting on a plugin.\n\nFull Redis wiring, the autoload audit query, transients, and a WP-tied Core Web Vitals checklist are in [references\u002Fperformance.md](references\u002Fperformance.md). Generic CWV\u002Fload-testing methodology divorced from WordPress is the [performance](..\u002Fperformance\u002FSKILL.md) sibling.\n\n## WooCommerce\n\n**HPOS** (High-Performance Order Storage) is the default order datastore for new installs since WooCommerce 8.2 — orders live in dedicated tables, not `wp_posts`. Enable\u002Fmigrate and verify with WP-CLI:\n\n```bash\nwp wc hpos enable            # turn on custom order tables\nwp wc cot sync               # backfill\u002Fsync existing orders\nwp wc cot verify_cot_data    # confirm parity before flipping authority\n```\n\nAny plugin that touches orders **must declare HPOS compatibility**, or WooCommerce disables it in HPOS mode:\n\n```php\nadd_action( 'before_woocommerce_init', function () {\n\tif ( class_exists( \\Automattic\\WooCommerce\\Utilities\\FeaturesUtil::class ) ) {\n\t\t\\Automattic\\WooCommerce\\Utilities\\FeaturesUtil::declare_compatibility(\n\t\t\t'custom_order_tables', __FILE__, true\n\t\t);\n\t}\n} );\n```\n\nStore\u002Fcheckout\u002Fproduct setup checklist and migration caveats: [references\u002Fwoocommerce.md](references\u002Fwoocommerce.md). A Shopify store is the [shopify](..\u002Fshopify\u002FSKILL.md) sibling.\n\n## WP-CLI & local dev\n\n`wp` is the operational backbone — scriptable, faster than the dashboard, and safe on serialized data.\n\n- **Local stack:** `wp-env start` (Dockerized WP). Scaffold a block\u002Fplugin with `npx @wordpress\u002Fcreate-block acme-block`.\n- **Migrations:** `wp search-replace` is serialization-safe — never run a raw SQL `REPLACE` on the DB, it corrupts serialized arrays. Dry-run first:\n\n```bash\nwp search-replace 'https:\u002F\u002Fstaging.example.com' 'https:\u002F\u002Fexample.com' --all-tables --dry-run\nwp db export backup.sql        # always export before a real run\nwp search-replace 'https:\u002F\u002Fstaging.example.com' 'https:\u002F\u002Fexample.com' --all-tables\n```\n\n- **Cron:** WP's pseudo-cron only fires on traffic. For reliable schedules, define `DISABLE_WP_CRON` true and run `wp cron event run --due-now` from real system cron.\n\n## Anti-patterns\n\n| Anti-pattern | Why it's wrong | Do instead |\n| --- | --- | --- |\n| App logic in `functions.php` | Dies with the theme; not portable | Standalone plugin or mu-plugin |\n| Editing a parent theme \u002F core files | Wiped on update | Child theme; hooks\u002Ffilters |\n| `query_posts()` | Breaks the main query, no pagination | `WP_Query` or `pre_get_posts` |\n| `$wpdb->query(\"… $var …\")` | SQL injection | `$wpdb->prepare()` with `%d`\u002F`%s` |\n| `\u003Cscript src>`\u002F`\u003Clink>` in templates | Not cached, no dependency graph | `wp_enqueue_script\u002Fstyle`, `wp_enqueue_block_style` |\n| Secrets pasted in dashboard file editor | Logged, world-readable, version-control blind | `wp-config.php` constants + `DISALLOW_FILE_EDIT` |\n| Page builder for structural layout | Bloat, lock-in, broken CWV | Block theme + patterns |\n| Disabling auto-updates, never patching | 7,966 vulns\u002Fyr land on stale plugins | `WP_AUTO_UPDATE_CORE`; `wp plugin update --all` |\n| Raw SQL `REPLACE` to change URLs | Corrupts serialized data | `wp search-replace` |\n| Order-touching plugin without HPOS declaration | WooCommerce disables it | `FeaturesUtil::declare_compatibility` |\n\n## verify.sh\n\n`scripts\u002Fverify.sh \u003Cpath>` statically scans theme\u002Fplugin\u002Fconfig code for these anti-patterns — committed DB creds or `AUTH_KEY`\u002Fsalt literals, missing `DISALLOW_FILE_EDIT` when a `wp-config.php` is in scope, `eval(`\u002F`base64_decode(`, `query_posts(`, unprepared `$wpdb` interpolation, and hardcoded `\u003Cscript src=`\u002F`\u003Clink rel=\"stylesheet\">` in PHP templates. Read-only; exits 0 on a clean or empty target, non-zero on any FAIL so it can gate CI.\n",{"name":5,"tags":24,"origin":31,"recommends":32,"description":7},[5,25,26,27,28,29,30],"woocommerce","block-themes","wp-cli","php","security-hardening","performance","risco",[28,33,30,34,35],"secure-coding","mysql","shopify","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Fwordpress-ericrisco__rsc-harness",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill wordpress",{"tool":50,"command":51},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill wordpress",{"tool":53,"command":54},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill wordpress","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fwordpress-ericrisco__rsc-harness\u002FSKILL.md",true,[58,64,68,72,76],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"evals\u002Fcases.yaml","REFERENCE","参考文档",3201,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fwordpress-ericrisco__rsc-harness\u002Fevals\u002Fcases.yaml",{"path":65,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":66,"sourceHtmlUrl":67},"evals\u002FREADME.md",851,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fwordpress-ericrisco__rsc-harness\u002Fevals\u002FREADME.md",{"path":69,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fhardening.md",3921,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fwordpress-ericrisco__rsc-harness\u002Freferences\u002Fhardening.md",{"path":73,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fperformance.md",3240,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fwordpress-ericrisco__rsc-harness\u002Freferences\u002Fperformance.md",{"path":77,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fwoocommerce.md",2694,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fwordpress-ericrisco__rsc-harness\u002Freferences\u002Fwoocommerce.md",[81,89,94,101,108,115],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":88},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":90,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":88},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":88},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":88},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":88},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":88},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]