clean-code

Enforce pragmatic coding standards for AI-generated code.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mhbdev/git-pal --skill clean-code-mhbdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-code
Source: https://github.com/mhbdev/git-pal/tree/main/.agents/skills/clean-code
Command: npx skills add https://github.com/mhbdev/git-pal --skill clean-code-mhbdev

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, maintainable, and avoids over-engineering or unnecessary complexity.

Core Features & Use Cases

  • Enforces SOLID principles: Promotes Single Responsibility, Don't Repeat Yourself, Keep It Simple, and You Ain't Gonna Need It.
  • Standardizes Naming & Structure: Provides clear rules for variables, functions, and code organization.
  • AI Coding Guidelines: Directs AI agents on how to respond to user requests for features or bug fixes.
  • Use Case: When an AI agent is tasked with refactoring a complex function, it will apply these principles to break it down into smaller, more manageable, and readable units.

Quick Start

Apply the clean code principles to refactor the provided UserService.ts file.

Frequently Asked Questions about clean-code

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

FAQPage Schema
How do I enforce SOLID, DRY, and KISS principles in AI-generated code?

To enforce SOLID, DRY, and KISS principles in AI-generated code, apply strict coding standards that dictate small function sizes, flat code structures, and clear naming conventions. This ensures conciseness and maintainability.

What is the best way to refactor a complex function for better maintainability?

The best way to refactor a complex function for maintainability is to apply the Single Responsibility Principle (SRP), breaking down large blocks into smaller, manageable units with strict naming conventions and flat code structures.

How do I prevent over-engineering when adding new features to an existing codebase?

To prevent over-engineering when adding new features, apply the You Ain't Gonna Need It (YAGNI) principle to ensure code is concise, direct, and avoids unnecessary complexity during generation and modification tasks.

Can I use these coding standards to standardize naming conventions across an entire project?

Yes, you can use these coding standards to standardize naming conventions across an entire project by enforcing clear rules for variables, functions, and code organization during all AI code generation and modification tasks.

Why does my AI agent generate overly complex code for simple bug fixes?

AI agents generate overly complex code for simple bug fixes when lacking strict coding guidelines, which can be resolved by applying principles like KISS and YAGNI to direct the AI toward concise, maintainable solutions.