Skip to content

Guard Skills

Guard skills for coding agents, quality gates that catch AI-generated failure modes in code, tests, and docs

Install: npx skills add amElnagdy/guard-skills --list

Works with Claude Code, Codex · 1,312 GitHub stars

Install

$npx skills add amElnagdy/guard-skills --list

Install command taken from the project's README or registry entry. Always review code before running it.

guard-skills

Focused guard skills for coding agents: second-pass quality gates that catch the systematic failure modes of AI-generated code, tests, and docs before they ship.

Best use: let your agent do the work, then invoke the relevant guard on the diff before you present, commit, or merge it. These skills can guide writing when you explicitly ask for that, but they are strongest as reactive review passes.

Install

Browse the package first:

npx skills add amElnagdy/guard-skills --list

Install the package:

npx skills add amElnagdy/guard-skills

Or install one guard:

npx skills add amElnagdy/guard-skills --skill clean-code-guard
npx skills add amElnagdy/guard-skills --skill test-guard
npx skills add amElnagdy/guard-skills --skill docs-guard
npx skills add amElnagdy/guard-skills --skill wp-guard
npx skills add amElnagdy/guard-skills --skill woo-guard

Install for a specific agent:

npx skills add amElnagdy/guard-skills --skill clean-code-guard --agent codex
npx skills add amElnagdy/guard-skills --skill test-guard --agent claude-code
npx skills add amElnagdy/guard-skills --skill '*' --agent cursor

Install globally:

npx skills add amElnagdy/guard-skills --global

Works with Claude Code, Codex, Cursor, OpenCode, and other supported agents via the Skills CLI.

Updating

Skills install as a copy, so a new version here does not reach your agent until you update. Refresh them with the Skills CLI:

npx skills update                 # all installed skills (alias: upgrade)
npx skills update clean-code-guard

Add --global for global installs or --project for project installs. Re-running npx skills add amElnagdy/guard-skills also re-fetches the latest.

How to use them

Run a guard after your agent produces work:

Use $clean-code-guard on the diff you just produced.
Use $test-guard on the tests you just wrote.
Use $docs-guard on this README update before we ship it.
Use $wp-guard on this WordPress plugin change.
Use $woo-guard on this WooCommerce checkout change.

Use a guard up front only when you want that constraint active while writing:

Use $wp-guard while implementing this REST endpoint, then self-check before delivery.

Which guard to run

Guard Use after the agent changed Catches Pair with
clean-code-guard Production code in any language LLM code smells, over-abstraction, broad error swallowing, bad names, SOLID/DRY/KISS/YAGNI violations Platform-specific guards
test-guard Test code Mock abuse, duplicate tests, implementation-detail assertions, tests that catch nothing clean-code-guard when test helpers contain real logic
docs-guard READMEs, docstrings, API docs, changelogs, tutorials Hallucinated symbols, broken samples, docs-vs-code drift, unverifiable claims Any guard whose behavior is documented
wp-guard WordPress plugin, theme, block, REST, AJAX, shortcode, query, or WP-CLI code Escaping, sanitization, nonces, capabilities, prepared queries, i18n, query/caching mistakes clean-code-guard; woo-guard when Woo APIs appear
woo-guard WooCommerce extension, checkout, order, product, gateway, shipping, or HPOS code Direct order meta, HPOS breakage, missing compatibility declarations, checkout bypasses, money errors wp-guard for the WordPress layer

The skills

Similar plugs

Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…

Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.

Persistent Context Across Sessions for Every Agent, Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future…

Explore related