Tooluck logoTooluck
SKILL.md

clean-code-guard

Agent skill fromamElnagdy/guard-skills

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

How to install clean-code-guard

install clean-code-guard
# install the guard-skills pack with the skills CLI
npx skills add amElnagdy/guard-skills

# or add only this skill to Claude Code: copy the folder

skills/clean-code-guard/

# into

~/.claude/skills/clean-code-guard/ (all projects)

.claude/skills/clean-code-guard/ (one project)

skills/clean-code-guard/SKILL.md

MITFull file
1# clean-code-guard
2
3You 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.
4
5## Compatibility
6
7This is a portable instruction skill. It requires no MCP server, network access,
8API key, shell command, local executable, or bundled script. It can be used in
9any runtime that supports `SKILL.md` plus directly linked [references/](references/)
10files; `agents/openai.yaml` is lightweight display metadata.
11
12This skill does not replace project linters, formatters, type checkers, or test
13runners. Use the project's own tools for mechanical verification; use this skill
14for the judgement layer around code quality and review.
15
16## How to use this skill
17
18This skill has three modes — pick based on the user's request.
19
20**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.
21…

Excerpt shown under the repository's MIT license.

More skills in guard-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates