code-cleanup

Refactor TypeScript and JavaScript code to improve readability and maintainability.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/gpaura/claude_plugins --skill code-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-cleanup
Source: https://github.com/gpaura/claude_plugins/tree/main/skills/code-cleanup
Command: npx skills add https://github.com/gpaura/claude_plugins --skill code-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers reduce technical debt by automatically identifying and addressing code smells, enforcing readability, and standardizing patterns across a codebase.

Core Features & Use Cases

  • Code Smell Identification: Detects naming inconsistencies, long functions, duplicated logic, and tightly coupled modules.
  • Refactoring & Modularity: Breaks down large functions into smaller units, extracts utilities, and introduces clearer interfaces.
  • Type Safety & Consistency: Enforces TypeScript typings, interfaces, and consistent formatting to improve maintainability.
  • Use Case: When you inherit a legacy module with inconsistent naming and scattered logic, run this Skill to produce a cleaner, well-typed version and an outline of required tests.

Quick Start

Run code-cleanup on the target module to fix naming, remove dead code, and align with project conventions.

Frequently Asked Questions about code-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor TypeScript code to improve readability and maintainability?

You can refactor TypeScript code by enforcing naming conventions, eliminating dead code, reducing complexity, and adding explicit types. This process targets modules and utilities to produce a cleaner, well-typed version while preserving original behavior.

What is the best way to identify code smells in a legacy JavaScript module?

Identifying code smells in a legacy JavaScript module involves detecting naming inconsistencies, long functions, duplicated logic, and tightly coupled modules. Refactoring then breaks down large functions and extracts reusable utilities to reduce technical debt.

Can I clean up React components to enforce type safety and consistent formatting?

Yes, you can clean up React components by enforcing TypeScript typings and interfaces. This standardizes patterns across Node and browser environments, introducing clearer interfaces and consistent formatting to improve overall project maintainability.

How do I reduce technical debt by extracting reusable utilities from tightly coupled modules?

Reduce technical debt by breaking down large functions into smaller units and extracting reusable utilities. This refactoring approach introduces clearer interfaces and standardizes patterns, addressing duplicated logic and tightly coupled modules.

Does refactoring code to add explicit types preserve the existing behavior of Node utilities?

Yes, refactoring Node utilities to add explicit types and enforce naming conventions preserves existing behavior. The process focuses on improving readability and maintainability without altering the functional output of the modules.

When should I not use automated code cleanup on my JavaScript project?

You should anticipate limitations when your JavaScript project lacks existing test coverage. While code cleanup produces a cleaner version and an outline of required tests, running it without tests risks unintentional behavior changes during complex refactoring.