Refactor Cleaner

🌐Community
by carvalab · vlatest · Repository

Automates backend code refactoring and cleanup, improving readability, maintainability, and performance using Carvalab's AI.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add refactor-cleaner npx -- -y @trustedskills/refactor-cleaner
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "refactor-cleaner": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/refactor-cleaner"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

The refactor-cleaner skill helps improve code quality by automatically identifying and removing unnecessary or redundant code. It focuses on streamlining existing codebases, reducing complexity, and enhancing readability without altering functionality. This includes tasks like eliminating dead code, simplifying expressions, and consolidating repetitive blocks.

When to use it

  • Legacy Codebase Cleanup: Use this skill when dealing with older projects that have accumulated technical debt and require a thorough cleaning process.
  • Preparing for Refactoring: Before undertaking larger refactoring efforts, utilize refactor-cleaner to simplify the existing code base and make subsequent changes easier.
  • Automated Code Review: Integrate this skill into your CI/CD pipeline to automatically identify and remove unnecessary code during development cycles.
  • Reducing Cognitive Load: Simplify complex functions or modules to improve developer understanding and maintainability.

Key capabilities

  • Dead code elimination
  • Simplification of expressions
  • Consolidation of repetitive blocks
  • Codebase streamlining

Example prompts

  • "Clean up this Python function: [paste code here]"
  • "Remove any unused variables from this JavaScript file."
  • "Refactor and simplify this Java class to improve readability."

Tips & gotchas

  • Always review the changes made by refactor-cleaner before committing them, as automated refactoring can sometimes introduce unexpected issues.
  • This skill is best suited for codebases that are already functional; it's not designed to fix broken logic or add new features.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
carvalab
Installs
24

🌐 Community

Passed automated security scans.