Classname Refactor

🌐Community
by forge-town · vlatest · Repository

Automatically refactors Java classnames to be more descriptive and aligned with project naming conventions.

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

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

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

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

About This Skill

What it does

This skill, classname-refactor, helps automate the process of renaming classes in codebases. It identifies and systematically updates all references to a specified class, ensuring consistency across a project. This includes updating imports, variable assignments, and method calls that use the old class name.

When to use it

  • Large refactoring projects: When you need to change the name of a core class in a large codebase.
  • Renaming after merging branches: To ensure consistent naming conventions across merged code.
  • Improving code maintainability: Simplifying and standardizing class names for better readability.
  • Addressing technical debt: Cleaning up legacy code with inconsistent or unclear class names.

Key capabilities

  • Automated renaming of classes.
  • Updates references to the renamed class throughout the codebase.
  • Handles import statements.
  • Modifies variable assignments and method calls.

Example prompts

  • "Refactor class 'OldClassName' to 'NewClassName'."
  • "Rename 'LegacyClass' to 'ModernClass' in this project."
  • “Update all instances of ‘DatabaseConnector’ to ‘DBConnection’.”

Tips & gotchas

This skill requires access to the codebase being refactored. It is recommended to back up your code before running any automated renaming operations.

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
forge-town
Installs
17

🌐 Community

Passed automated security scans.