What problem does it solve?
This Skill helps developers adhere to pragmatic coding standards, ensuring code is concise, direct, and free of unnecessary complexity.
Core Features & Use Cases
- Coding Standards: Enforces best practices like Single Responsibility Principle, Don't Repeat Yourself, and Keep It Simple.
- Naming Rules: Provides guidelines for naming variables, functions, booleans, and constants.
- Function Rules: Ensures functions are small, focused, and have minimal side effects.
- Code Structure: Offers patterns like Guard Clauses, Flat vs. Nested, and Composition for maintainable code.
- AI Coding Style: Suggests direct implementation for features, immediate bug fixes, and clear communication with users.
- Anti-Patterns: Identifies and fixes common coding mistakes like unnecessary comments and helper functions for one-liners.
- Before Editing Files: Advises on dependencies, imports, tests, and shared components before making changes.
- Summary: Emphasizes direct code writing, self-documenting code, and immediate bug fixes over explanations.
- Self-Check Before Completing: Ensures goals are met, files are edited, code works, and no errors are present.
- Verification Scripts: Runs scripts for UX Audit, A11y Check, API Validator, Mobile Audit, Schema Validate, Security Scan, SEO Check, GEO Check, Lighthouse, Test Runner, Playwright, Lint Check, Type Coverage, and i18n Check.
- Script Output Handling: Summarizes script results, waits for user confirmation, and re-runs scripts after fixes.
Quick Start
Run the clean-code skill to review your code and ensure it adheres to best practices.