What problem does it solve?
This Skill provides guidelines for writing code that adheres to pragmatic coding standards, enhancing readability, maintainability, and performance.
Core Features & Use Cases
- Guiding Principles: Emphasizes one job per unit, avoiding duplication, favoring the simplest solution, and building only what's needed.
- Naming Conventions: Defines conventions for variables, functions, booleans, and constants.
- Function Structure: Encourages short, focused, single-altitude functions with lean signatures.
- Code Organization: Promotes shallow nesting, guard clauses, and keeping related code close.
- Response Strategy: Suggests direct coding practices, such as writing feature code directly and fixing bugs immediately.
- Anti-Patterns: Outlines anti-patterns to avoid, like unnecessary annotations and god functions.
- File Editing: Advises on how to think before editing a file to minimize ripple effects.
- Self-Check: Offers a checklist for self-evaluation before declaring code finished.
- Validation Scripts: Instructs on handling validation scripts for code quality assurance.
- Use Case: A developer uses this Skill to review and improve the code quality of their project, adhering to best practices.
Quick Start
Implement the clean-code practices in your project to enhance the quality and maintainability of your code.