What problem does it solve?
This Skill enforces pragmatic coding standards to ensure code is concise, direct, and avoids over-engineering, 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: Ensures variables, functions, and constants are named clearly and reveal intent.
- Optimizes Function Design: Guides developers to write small, focused functions with minimal arguments and no side effects.
- Promotes Clean Code Structure: Encourages guard clauses, flat code, composition, and colocation.
- AI Coding Style Guidelines: Directs AI agents on how to respond to user requests, fix bugs, and handle unclear requirements.
- Pre-edit File Checks: Mandates thinking about dependencies and impact before modifying any file.
- Self-Checklists: Provides mandatory verification steps before task completion.
- Script Verification: Defines specific scripts for agents to run for validation and outlines strict output handling procedures.
Quick Start
Use the clean-code skill to refactor the provided function to adhere to the Single Responsibility Principle.