What problem does it solve?
This Skill enforces pragmatic coding standards for AI, ensuring code is concise, direct, and avoids unnecessary complexity or comments, leading to more maintainable and efficient AI-generated code.
Core Features & Use Cases
- Pragmatic Principles: Adheres to SRP, DRY, KISS, YAGNI, and the Scout Rule.
- Clear Naming Conventions: Guides on naming variables, functions, and constants for better readability.
- Function Best Practices: Defines rules for function size, single responsibility, and argument limits.
- Code Structure: Promotes guard clauses, shallow nesting, and composition.
- AI Coding Style: Provides specific directives for how AI should handle user requests, bugs, and unclear requirements.
- Anti-Pattern Avoidance: Lists common pitfalls and their correct alternatives.
- Pre-Edit Verification: Mandates a thinking process before modifying any file to prevent breaking changes.
- Final Verification: Ensures all checks (objective, functionality, errors, edge cases) are passed before task completion.
- Script Execution & Output Handling: Defines how AI should run validation scripts and report their results.
Quick Start
Use the clean-code skill to refactor the provided UserService.ts file according to pragmatic coding standards.