How amelnagdy/guard-skills works
1. This repository is a content-first skills package for coding agents, not an application runtime. Its architecture is centered on a small set of reusable “guard” skills that act as second-pass review gates over agent-generated work.
2. The root package is defined by README.md, LICENSE, skills.sh.json, and the skills/ directory. The README explains the public contract: install the package with the Skills CLI, then invoke a specific guard on a diff or task output before merge or release.
3. The main functional subsystems are the five skill bundles:
- clean-code-guard
- test-guard
- docs-guard
- wp-guard
- woo-guard
Each bundle targets a different failure domain: general code quality, test quality, documentation accuracy, WordPress-specific safety, and WooCommerce-specific correctness.
4. Each skill follows the same internal shape, which is the key architectural pattern in the repo:
- SKILL.md as the entry point and short operating contract
- agents/openai.yaml as agent metadata
- references/ as deeper, topic-specific guidance loaded only when needed
This creates a progressive disclosure model: the top-level skill stays lightweight, while detailed rules live in references.
5. The primary data flow is agent output → guard review → corrective feedback. The repo is designed for reactive use: an external coding agent produces code, tests, or docs; the chosen guard is then applied to the produced diff; the guard returns review findings before the changes are shipped.
6. The boundary between packages is semantic, not technical. clean-code-guard is cross-cutting and language-agnostic, while the other four are domain-specialized overlays. woo-guard explicitly builds on WordPress concerns and extends them into WooCommerce/H POS/order and money-handling rules.
7. The reference files are the repository’s knowledge base. They encode the review heuristics, checklists, and source citations that make each guard useful. For example, docs-guard includes verification-oriented references, while wp-guard and woo-guard contain security, i18n, checkout, and compatibility guidance.
8. There is no executable product code, no server, no build pipeline, and no runtime infrastructure in this repo. Its implementation surface is entirely static content: Markdown guidance plus lightweight YAML agent descriptors. That means the architecture diagram should emphasize package composition and review workflow, not application deployment.
9. The repo is intended to be consumed through the Skills CLI and supported agents such as Claude Code, Codex, Cursor, and OpenCode. The README shows installation modes at package, single-skill, agent-specific, and global scope, which indicates that distribution is externalized through the CLI rather than bundled tooling in this repo.
10. External service usage is minimal and limited to the package ecosystem. The README links to skills.sh for installation and package discovery, but the repository itself does not depend on network services, APIs, or credentials at runtime. That keeps the trust boundary simple: content is inspectable and self-contained.
11. The repo’s validation posture is also part of the architecture. The README describes maintainers using skillspector and local validation before publishing, reinforcing that correctness is enforced by repository inspection and metadata validation, not by executable tests inside the repo.
12. For diagramming purposes, the most accurate mental model is:
- a root package shell
- five independently installable guard modules
- each module containing a small entrypoint, agent metadata, and reference corpus
- an external agent/CLI consumer that loads the right skill and applies it to code, tests, or docs before release
13. In short, this repository is a modular rule-pack library for AI code review, optimized for small entrypoints, deferred detail loading, and clear domain separation. Its main architectural concern is not data processing but how quality checks are packaged, selected, and applied across different kinds of generated work.
Main entry points: skills Skills dir · clean-code-guard/SKILL.md Clean code · docs-guard/SKILL.md Docs guard · wp-guard/SKILL.md WP guard
Components 22
Root package
Repository shell and distribution metadata.
- README · Public install and invocation contract for the skill package.
README.md - License · Repository licensing terms.
LICENSE - Skills manifest · Package metadata used by Skills CLI discovery and installation.
skills.sh.json - Skills dir · Container for the modular guard bundles.
skills
External consumers
Tools and agents that install or invoke guards from outside the repo.
- Skills CLI · External consumer that installs and resolves skills from the package.
- Coding agents · Claude Code, Codex, Cursor, OpenCode, and similar consumers.
- Skillspector · Local validation used by maintainers before publishing.
Clean code guard
Cross-cutting guard for general code quality.
- Clean code · Entry skill for general code-quality review.
skills/clean-code-guard/SKILL.md - Agent meta · OpenAI-oriented agent metadata for the clean-code guard.
skills/clean-code-guard/agents/openai.yaml - Guidance · Heuristics and review notes for clean-code decisions.
skills/clean-code-guard/references
Test guard
Guard for test quality across runtimes.
- Test guard · Entry skill for test quality review.
skills/test-guard/SKILL.md - Agent meta · OpenAI-oriented agent metadata for the test guard.
skills/test-guard/agents/openai.yaml - Guidance · Framework-specific testing guidance and review notes.
skills/test-guard/references
Docs guard
Guard for documentation accuracy and verification.
- Docs guard · Entry skill for documentation review.
skills/docs-guard/SKILL.md - Agent meta · OpenAI-oriented agent metadata for the docs guard.
skills/docs-guard/agents/openai.yaml - Guidance · Verification, docstring, and example guidance for docs review.
skills/docs-guard/references
WordPress guard
Guard for WordPress-specific safety and conventions.
- WP guard · Entry skill for WordPress-specific review.
skills/wp-guard/SKILL.md - Agent meta · OpenAI-oriented agent metadata for the WordPress guard.
skills/wp-guard/agents/openai.yaml - Guidance · Security, i18n, and performance guidance for WordPress review.
skills/wp-guard/references
WooCommerce guard
Guard for WooCommerce-specific correctness and commerce rules.
- Woo guard · Entry skill for WooCommerce-specific review.
skills/woo-guard/SKILL.md - Agent meta · OpenAI-oriented agent metadata for the WooCommerce guard.
skills/woo-guard/agents/openai.yaml - Guidance · Checkout, money handling, and HPOS/CRUD guidance for WooCommerce review.
skills/woo-guard/references
Connections 25
- Skills CLI → Skills manifest: discovers · CLI reads package metadata to install or resolve guards.
- Skills CLI → Skills dir: loads · CLI installs the selected skill bundle from the package.
- Coding agents → Skills CLI: invoke · External agents call into the CLI or its installed skills.
- Skillspector → Skills manifest: validates · Maintainers validate package metadata before publishing.
- README → Skills CLI: documents · README describes installation and invocation patterns.
- Skills dir → Clean code: contains · Root skills directory contains the clean-code guard bundle.
- Skills dir → Test guard: contains · Root skills directory contains the test guard bundle.
- Skills dir → Docs guard: contains · Root skills directory contains the docs guard bundle.
- Skills dir → WP guard: contains · Root skills directory contains the WordPress guard bundle.
- Skills dir → Woo guard: contains · Root skills directory contains the WooCommerce guard bundle.
- Clean code → Agent meta: uses · Skill entrypoint is paired with agent metadata.
- Clean code → Guidance: expands to · Deeper review rules live in references.
- Test guard → Agent meta: uses · Skill entrypoint is paired with agent metadata.
- Test guard → Guidance: expands to · Deeper review rules live in references.
- Docs guard → Agent meta: uses · Skill entrypoint is paired with agent metadata.
- Docs guard → Guidance: expands to · Deeper review rules live in references.
- WP guard → Agent meta: uses · Skill entrypoint is paired with agent metadata.
- WP guard → Guidance: expands to · Deeper review rules live in references.
- Woo guard → Agent meta: uses · Skill entrypoint is paired with agent metadata.
- Woo guard → Guidance: expands to · Deeper review rules live in references.
- Clean code → Test guard: parallel · Both are quality-review gates for generated work.
- Clean code → Docs guard: parallel · Both are quality-review gates for generated work.
- Clean code → WP guard: overlay · WordPress rules extend the general guard model.
- WP guard → Woo guard: specializes · WooCommerce guard builds on WordPress concerns.
- Docs guard → README: matches · Docs guard reinforces documentation and verification contracts.