wp-guard
Skill by amElnagdy
Reviews generated or changed WordPress code before it ships. Enforces escaping, nonces, prepared queries, translation-ready strings and query discipline for plugins, themes and blocks. Built for developers using AI agents to write WordPress code.
Install wp-guard
Built from the published package, never by AI.
git clone --depth 1 https://github.com/amElnagdy/guard-skills /tmp/guard-skills && mkdir -p ~/.claude/skills && cp -r /tmp/guard-skills/skills/wp-guard ~/.claude/skills/wp-guardRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/amElnagdy/guard-skills /tmp/guard-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/guard-skills/skills/wp-guard ~/.gemini/antigravity-cli/skills/wp-guardAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
wp-guard is an agent skill that reviews WordPress code after an assistant writes or changes it. It covers plugins, themes and blocks. It applies rules on escaping and sanitization, nonces and capability checks, prepared database queries, core API use, translation-ready strings, and query and caching discipline. The security rules are marked as must fix.
The skill has two modes. Guard-pass mode applies the rules to a diff or target files and runs a self-check before delivery. Review mode walks a checklist and produces a structured findings report, and does not edit code unless asked. WooCommerce logic is sent to woo-guard, generic code quality to clean-code-guard, and test code to test-guard. It is for developers who use AI agents to write WordPress code.
Written from the project's SKILL.md and checked against it.
What it can do
- Escaping and sanitizationRequires context-correct escaping on output and unslashed, sanitized request data.
- Nonces and capability checksRequires both a nonce and current_user_can() on handlers and routes that change state.
- Prepared database queriesRequires $wpdb->prepare() for any query that contains a variable.
- Core API firstPrefers core APIs such as wp_remote_get, wp_enqueue_script and WP-Cron over custom code.
- Translation-ready stringsChecks text domains, translator comments, _n() plurals and wp_date() usage.
- Query and caching disciplineFlags unbounded queries, uncached remote calls and unconditional asset enqueues.
- Structured review reportGroups findings by file, lists security issues first, and gives a rule, risk and fix for each.
Try asking
- Review this plugin before I ship it.
- Is this AJAX handler safe to ship?
- Make the strings in this shortcode translatable.
Good to know
- Does not run PHPCS, PHPStan or Plugin Check.
- Does not decide plugin architecture or business logic.
- Review mode does not edit code unless asked.
- WooCommerce-specific order, product and checkout logic goes to woo-guard.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/wp-guard/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md10 KB -
agents/openai.yaml235 B -
references/i18n.md4 KB -
references/performance.md4 KB -
references/review-checklist.md3 KB
Show all 7 files
-
references/security.md5 KB -
references/sources.md2 KB
Alternatives to wp-guard
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
wp-guard: common questions
Does wp-guard replace PHPCS?
No. The skill does not run PHPCS, PHPStan or Plugin Check. The source says the project's tooling handles mechanical checks, and this skill is the judgment layer above it.
When should wp-guard be used?
It is best used after an agent writes, edits or reviews WordPress code. It also fits requests such as "is this safe to ship" or "make this translatable".
Does wp-guard cover WooCommerce?
Not WooCommerce-specific order, product or checkout logic. The source sends that work to woo-guard.
How do I install wp-guard?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is wp-guard free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is wp-guard safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to wp-guard?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
