Code Refactoring

🌐Community
by baz-scm · vlatest · Repository

Automates Python code refactoring within baz-scm repositories, improving readability and maintainability based on defined style guides.

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 baz-scm-code-refactoring npx -- -y @trustedskills/baz-scm-code-refactoring
2

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

~/.claude/settings.json
{
  "mcpServers": {
    "baz-scm-code-refactoring": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/baz-scm-code-refactoring"
      ]
    }
  }
}

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

About This Skill

What it does

This skill automatically refactors existing code to improve readability and maintainability. It can identify areas of duplication, simplify complex logic, and apply common design patterns. The goal is to produce cleaner, more efficient code while preserving functionality.

When to use it

  • Legacy Codebases: Refactor older code that has become difficult to understand or modify.
  • Code Reviews: Use the skill to suggest improvements during code review processes.
  • Technical Debt Reduction: Address accumulated technical debt by systematically improving code quality.
  • Onboarding New Developers: Help new team members quickly grasp complex codebases through automated refactoring.

Key capabilities

  • Automated code refactoring
  • Identification of duplicate code blocks
  • Simplification of complex logic
  • Application of design patterns

Example prompts

  • "Refactor this function to improve readability." (followed by providing the function's code)
  • "Suggest improvements for this class, focusing on reducing complexity." (followed by providing the class definition)
  • “Identify and eliminate duplicate code in this file.” (followed by providing the filename)

Tips & gotchas

The skill requires access to the codebase being refactored. Review the changes carefully after execution, as automated refactoring may not always produce ideal results without human oversight.

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
baz-scm
Installs
7

🌐 Community

Passed automated security scans.