clean-code-guard
Lets your agent review code to ensure quality and best practices. It checks if the code follows standards like Clean Code and SOLID.
What it does
This AI agent checks your programming code to ensure it follows good writing practices, like being clear, organized, and easy to understand. It helps prevent common mistakes that can arise when generating code automatically.
When to use it
- ✓After the AI generates a piece of code.
- ✓Before submitting or saving code that you or the AI modified.
- ✓When you want a quality review of existing code.
Example of what to ask your AI
“Review this code to ensure it follows best practices.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
It compares your code against a set of quality rules, such as clear names and small functions. If it finds anything that doesn't follow the rules, it suggests or makes corrections.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill clean-code-guardOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/clean-code-guard/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
When to Use
Use this skill when reviewing generated or changed code before it ships. Activate it reactively after an agent writes, edits, or refactors production code — especially after a first implementation pass. Re-run the guard pass before delivery after each edit.
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.
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 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/. 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; deduplication → references/dry-kiss-yagni.md).
The reference files are:
- references/naming-and-functions.md — names, function size, parameters, command/query separation.
- references/comments-and-formatting.md — when to comment, when to delete, matching neighbor style.
- references/solid.md — SRP, OCP, LSP, ISP, DIP with the modern phrasings and detection smells.
- 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 — 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 — structured walk-through for review mode.
- 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 the work is presented or committed.
- User asks "review this PR" or "should I merge this?": use review mode and report findings from references/review-checklist.md; do not edit unless asked.
- User asks "implement this endpoint using clean-code-guard": use live mode while writing, then run the self-check before delivery.
- User asks "refactor this function, same behavior": preserve observable behavior exactly and treat any bug fix as a separate change.
Success criteria
This skill is working when code-writing tasks avoid the listed failure modes,
…
FAQ
What are code 'best practices'?
They are like golden rules for writing code that make it easier to read, understand, and maintain by other programmers (or by yourself in the future).
Why do I need this if the AI already wrote the code?
Even AI can make mistakes or write code that isn't ideal. This agent ensures the generated code is high quality and avoids common issues.
Does it replace other code checking tools?
No, it complements other tools. It focuses on code quality and clarity, while other tools might check for syntax errors or security issues.
Details
Original description by the author
Review generated or changed production code with Clean Code, SOLID, DRY, KISS, YAGNI, and LLM-specific failure-mode checks.
Popularity
- GitHub stars
- 48k
- Ranking position
- #2536
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
benchmark-optimization-loop
Has your agent improve something's speed in a measured way. It tests multiple versions and chooses the fastest one that still works correctly.
affaan-m/ECC
change-impact
Helps your agent analyze the impact of code changes before making them. It compares the planned vs. actual results afterward, covering paths, data, tests, and documentation. Useful for risky or system-wide changes.
affaan-m/ECC
click-path-audit
Lets your agent trace all user buttons and interactions to find bugs. It finds issues where functions seem to work alone but fail together. Useful when bugs persist even after debugging.
affaan-m/ECC