What problem does it solve?
This Skill enforces pragmatic coding standards to ensure code is maintainable, efficient, and easy to understand, preventing over-engineering and unnecessary complexity.
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.
- Defines AI Coding Style: Provides clear directives for AI behavior when responding to user requests for features or bug fixes.
- Identifies Anti-Patterns: Lists common pitfalls and their recommended fixes.
- Mandatory Self-Checks: Includes pre-editing and pre-completion checklists for AI agents.
- Verification Scripts: Outlines mandatory script execution for validation and linting.
Quick Start
Apply the clean-code skill to refactor the provided Python function to adhere to the Single Responsibility Principle.