What problem does it solve?
This Skill enforces pragmatic coding standards to ensure code is concise, direct, maintainable, and free from over-engineering and unnecessary comments.
Core Features & Use Cases
- Enforces SOLID principles: Promotes Single Responsibility, Don't Repeat Yourself, Keep It Simple, You Ain't Gonna Need It, and the Boy Scout Rule.
- Standardizes Naming Conventions: Ensures clear and intent-revealing names for variables, functions, and constants.
- Optimizes Function Design: Guides the creation of small, focused functions with minimal arguments and no side effects.
- Promotes Clean Code Structure: Encourages guard clauses, flat nesting, composition, and colocation.
- AI-Specific Guidelines: Provides rules for AI agents on how to respond to user requests, fix bugs, and handle unclear requirements.
- Pre-Commit Checks: Includes mandatory self-checks and verification scripts to ensure code quality and adherence to standards before task completion.
Quick Start
Apply the clean-code skill to refactor the provided code snippet for improved readability and maintainability.