amelnagdy avatar

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-code

Installs 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

More from amelnagdy/guard-skills

All 5
1affaan-m avatarorch-build-mvpaffaan-m/eccOrchestrate bootstrapping a working MVP from a design or spec document — ingest the doc, plan thin vertical slices, scaffold the first end-to-end slice, then TD4.8Kskills.sh installs
2affaan-m avatarorch-pipelineaffaan-m/eccShared orchestration engine for the orch-* skill family. Defines the gated Research-Plan-TDD-Review-Commit pipeline, the size classifier, the agent map, and the4.8Kskills.sh installs
3affaan-m avatarorch-add-featureaffaan-m/eccOrchestrate building a brand-new feature end to end — research, plan, TDD implementation, review, and gated commit — by delegating each phase to the matching EC4.8Kskills.sh installs
4affaan-m avatarorch-fix-defectaffaan-m/eccOrchestrate fixing a bug — reproduce it as a failing regression test, fix to green, review, and gated commit — by delegating each phase to the matching ECC agen4.8Kskills.sh installs
5anthropics avatarstatistical-analysisanthropics/knowledge-work-pluginsApply statistical methods including descriptive stats, trend analysis, outlier detection, and hypothesis testing. Use when analyzing distributions, testing for 4.8Kskills.sh installs
6yaklang avatarhackyaklang/hack-skillsEntry P0 primary router for HackSkills. Use when the task involves web application testing, API security assessment, recon, vulnerability triage, exploit path p4.6Kskills.sh installs