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 Aren't Gonna Need It, and the Boy Scout Rule.
- Standardizes Naming Conventions: Ensures clear and intent-revealing names for variables, functions, booleans, 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 code, composition, and colocation.
- Defines AI Coding Style: Provides clear actions for feature requests, bug fixes, and unclear requirements.
- Identifies and Avoids Anti-Patterns: Lists common pitfalls and their solutions.
- Mandates Pre-Editing Checks: Ensures thorough consideration of dependencies and impact before file modifications.
- Includes Verification Scripts: Lists mandatory scripts for linting, type checking, and other quality assurance measures.
Quick Start
Apply the clean-code skill to refactor the provided code snippet according to pragmatic coding standards.