What problem does it solve?
This Skill enforces pragmatic coding standards to ensure code is maintainable, readable, and efficient, avoiding over-engineering and unnecessary complexity.
Core Features & Use Cases
- Enforces SOLID principles: Promotes Single Responsibility, DRY, KISS, YAGNI.
- Standardizes Naming Conventions: Ensures clear and intent-revealing names for variables, functions, and constants.
- Optimizes Function Design: Encourages small, focused functions with minimal arguments and no side effects.
- Promotes Clean Structure: Advocates for guard clauses, flat code, and composition over deep nesting.
- AI Coding Style Guidance: Directs AI agents on how to respond to user requests for features, bugs, or unclear requirements.
- Pre-edit Checks: Mandates thinking about dependencies and impact before modifying any file.
- Post-completion Self-Checks: Ensures all requirements are met, code works, and no errors are left.
- Mandatory Script Verification: Integrates specific scripts for various specialist roles (frontend, backend, security, etc.) and general checks (linting, typing, i18n).
- Structured Script Output Handling: Requires agents to read, summarize, and ask for confirmation before fixing script-identified issues.
Quick Start
Use the clean-code skill to refactor the provided UserService.ts file to adhere to the Single Responsibility Principle.