Agent skill · Security

clean-code-guard

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

amElnagdygithub.com/amElnagdyGitHub ↗
claude-codecodexMIT
Install
npx skills add amElnagdy/guard-skills --skill clean-code-guard --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 9
SKILL.md size: 17 KB
Bundled scripts: none
Path: skills/clean-code-guard/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,138

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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 cod

What's inside
Steps it walks through
  1. Compatibility
  2. How to use this skill
  3. Examples
  4. Success criteria
  5. Why this skill exists
  6. Always-applied imperatives
  7. Functions and names
  8. Comments and structure
  9. SOLID
  10. DRY, KISS, YAGNI
  11. AI-specific guardrails — the highest-leverage section
  12. The floor — never cut these for simplicity
  13. Refactoring discipline
  14. Self-check before delivery
Ships with 8 files
  • agents/openai.yaml
  • references/ai-failure-modes.md
  • references/comments-and-formatting.md
  • references/dry-kiss-yagni.md
  • references/naming-and-functions.md
  • references/review-checklist.md
  • references/solid.md
  • references/sources.md
More from guard-skills
All skills →
About this skill
What does the clean-code-guard skill do?

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

How do I install it?

Run `npx skills add amElnagdy/guard-skills --skill clean-code-guard --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From amElnagdy/guard-skills, a repository with 1,138 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going