clean-code-guard

Review changed production code for clean-code violations and AI-generated failure patterns.

Updated Jun 14, 2026
One-click install
npx skills add https://github.com/basmawebinfo-hub/lover-diet-center --skill clean-code-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code-guard
Source: https://github.com/basmawebinfo-hub/lover-diet-center/tree/main/.opencode/skills/clean-code-guard
Command: npx skills add https://github.com/basmawebinfo-hub/lover-diet-center --skill clean-code-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps prevent low-quality, brittle, or misleading production code from reaching users by adding a focused review pass after code is written or changed. It is especially useful for AI-assisted development, where plausible-looking code can hide duplication, weak abstractions, swallowed errors, and fake success paths.

Core Features & Use Cases

  • Production code review guardrail: Reviews changed code against Clean Code, SOLID, DRY, KISS, YAGNI, and AI-specific failure modes before merge or delivery.
  • Structured review mode: Produces a prioritized findings report for PRs, audits, and merge-readiness checks without editing code unless asked.
  • Refactor safety checks: Helps ensure cleanup and simplification work preserves observable behavior unless the user explicitly requests a behavior change.
  • Use cases: Reviewing a pull request, auditing AI-generated implementation code, making a function cleaner without changing behavior, or checking whether a bug fix introduced unnecessary complexity.

Quick Start

Ask the AI to use clean-code-guard to review the changed files and report any must-fix issues before merge.

Frequently Asked Questions about clean-code-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review AI-generated code for clean code violations before merge?

To review AI-generated code for clean code violations before merge, apply a PR audit pass that detects unsafe abstractions, swallowed errors, and fake success paths. It enforces SOLID, DRY, KISS, and YAGNI principles to ensure maintainability.

What is behavior-preserving refactoring and how do I check it?

Behavior-preserving refactoring is cleanup work that maintains observable software functionality without altering outputs. You verify it using a refactor safety pass to ensure simplification efforts do not introduce unintended behavior changes.

Can I use a clean code review for any programming language?

Yes, you can use a clean code review across programming languages. It applies to pull request reviews, refactoring checks, and merge-readiness audits regardless of the specific tech stack being evaluated.

What is the best way to audit a pull request for maintainability defects?

The best way to audit a pull request for maintainability defects is running a structured review mode that prioritizes findings. It checks naming clarity, small functions, explicit error handling, and removes dead production code without editing files.

Why does plausible-looking AI code hide maintainability defects?

Plausible-looking AI code hides maintainability defects because it often conceals duplication, weak abstractions, and swallowed errors behind syntactically correct structures. A post-generation guard pass detects these AI-specific failure patterns before release.