guard-skills
Guard skills for coding agents: a second pass over the diff that catches typical AI mistakes in code, tests and docs
Low risk
We rate an entry low when it mostly gives the agent instructions and reference material.
Why this level
- The skills consist of review checklists and references
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/guard-skillsDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Assembled automatically, review before installing.
Run in a terminal in the project folder
npx skills add amelnagdy/guard-skills --skill clean-code-guard docs-guard test-guard woo-guard wp-guard -a claude-code -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit ffa2603
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/amelnagdy/guard-skills.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/clean-code-guard/ /skills/docs-guard/ /skills/test-guard/ /skills/woo-guard/ /skills/wp-guard/
git -C "$tmp" checkout ffa26036b7b5e77b20b5d679304a703b6fd1a43d
mkdir -p .claude/skills
cp -R "$tmp/skills/clean-code-guard" .claude/skills/clean-code-guard
cp -R "$tmp/skills/docs-guard" .claude/skills/docs-guard
cp -R "$tmp/skills/test-guard" .claude/skills/test-guard
cp -R "$tmp/skills/woo-guard" .claude/skills/woo-guard
cp -R "$tmp/skills/wp-guard" .claude/skills/wp-guardCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add amelnagdy/guard-skills --skill clean-code-guard docs-guard test-guard woo-guard wp-guard -a cursor -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit ffa2603
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/amelnagdy/guard-skills.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/clean-code-guard/ /skills/docs-guard/ /skills/test-guard/ /skills/woo-guard/ /skills/wp-guard/
git -C "$tmp" checkout ffa26036b7b5e77b20b5d679304a703b6fd1a43d
mkdir -p .agents/skills
cp -R "$tmp/skills/clean-code-guard" .agents/skills/clean-code-guard
cp -R "$tmp/skills/docs-guard" .agents/skills/docs-guard
cp -R "$tmp/skills/test-guard" .agents/skills/test-guard
cp -R "$tmp/skills/woo-guard" .agents/skills/woo-guard
cp -R "$tmp/skills/wp-guard" .agents/skills/wp-guardCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add amelnagdy/guard-skills --skill clean-code-guard docs-guard test-guard woo-guard wp-guard -a github-copilot -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit ffa2603
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/amelnagdy/guard-skills.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/clean-code-guard/ /skills/docs-guard/ /skills/test-guard/ /skills/woo-guard/ /skills/wp-guard/
git -C "$tmp" checkout ffa26036b7b5e77b20b5d679304a703b6fd1a43d
mkdir -p .github/skills
cp -R "$tmp/skills/clean-code-guard" .github/skills/clean-code-guard
cp -R "$tmp/skills/docs-guard" .github/skills/docs-guard
cp -R "$tmp/skills/test-guard" .github/skills/test-guard
cp -R "$tmp/skills/woo-guard" .github/skills/woo-guard
cp -R "$tmp/skills/wp-guard" .github/skills/wp-guardCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add amelnagdy/guard-skills --skill clean-code-guard docs-guard test-guard woo-guard wp-guard -a codex -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit ffa2603
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/amelnagdy/guard-skills.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/clean-code-guard/ /skills/docs-guard/ /skills/test-guard/ /skills/woo-guard/ /skills/wp-guard/
git -C "$tmp" checkout ffa26036b7b5e77b20b5d679304a703b6fd1a43d
mkdir -p .agents/skills
cp -R "$tmp/skills/clean-code-guard" .agents/skills/clean-code-guard
cp -R "$tmp/skills/docs-guard" .agents/skills/docs-guard
cp -R "$tmp/skills/test-guard" .agents/skills/test-guard
cp -R "$tmp/skills/woo-guard" .agents/skills/woo-guard
cp -R "$tmp/skills/wp-guard" .agents/skills/wp-guardCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add amelnagdy/guard-skills --skill clean-code-guard docs-guard test-guard woo-guard wp-guard -a gemini-cli -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit ffa2603
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/amelnagdy/guard-skills.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/clean-code-guard/ /skills/docs-guard/ /skills/test-guard/ /skills/woo-guard/ /skills/wp-guard/
git -C "$tmp" checkout ffa26036b7b5e77b20b5d679304a703b6fd1a43d
mkdir -p .agents/skills
cp -R "$tmp/skills/clean-code-guard" .agents/skills/clean-code-guard
cp -R "$tmp/skills/docs-guard" .agents/skills/docs-guard
cp -R "$tmp/skills/test-guard" .agents/skills/test-guard
cp -R "$tmp/skills/woo-guard" .agents/skills/woo-guard
cp -R "$tmp/skills/wp-guard" .agents/skills/wp-guardCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/amelnagdy/guard-skills.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/clean-code-guard/ /skills/docs-guard/ /skills/test-guard/ /skills/woo-guard/ /skills/wp-guard/
git -C "$tmp" checkout ffa26036b7b5e77b20b5d679304a703b6fd1a43d
mkdir -p .devin/skills
cp -R "$tmp/skills/clean-code-guard" .devin/skills/clean-code-guard
cp -R "$tmp/skills/docs-guard" .devin/skills/docs-guard
cp -R "$tmp/skills/test-guard" .devin/skills/test-guard
cp -R "$tmp/skills/woo-guard" .devin/skills/woo-guard
cp -R "$tmp/skills/wp-guard" .devin/skills/wp-guardCommands for macOS and Linux, on Windows run them in Git Bash.
Formerly Windsurf.
Run in a terminal in the project folder
npx skills add amelnagdy/guard-skills --skill clean-code-guard docs-guard test-guard woo-guard wp-guard -a cline -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit ffa2603
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/amelnagdy/guard-skills.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/clean-code-guard/ /skills/docs-guard/ /skills/test-guard/ /skills/woo-guard/ /skills/wp-guard/
git -C "$tmp" checkout ffa26036b7b5e77b20b5d679304a703b6fd1a43d
mkdir -p .cline/skills
cp -R "$tmp/skills/clean-code-guard" .cline/skills/clean-code-guard
cp -R "$tmp/skills/docs-guard" .cline/skills/docs-guard
cp -R "$tmp/skills/test-guard" .cline/skills/test-guard
cp -R "$tmp/skills/woo-guard" .cline/skills/woo-guard
cp -R "$tmp/skills/wp-guard" .cline/skills/wp-guardCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
npx skills add amelnagdy/guard-skills --skill clean-code-guard docs-guard test-guard woo-guard wp-guard -a roo -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit ffa2603
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/amelnagdy/guard-skills.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/clean-code-guard/ /skills/docs-guard/ /skills/test-guard/ /skills/woo-guard/ /skills/wp-guard/
git -C "$tmp" checkout ffa26036b7b5e77b20b5d679304a703b6fd1a43d
mkdir -p .roo/skills
cp -R "$tmp/skills/clean-code-guard" .roo/skills/clean-code-guard
cp -R "$tmp/skills/docs-guard" .roo/skills/docs-guard
cp -R "$tmp/skills/test-guard" .roo/skills/test-guard
cp -R "$tmp/skills/woo-guard" .roo/skills/woo-guard
cp -R "$tmp/skills/wp-guard" .roo/skills/wp-guardCommands for macOS and Linux, on Windows run them in Git Bash.
A fork of Roo Code, same .roo folders.
Run in a terminal in the project folder
npx skills add amelnagdy/guard-skills --skill clean-code-guard docs-guard test-guard woo-guard wp-guard -a opencode -yThe skills tool installs the current version from the repository. Add the -g flag to use the skill in every project.
Without third-party tools, from commit ffa2603
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/amelnagdy/guard-skills.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/clean-code-guard/ /skills/docs-guard/ /skills/test-guard/ /skills/woo-guard/ /skills/wp-guard/
git -C "$tmp" checkout ffa26036b7b5e77b20b5d679304a703b6fd1a43d
mkdir -p .agents/skills
cp -R "$tmp/skills/clean-code-guard" .agents/skills/clean-code-guard
cp -R "$tmp/skills/docs-guard" .agents/skills/docs-guard
cp -R "$tmp/skills/test-guard" .agents/skills/test-guard
cp -R "$tmp/skills/woo-guard" .agents/skills/woo-guard
cp -R "$tmp/skills/wp-guard" .agents/skills/wp-guardCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/amelnagdy/guard-skills.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/clean-code-guard/ /skills/docs-guard/ /skills/test-guard/ /skills/woo-guard/ /skills/wp-guard/
git -C "$tmp" checkout ffa26036b7b5e77b20b5d679304a703b6fd1a43d
mkdir -p .agents/skills
cp -R "$tmp/skills/clean-code-guard" .agents/skills/clean-code-guard
cp -R "$tmp/skills/docs-guard" .agents/skills/docs-guard
cp -R "$tmp/skills/test-guard" .agents/skills/test-guard
cp -R "$tmp/skills/woo-guard" .agents/skills/woo-guard
cp -R "$tmp/skills/wp-guard" .agents/skills/wp-guardCommands for macOS and Linux, on Windows run them in Git Bash.
Run in a terminal in the project folder
tmp=$(mktemp -d)
git clone --filter=blob:none --no-checkout https://github.com/amelnagdy/guard-skills.git "$tmp"
git -C "$tmp" sparse-checkout set --no-cone /skills/clean-code-guard/ /skills/docs-guard/ /skills/test-guard/ /skills/woo-guard/ /skills/wp-guard/
git -C "$tmp" checkout ffa26036b7b5e77b20b5d679304a703b6fd1a43d
mkdir -p .agents/skills
cp -R "$tmp/skills/clean-code-guard" .agents/skills/clean-code-guard
cp -R "$tmp/skills/docs-guard" .agents/skills/docs-guard
cp -R "$tmp/skills/test-guard" .agents/skills/test-guard
cp -R "$tmp/skills/woo-guard" .agents/skills/woo-guard
cp -R "$tmp/skills/wp-guard" .agents/skills/wp-guardCommands for macOS and Linux, on Windows run them in Git Bash.
Install the set: npx skills add amElnagdy/guard-skills. For a single skill add --skill, for example --skill clean-code-guard.
Other ways from the author
npx skills add amElnagdy/guard-skillsAdd --skill for a single skill, or --global for a global install.
This is third-party code. Review the repository files before installing.
What it does
guard-skills is a set of review skills that run after the agent has done the work and inspect the diff before commit or merge. clean-code-guard looks for systematic weaknesses in generated code, test-guard reviews tests, docs-guard reviews documentation. There are dedicated checks for WordPress and WooCommerce. The skills are strongest as reactive reviews, but can also guide during writing if asked.
Who it is for. For developers who want an automatic quality gate over the agent's code, tests and documentation.
Good fit when
- The agent generated code and it needs review before commit
- You need a quality check on tests or documentation
- You work with WordPress or WooCommerce and need domain checks
Not a fit when
- You need a full linter or static analyzer
- The project is out of scope and the domain checks are not needed
Example request
Run clean-code-guard over this diff before I commitLimitations
These are reference skills for the agent, not a runnable linter. The domain checks are limited to the stated stacks, some of them about WordPress and WooCommerce.
How to disable. Remove the skills with npx skills, or delete their folders from the agent's skills directory.
Security check
- The skills consist of review checklists and references
README in short
The README describes a set of review skills that catch systematic mistakes in generated code, tests and documentation before they ship. They install via npx skills, either the whole set, a single skill or for a specific agent. There are separate checks for WordPress and WooCommerce. The project is published on skills.sh under the MIT license.
SKILL.md
--- name: clean-code-guard description: Review generated or changed production code before it ships, using Clean Code, SOLID, DRY, KISS, YAGNI, and LLM-specific failure-mode checks in any programming language. Best used reactively after an agent writes, edits, refactors, or fixes code, before presenting, committing, or merging the result. Use when the user asks "review this PR", "is this safe to merge?", "make this cleaner", "audit this code", "refactor this", "fix this bug", or after a coding agent produced implementation code. Can also guide writing when explicitly invoked before a risky edit. Invoke it on your own initiative the moment you finish writing, editing, or refactoring non-trivial production code, before presenting or committing — don't wait to be asked. DO NOT USE for factual/conceptual questions, CI/tooling config, git workflow, running/debugging tests, pure architecture discussion, prose writing, data analysis, or test-code review (use test-guard). --- # clean-code-guard You are reviewing generated or changed code before it ships. Apply the rules below as a guard pass after the first implementation pass — and once this skill is active, keep applying it to every later code change in the same session, re-running the self-check before delivery after each edit rather than reverting to unguarded output because the skill loaded earlier. If the user explicitly invokes this skill before writing code, use the same rules while writing and still run the self-check before delivery. ## Compatibility This is a portable instruction skill. It requires no MCP server, network access, API key, shell command, local executable, or bundled script. It can be used in any runtime that supports `SKILL.md` plus directly linked [references/](references/) files; `agents/openai.yaml` is lightweight display metadata. This skill does not replace project linters, formatters, type checkers, or test runners. Use the project's own tools for mechanical verification; use this skill for the judgement layer around code quality and review. ## How to use this skill This skill has three modes — pick based on the user's request. **Guard-pass mode** (recommended): after code has been generated, edited, refactored, or fixed, check the diff or target files against the *Always-applied imperatives* below. Fix violations before presenting, committing, or merging the work. **Live mode** (explicit): when the user invokes this skill before a risky code edit, apply the same imperatives while writing, then run the *Self-check before delivery* checklist. If you violate any rule, fix it before showing the user. **Review mode** (triggered when the user asks you to review, audit, critique, or rate code): walk [references/review-checklist.md](references/review-checklist.md) against the target file(s) and produce a structured findings report. Do not edit code in review mode unless asked. Across all three modes, the rule bodies live in [references/](references/). Read the relevant reference file when: - You hit a rule you don't fully remember the reasoning for. - The user pushes back on a rule and you need the source citation. - You're in review mode and need the full checklist. - The code under review touches a specific principle (e.g., subclassing → [references/solid.md](references/solid.md); deduplication → [references/dry-kiss-yagni.md](references/dry-kiss-yagni.md)). The reference files are: - [references/naming-and-functions.md](references/naming-and-functions.md) — names, function size, parameters, command/query separation. - [references/comments-and-formatting.md](references/comments-and-formatting.md) — when to comment, when to delete, matching neighbor style. - [references/solid.md](references/solid.md) — SRP, OCP, LSP, ISP, DIP with the modern phrasings and detection smells. - [references/dry-kiss-yagni.md](references/dry-kiss-yagni.md) — knowledge vs code duplication, Sandi Metz's re-inline rule, McCabe complexity, Fowler's YAGNI cost categories. - [references/ai-failure-modes.md](references/ai-failure-modes.md) — the 14 systematic ways LLMs produce bad code. **Read this one first if you are an AI agent reading this skill.** It is the highest-leverage file in the skill. - [references/review-checklist.md](references/review-checklist.md) — structured walk-through for review mode. - [references/sources.md](references/sources.md) — central bibliography for source URLs. Read it only when you need to verify or cite an external source. ## Examples - A coding agent implements an endpoint: use guard-pass mode on the diff before
FAQ
When should I run them?
Best after the agent's work, on the finished diff, as a reactive review.
Can I install one skill?
Yes, with npx skills add amElnagdy/guard-skills --skill <name>.
Related
A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review
Skills for real engineers by Matt Pocock
Skills For Real Engineers
Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture
GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything