Guard-Skills Provides Quality Gates for AI-Generated Code Review
Developer amElnagdy released guard-skills, a collection of quality gates designed to catch systematic failure modes in AI-generated code, tests, and documentation before deployment. Unlike tools that guide initial code generation, guard-skills functions as a second-pass review layer with the workflow: "let your agent do the work, then invoke the relevant guard on the diff before you present, commit, or merge it."
Five Specialized Guards Target Different Code Domains
The project includes five domain-specific guards. The clean-code-guard targets production code across languages, detecting LLM code smells, over-abstraction, broad error swallowing, bad names, and SOLID/DRY/KISS/YAGNI violations, with emphasis on AI-specific issues like hardcoded success returns and hallucinated APIs.
The test-guard reviews test suites across frameworks including pytest, Jest, PHPUnit, and Go tests, catching mock abuse, duplicate tests, and assertions verifying implementation details rather than behavior. The docs-guard validates READMEs, docstrings, and API documentation by treating docs as "a list of claims and verify every one against the codebase."
Two WordPress-specific guards complete the set: wp-guard enforces escaping, sanitization, nonces, capabilities, prepared queries, and internationalization, while woo-guard adds WooCommerce-specific enforcement of HPOS compatibility, order CRUD patterns, and checkout validation.
Modular Architecture Works With Multiple AI Agents
Guard-skills uses a modular structure with SKILL.md files as lightweight entry points, agent metadata in agents/openai.yaml, and progressive-disclosure references. The system requires no executable scripts, network calls, or credentials. Installation works via Skills CLI: npx skills add amElnagdy/guard-skills --skill [guard-name] --agent [agent-name].
Users invoke guards through natural language commands like "Use $clean-code-guard on the diff you just produced." The system works with Claude Code, Codex, Cursor, and compatible agents. The project launched June 6, 2026, and achieved 321 GitHub stars within two days, released under MIT license.
Key Takeaways
- Guard-skills provides five specialized quality gates for reviewing AI-generated code, tests, and documentation
- System functions as second-pass review layer after AI agents complete initial work
- Includes WordPress and WooCommerce-specific guards for security and compatibility requirements
- Works with Claude Code, Codex, Cursor via natural language invocation
- Achieved 321 GitHub stars within two days of June 6, 2026 launch under MIT license