WooCommerce Code Review
woocommerce/woocommerce
Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.
Reviews generated or changed WooCommerce code for HPOS safety, CRUD use, checkout validation and money handling before it ships.
$ npx skills add amElnagdy/guard-skills --skill woo-guard -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install amElnagdy/guard-skills woo-guard --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/amElnagdy/guard-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/woo-guard .claude/skills/woo-guard && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "woo-guard" agent skill from https://github.com/amElnagdy/guard-skills/tree/master/skills/woo-guard into .claude/skills/woo-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "woo-guard", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/amElnagdy/guard-skills/tree/master/skills/woo-guardType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add amElnagdy/guard-skills --skill woo-guard -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install amElnagdy/guard-skills woo-guard --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/amElnagdy/guard-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/woo-guard .agents/skills/woo-guard && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "woo-guard" agent skill from https://github.com/amElnagdy/guard-skills/tree/master/skills/woo-guard into .agents/skills/woo-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "woo-guard", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add amElnagdy/guard-skills --skill woo-guard -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install amElnagdy/guard-skills woo-guard --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/amElnagdy/guard-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/woo-guard .cursor/skills/woo-guard && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "woo-guard" agent skill from https://github.com/amElnagdy/guard-skills/tree/master/skills/woo-guard into .cursor/skills/woo-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "woo-guard", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/amElnagdy/guard-skills.git --path skills/woo-guard--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add amElnagdy/guard-skills --skill woo-guard -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install amElnagdy/guard-skills woo-guard --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/amElnagdy/guard-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/woo-guard .gemini/skills/woo-guard && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "woo-guard" agent skill from https://github.com/amElnagdy/guard-skills/tree/master/skills/woo-guard into .gemini/skills/woo-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "woo-guard", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install amElnagdy/guard-skills woo-guardInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add amElnagdy/guard-skills --skill woo-guard -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/amElnagdy/guard-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/woo-guard .github/skills/woo-guard && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "woo-guard" agent skill from https://github.com/amElnagdy/guard-skills/tree/master/skills/woo-guard into .github/skills/woo-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "woo-guard", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add amElnagdy/guard-skills --skill woo-guard -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install amElnagdy/guard-skills woo-guard --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/amElnagdy/guard-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/woo-guard .opencode/skills/woo-guard && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "woo-guard" agent skill from https://github.com/amElnagdy/guard-skills/tree/master/skills/woo-guard into .opencode/skills/woo-guard/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "woo-guard", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
woo-guardReviews generated or changed WooCommerce code for HPOS safety, CRUD use, checkout validation and money handling before it ships.
This is a guard pass for WooCommerce extensions, payment and shipping integrations, checkout customizations and order or product logic, applied after an agent writes or edits code. It targets systematic failures of AI-written Woo code: order meta read through get_post_meta, which breaks on HPOS stores, direct meta writes that skip lookup tables and hooks, checkout validated only in JavaScript, floats for prices, and woocommerce hooks registered before checking that WooCommerce is active.
Three modes exist: guard-pass on a diff or files followed by a self-check, live mode when invoked before writing, and review mode, which walks a checklist and produces a findings report without editing code. A security floor applies throughout: context-correct escaping, unslash and sanitize request data, capability checks plus nonces on state changes, and prepared queries. The agent first reads the project's instructions, the declared WooCommerce range, the order storage mode and the checkout in use. It defers to separate guard skills for plain WordPress, generic review and tests.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit ffa2603. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
WooCommerce Code Guard loads about 2.2k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 254 tokens; SKILL.md has 973 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from amElnagdy/guard-skills at commit ffa2603, republished under its MIT licence (© amElnagdy). 973 words, ~2,158 tokens.
.claude/skills/woo-guard/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.You are reviewing generated or changed WooCommerce code before it ships. Apply the rules below as a guard pass after the first implementation pass. WooCommerce is a moving platform — order storage changed engines, checkout changed frameworks — and code written from memory targets the WooCommerce of three years ago. With money on the line, "works on my demo store" is not a standard.
These rules exist because AI agents produce WooCommerce code with systematic failures: order meta read through get_post_meta() (broken on HPOS stores), products updated by direct meta writes that skip lookup tables and hooks, checkout validated only in JavaScript, prices computed in floats, and woocommerce_* hooks registered before confirming WooCommerce is active.
Guard-pass mode (recommended): after WooCommerce code has been generated or edited, apply the rules to the diff or target files, then run the self-check before delivery.
Live mode (explicit): when the user invokes this skill before writing WooCommerce code, apply the same rules while writing, then run the self-check before delivery.
Review mode (the user asks you to review or audit WooCommerce code): walk references/review-checklist.md and produce a structured findings report. Do not edit code in review mode unless asked.
Security floor — these hold in all WooCommerce code, at maximum severity, because money is on the line:
esc_* function.wp_unslash() then sanitize all request data before it touches logic.$wpdb->prepare() for every query containing a variable.If wp-guard is installed, run it alongside for the full WordPress layer.
class_exists( 'WooCommerce' ) before any wc_* call or woocommerce_* hook.Orders are not posts. Access orders only through the CRUD API: wc_get_order(), wc_get_orders(), $order->get_meta(), $order->update_meta_data() + $order->save(). Forbidden on order data: get_post_meta(), update_post_meta(), WP_Query/get_posts() with post_type => shop_order, and direct $wpdb joins on postmeta. These work on legacy stores and silently break on HPOS stores. Details: references/hpos-and-crud.md.
CRUD objects, getters/setters, then save. Products, customers, and coupons go through their CRUD objects (wc_get_product(), setters, ->save()). Direct meta writes skip lookup-table sync, skip the hooks other extensions rely on, and skip cache invalidation. Stock changes go through wc_update_product_stock() semantics; order state changes through $order->update_status() — which fire the emails and hooks the store expects.
Declare feature compatibility. Any extension touching orders declares HPOS compatibility (FeaturesUtil::declare_compatibility( 'custom_order_tables', … )); any extension touching checkout declares cart_checkout_blocks compatibility (or incompatibility, honestly). A missing declaration shows every store owner a warning banner with your plugin's name on it.
Checkout validation is server-side. Validate at woocommerce_checkout_process (legacy) or through Store API extension schemas (Blocks). JavaScript validation is UX, never security. Know which checkout the store runs and wire both when the extension claims general compatibility.
Money is not a float. Prices and totals go through wc_format_decimal() for storage-safe values, wc_price() for display, and WooCommerce's own tax/rounding settings for arithmetic. No hand-rolled currency symbols, no number_format() on prices, no float equality on totals.
Guard the runtime context. WC()->cart and WC()->session are null in REST, cron, CLI, and admin contexts — check before touching them. Never assume a logged-in customer in webhook or gateway callbacks. Verify every woocommerce_* hook and wc_* function exists in the supported version range — WooCommerce renames and retires hooks across majors.
Hooks over template overrides. Prefer, in order: existing WooCommerce hooks/filters → the woocommerce_locate_template filter → a theme-level override. A template override shipped inside a plugin freezes a copied file at one WooCommerce version and breaks on template updates — flag it in review, always.
Background work scales with order volume. Batch jobs, syncs, and webhook fan-out go through Action Scheduler (bundled with WooCommerce), not raw WP-Cron loops. Handlers are idempotent — order events fire more than once in real stores.
get_post_meta, update_post_meta, post_type => 'shop_order': any of them touching orders? (Rule 1)save()? (Rule 2)number_format() on money? (Rule 5)WC()->cart/WC()->session access that can run in REST/cron/CLI? Any unverified hook name? (Rule 6)If any answer is wrong, fix it before showing the user.
**Rule N violation** in `path/file.php:<line or function>`
- What: <one sentence>
- Risk: <HPOS breakage / skipped hooks / money error / checkout bypass — one phrase>
- Fix: <one sentence>Group by file, lead with Rules 1–5 findings. If a file is clean, don't mention it.
© amElnagdy, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (references) in skills/woo-guard of amElnagdy/guard-skills.
Open the folder on GitHubat commit ffa2603
WooCommerce Code Guard next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| WooCommerce Code Guard this skillamElnagdy/guard-skills | 1.3k | — | ~2.2k | Automated safety check: Pass | MIT | |
| WooCommerce Code Reviewwoocommerce/woocommerce | 11k | 3 repos | ~1.1k | Automated safety check: Pass | Custom licence | |
| WooCommerce Backend Conventionswoocommerce/woocommerce | 11k | 1 repos | ~614 | Automated safety check: Pass | Custom licence | |
| Skill Doli Code ReviewDolibarr/dolibarr | 7.7k | 1 repos | ~1.1k | Automated safety check: Pass | MIT | |
| Dignified Python Standardsdocling-project/docling | 69k | — | ~1.5k | Automated safety check: Pass | Apache-2.0 | |
| Archify Reviewtt-a1i/archify | 82k | — | ~415 | Automated safety check: Pass | MIT |
woocommerce/woocommerce
Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.
woocommerce/woocommerce
Guides agents writing or changing WooCommerce backend PHP so new classes, hooks and unit tests follow the project's conventions.
Dolibarr/dolibarr
Reviews Dolibarr PHP code for compliance with coding standards and security best practices, and fixes identified issues.
docling-project/docling
Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.
tt-a1i/archify
Review Archify issues, PRs, or code through value, cost, and impact to support evidence-based maintenance decisions. Use for issue triage, change reviews, and…
awesome-skills/code-review-skill
Provides comprehensive code review guidance for React 19, Vue 3, Angular 17+, Svelte 5, Rust, TypeScript, Java, Java 8, PHP, Ruby, Rails, Python, Django, FastAPI, Go, C/.NET, Kotlin, Swift, Dart…
amElnagdy/guard-skills
Reviews generated or changed production code against Clean Code, SOLID, DRY, KISS, YAGNI and LLM-specific failure modes before it ships, in any language.
amElnagdy/guard-skills
Reviews newly written or edited tests against nine rules that cut test bloat, such as mock-heavy checks and near-duplicate cases, before they are committed.
amElnagdy/guard-skills
Checks generated or edited documentation against the source code, flagging invented symbols, outdated samples and unverifiable claims before publishing.
amElnagdy/guard-skills
Reviews WordPress plugin, theme and block code after an agent writes or edits it, catching missing escaping, nonces, capability checks and unprepared queries.
Works with
Categories
Reviews generated or changed WooCommerce code for HPOS safety, CRUD use, checkout validation and money handling before it ships. This is a guard pass for WooCommerce extensions, payment and shipping integrations, checkout customizations and order or product logic, applied after an agent writes or edits code. It targets systematic failures of AI-written Woo code: order meta read through get_post_meta, which breaks on HPOS stores, direct meta writes that skip lookup tables and hooks, checkout validated only in JavaScript, floats for prices, and woocommerce hooks registered before checking that WooCommerce is active.
WooCommerce Code Guard fits situations like: reviewing a WooCommerce plugin before release; checking whether order code is compatible with HPOS; auditing checkout customizations for server-side validation; reviewing code that hooks into the order flow or updates stock.
Run `npx skills add amElnagdy/guard-skills --skill woo-guard -a claude-code`. Or copy the skill folder (skills/woo-guard in amElnagdy/guard-skills) into .claude/skills/woo-guard in your project. Claude Code loads it when a task matches its description.
Run `npx skills add amElnagdy/guard-skills --skill woo-guard -a codex`. Or copy the skill folder (skills/woo-guard in amElnagdy/guard-skills) into .agents/skills/woo-guard in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add amElnagdy/guard-skills --skill woo-guard -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/woo-guard, .gemini/skills/woo-guard, .github/skills/woo-guard and .opencode/skills/woo-guard in your project.
SKILL.md names no scripts, command-line tools or credentials: WooCommerce Code Guard is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
WooCommerce Code Guard is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.7k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with WooCommerce Code Guard: WooCommerce Code Review (woocommerce/woocommerce, 11k stars), WooCommerce Backend Conventions (woocommerce/woocommerce, 11k stars), Skill Doli Code Review (Dolibarr/dolibarr, 7.7k stars) and Dignified Python Standards (docling-project/docling, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
amElnagdy (a GitHub user) maintains it in amElnagdy/guard-skills, which has 1,261 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on July 4, 2026.
Source: amElnagdy/guard-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.