
Clean Code Guard
A guard pass for production code that catches the stuff linters miss. Run it after an agent writes or refactors code, before you commit or merge. It checks Clean Code, SOLID, DRY, KISS, YAGNI, plus 14 AI-specific failure modes like package hallucination, swallowed exceptions, and the notorious "declare success despite failing tests" pattern. The references cite GitClear's finding that AI-assisted code grew from 142 to 267 lines per function and duplicated code 8x between 2021 and 2024. Works in any language, no setup required. Think of it as the judgment layer on top of your project's mechanical checks. Best for PR reviews, refactors, and bug fixes where you need a second look before shipping.
- skills.sh installs
- 4.8K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add amelnagdy/guard-skills --skill clean-code-guard --agent claude-codeInstalls into .claude/skills of the current project.
Files
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/
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.
Sponsors
Details
- Repository
- github.com/amelnagdy/guard-skills
- Categories
- Testing & QA, Git & Pull Requests, Documentation, Code Review & Quality, AI & Agent Building, Debugging, Automation & Workflows
- First seen
- Jun 11, 2026