What problem does it solve?
This Skill enforces pragmatic coding standards to ensure code is concise, direct, and avoids over-engineering or 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, booleans, and constants.
- 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: Provides specific actions for AI agents when handling user requests, bug reports, or unclear requirements.
- Pre-edit Checks: Mandates a thinking process before editing any file, considering dependencies and potential impacts.
- Post-completion Self-Check: Ensures all tasks are met, code works, and no errors are left behind.
- Mandatory Script Verification: Outlines specific scripts for different agents to run for validation.
Quick Start
Apply the clean code principles to refactor the provided code snippet for improved readability and maintainability.