Refactor Clean

🌐Community
by arosenkranz · vlatest · Repository

Refactors complex Python code into cleaner, more maintainable modules using established design patterns.

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 arosenkranz-refactor-clean npx -- -y @trustedskills/arosenkranz-refactor-clean
2

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

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

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

About This Skill

What it does

The arosenkranz-refactor-clean skill helps AI agents improve code quality through automated refactoring. It focuses on cleaning up existing codebases by removing unused variables, simplifying complex expressions, and improving overall readability. The tool aims to reduce technical debt and make code easier to maintain.

When to use it

  • Legacy Codebase Cleanup: When dealing with older projects that have accumulated "messy" or hard-to-understand code.
  • Code Review Assistance: To automatically identify and suggest refactoring opportunities during code reviews, freeing up human reviewers for more complex issues.
  • Improving Readability: Before onboarding new developers to a project, to ensure the codebase is easily understandable and maintainable.
  • Preparing Code for Modernization: As a first step in modernizing an older application by improving its structure and clarity.

Key capabilities

  • Removes unused variables and functions.
  • Simplifies complex expressions.
  • Improves code readability.
  • Automated refactoring suggestions.

Example prompts

  • "Refactor this Python function to remove any unused variables."
  • "Clean up this JavaScript file, focusing on simplifying complex conditional statements."
  • "Suggest improvements for the readability of this Java class."

Tips & gotchas

The skill is most effective when applied to codebases that are already reasonably well-structured. It's recommended to review the suggested changes before applying them to avoid unintended consequences.

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
arosenkranz
Installs
2

🌐 Community

Passed automated security scans.