clean-code

Enforce pragmatic coding standards for AI-generated code.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/dgkngk/super-kit --skill clean-code-dgkngk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/dgkngk/super-kit/tree/main/skills/tech/clean-code
Command: npx skills add https://github.com/dgkngk/super-kit --skill clean-code-dgkngk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenge of maintaining code quality by providing clear, pragmatic standards that prevent over-engineering, unnecessary complexity, and poor maintainability.

Core Features & Use Cases

  • Coding Principles: Enforces SOLID principles (SRP, DRY, KISS, YAGNI) and the Boy Scout Rule.
  • Naming Conventions: Establishes clear rules for variables, functions, and constants.
  • Code Structure: Promotes guard clauses, flat code, and composition over deep nesting.
  • AI Interaction: Guides AI on how to respond to user requests, fix bugs, and handle unclear requirements.
  • Use Case: When writing new code or refactoring existing code, adhere to these principles to ensure the codebase remains clean, understandable, and easy to modify.

Quick Start

Follow these pragmatic coding standards to ensure code is concise, direct, and solution-focused.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I prevent AI agents from generating over-engineered code?

Enforce pragmatic coding standards for AI agents that prioritize conciseness, directness, and the YAGNI principle to prevent over-engineering. This guides the AI to generate solution-focused code without unnecessary complexity.

What are the best practices for refactoring code for maintainability?

Apply SOLID principles, DRY, and the Boy Scout Rule to enforce coding standards during refactoring. Promote guard clauses, flat code structures, and clear naming conventions to ensure the codebase remains clean and easy to modify.

How do I enforce coding standards when writing new code?

Adhere to specific naming conventions, function rules, and code structure patterns to enforce coding standards. Following pragmatic principles like SRP and KISS ensures newly written code remains concise, direct, and maintainable.

Does this coding standard approach work with existing codebases?

Yes, this approach works with existing codebases by applying the Boy Scout Rule during modification tasks. It guides AI to refactor existing code using guard clauses, flat structures, and maintainability principles.

Why does AI-generated code often lack maintainability?

AI-generated code often lacks maintainability due to unnecessary complexity and poor structure. Enforcing pragmatic standards like DRY, KISS, and specific function rules directly addresses this by emphasizing concise, direct, and solution-focused code generation.

What is the best way to structure functions for clean code?

Structure functions by using guard clauses, maintaining flat code, and avoiding deep nesting. Applying the Single Responsibility Principle ensures functions remain concise, direct, and easy to modify for maintainable software development.