What problem does it solve?
This Skill helps you make JavaScript and TypeScript code easier to read, safer to change, and more consistent with the surrounding codebase when the task is specifically about cleanup, maintainability, naming, function design, error handling, or reducing accidental complexity.
Core Features & Use Cases
- Targeted Refactoring Guidance: Improve a specific smell with the smallest useful change instead of rewriting code broadly.
- Review-Oriented Cleanup: Provide maintainability findings for JS/TS code reviews, especially when correctness is already acceptable but clarity is weak.
- Behavior-Preserving Improvements: Support clearer naming, flatter control flow, tighter types, and cleaner error contracts while preserving existing behavior.
- Use Case: A developer inherits a tangled TypeScript function with deep nesting and unclear names, and uses this Skill to identify the actual smell, choose a minimal refactor, and verify the result against repo conventions.
Quick Start
Use the clean-code-js skill to review this JavaScript or TypeScript file and suggest the smallest behavior-preserving refactor that improves clarity.