wp-guard

wp-guard is a skill for Codex from amElnagdy/guard-skills. It costs 209 tokens per session (2,237 once invoked), scanned B, original, MIT.

A review workflow for WordPress plugins, themes, and blocks before release.

In plain words
What is it for?
Use it to review changed WordPress code and catch unsafe input handling, missing permission checks, risky database queries, or inefficient queries.
Why use it?
It looks for security problems, translation issues, and performance mistakes in code that uses WordPress features such as REST routes, AJAX handlers, database queries, and WP-CLI commands.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Good fit Use it to review changed WordPress code and catch unsafe input handling, missing permission checks, risky database queries, or inefficient queries.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amelnagdy/guard-skills/wp-guard
About the project

guard-skills is a collection of review skills for coding agents that inspect code, tests, and documentation for common AI-generated problems. Developers run the relevant guard after an agent changes a project, before presenting, committing, or merging the work. The catalogue entries are individual guard skills from this collection.

amElnagdy/guard-skills · 1,232 stars · on GitHub · skills.sh

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add amElnagdy/guard-skills --skill wp-guard
Clone the repo
git clone --depth 1 https://github.com/amElnagdy/guard-skills

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wp-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/amelnagdy/guard-skills/wp-guard/github.svg)](https://agentmods.dev/skills/amelnagdy/guard-skills/wp-guard)
Your own site
<a href="https://agentmods.dev/skills/amelnagdy/guard-skills/wp-guard"><img src="https://agentmods.dev/badge/skills/amelnagdy/guard-skills/wp-guard/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wp-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/amelnagdy/guard-skills/wp-guard"><img src="https://agentmods.dev/badge/skills/amelnagdy/guard-skills/wp-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 209 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,237 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 12 Jun 2026
  • Snyk pass 12 Jun 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Anti-Refusal · line 70
    Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.
    Fix: Remove instructions that suppress warnings, disclaimers, or ethical commentary. Let the agent surface safety-relevant caveats to the user.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00209 $0.02237
Opus 5 $0.00105 $0.01118
Sonnet 5 $0.00042 $0.00447
Haiku 4.5 $0.00021 $0.00224

Measured 11d ago against content hash c3308c1d26c1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

wp-guard scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

8. Would this survive WPCS (`WordPress-Extra` + `WordPress-Security`) without warnings you cannot justify?

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

5. **Use the platform; don't reinvent it.** Outbound HTTP via `wp_remote_get()`/`wp_remote_post()`, never curl. Assets via `wp_enqueue_script()`/`wp_enqueue_style()`, never echoed `<script>`/`<style>` tags. Scheduling vi
skills/wp-guard/SKILL.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WP Guard

You are reviewing generated or changed WordPress code before it ships. Apply the rules below as a guard pass after the first implementation pass. Be a sharp reviewer, not a pedantic one: flag what creates vulnerabilities, breaks translations, or melts servers — ignore cosmetic preferences WPCS tooling already handles.

These rules exist because AI agents produce WordPress code with systematic failures: raw echo of request data, AJAX handlers with neither nonce nor capability check, SQL built by string interpolation, English hardcoded into user-facing strings, posts_per_page => -1 on sites with a million posts, and hand-rolled replacements for APIs core already ships. Each one looks fine in a demo and fails in production.

How to use this skill

Guard-pass mode (recommended): after WordPress code has been generated or edited, apply the rules to the diff or target files, then run the self-check before delivery. Fix violations before showing the user.

Live mode (explicit): when the user invokes this skill before writing WordPress code, apply the same rules while writing, then run the self-check before delivery.

Review mode (the user asks you to review, audit, or rate WordPress code): walk references/review-checklist.md against the target files and produce a structured findings report. Do not edit code in review mode unless asked.

Pair this skill with clean-code-guard when both are installed: clean-code-guard owns generic code quality; wp-guard owns the WordPress layer.

Adapt to the project first

  1. Read the project's agent instructions (CLAUDE.md, AGENTS.md), phpcs.xml/WPCS config, and composer.json. Project conventions win on conflict.
  2. Identify the established prefix (functions, options, meta keys, handles) and the minimum supported WP/PHP versions. Match both.
  3. Detect context: WooCommerce APIs in play → apply woo-guard alongside this skill when it is installed; otherwise apply WooCommerce's HPOS, CRUD, and checkout rules from its developer documentation. Multilingual site (WPML/Polylang/multisite) → i18n rules are blocking, not advisory.
  4. Read one neighboring file before writing. Mirror its error handling, hook registration style, and escaping habits — unless they violate the security rules below, which are non-negotiable.

Read the full file on GitHub · 104 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 104 lines · 209 tokens per session scan B c3308c1d26c1

Subscribe to this mod's changes

wp-guard is a skill published in the GitHub repository amElnagdy/guard-skills (1,232 stars, last pushed 2mo ago), licensed MIT. It adds 209 tokens to every session and 2,237 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it B with 2 findings (strips warnings and disclaimers, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.