clean-code-guard

Review generated or changed production code before it ships, using Clean Code, SOLID, DRY, KISS, YAGNI, and LLM-specific failure-…

amelnagdy 1.1k ↓ 2.4k MIT updated 1mo ago
Claude Code
View source ↗

What it does

  • 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).
  • 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.

Requirements & configuration

  • 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
  • The user pushes back on a rule and you need the source citation.
  • You're in review mode and need the full checklist.
  • references/sources.md — central bibliography for source URLs. Read it only when you need to verify or cite an external source.

Configuration: SKILL

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

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. 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).

Source

Repository: https://github.com/amelnagdy/guard-skills

clean-code-guard FAQ

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 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). 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.

What does clean-code-guard require?

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 The user pushes back on a rule and you need the source citation. You're in review mode and need the full checklist. references/sources.md — central bibliography for source URLs. Read it only when you need to verify or cite an external source. Configuration keys: SKILL.

How do I install clean-code-guard?

Run: npx -y skills add https://github.com/amelnagdy/guard-skills --skill clean-code-guard --agent claude-code — the source lives at github.com/amelnagdy/guard-skills.

Maintain clean-code-guard?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[clean-code-guard on getagentictools](https://getagentictools.com/skills/amelnagdy-guard-skills-clean-code-guard?ref=badge)
npx agentictools info skills/amelnagdy-guard-skills-clean-code-guard

The second line is the CLI lookup for this page — handy in READMEs and docs.