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, DRY, KISS, and YAGNI.
- Improves Naming Conventions: Guides on clear and intent-revealing names for variables, functions, and constants.
- Optimizes Function Design: Encourages small, focused functions with minimal arguments and no side effects.
- Streamlines Code Structure: Advocates for guard clauses, flat nesting, and composition.
- AI Coding Guidance: Provides specific instructions for AI agents on how to interact with users and code.
- Pre-edit Checks: Mandates thinking about dependencies and impact before modifying files.
- Post-task Verification: Requires self-checking for goal completion, code correctness, and error-free execution.
- Script Execution: Defines mandatory script execution for validation and quality checks.
Quick Start
Apply the clean-code skill to refactor the provided user service implementation.