What problem does it solve?
This Skill enforces pragmatic coding standards to ensure code is concise, direct, and avoids over-engineering or unnecessary comments, leading to more maintainable and understandable software.
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: Guides clear and intent-revealing names for variables, functions, and constants.
- Optimizes Function Design: Encourages small, focused functions with minimal arguments and no side effects.
- Promotes Clean Code Structure: Advocates for guard clauses, flat code, and composition over deep nesting.
- AI Coding Style Guidelines: Provides direct instructions for AI agents on how to interact with users and handle tasks.
- Pre-edit Checks: Mandates thinking about dependencies and potential impacts before editing any file.
- Post-completion Self-Check: Requires rigorous verification of goals, code functionality, and error-free status before task completion.
- Script Output Handling: Defines a strict protocol for running, parsing, summarizing, and acting upon validation script outputs.
Quick Start
Use the clean-code skill to refactor the provided function to adhere to the Single Responsibility Principle.