clean-code

Enforce pragmatic coding standards for AI-assisted code generation and modification.

Updated Jan 27, 2026
One-click install
npx skills add https://github.com/LeonMelamud/inspector-agents --skill clean-code-leonmelamud
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/LeonMelamud/inspector-agents/tree/main/.github/skills/clean-code
Command: npx skills add https://github.com/LeonMelamud/inspector-agents --skill clean-code-leonmelamud

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill enforces pragmatic coding standards to ensure code is concise, direct, and avoids over-engineering or unnecessary complexity.

Core Features & Use Cases

  • Enforces Core Principles: Adheres to SRP, DRY, KISS, YAGNI, and the Boy Scout Rule.
  • Standardizes Naming & Structure: Provides clear conventions for variables, functions, and code organization.
  • Use Case: When asked to refactor a complex function, this Skill will guide the AI to break it down into smaller, single-responsibility functions, rename variables for clarity, and apply guard clauses for better readability.

Quick Start

Apply the clean-code skill to refactor the provided JavaScript function for improved readability and maintainability.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I refactor complex code to improve readability and maintainability?

Refactoring complex code involves breaking down large functions into smaller, single-responsibility units, applying guard clauses, and enforcing clear naming conventions to minimize complexity and improve readability.

What coding standards should I apply for AI-assisted code generation?

AI-assisted code generation should enforce pragmatic coding standards focusing on conciseness, directness, and maintainability, ensuring adherence to core principles like SRP, DRY, KISS, and YAGNI.

What are the core principles for writing maintainable code and avoiding over-engineering?

The core principles for writing maintainable code include SRP (Single Responsibility Principle), DRY (Don't Repeat Yourself), KISS (Keep It Simple, Stupid), YAGNI (You Aren't Gonna Need It), and the Boy Scout Rule to avoid unnecessary complexity.

How do I structure code to minimize complexity and enforce flat code structures?

To minimize complexity, structure code using small function sizes, flat organizational hierarchies, and clear variable naming conventions, which collectively improve readability and maintainability.

Does this approach to clean code work with JavaScript refactoring tasks?

Yes, this approach to clean code applies to all code generation and modification tasks, including JavaScript refactoring, by guiding the breakdown of complex functions into smaller, single-responsibility units.

When should I not use automated coding standards for code modification?

Automated coding standards for code modification should be avoided when a project explicitly requires highly customized architectural patterns that conflict with flat structures, small function sizes, or strict SRP adherence.