Refactoring Packages
Automatically restructures and optimizes backend package dependencies for improved maintainability and performance.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add refactoring-packages npx -- -y @trustedskills/refactoring-packages
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"refactoring-packages": {
"command": "npx",
"args": [
"-y",
"@trustedskills/refactoring-packages"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill automates the process of refactoring Python packages. It can reorganize package structures, rename modules and classes, and update import statements to improve code maintainability and readability. The tool aims to reduce manual effort in large-scale codebase modifications while ensuring correctness through automated testing.
When to use it
- You need to restructure a complex Python project with multiple interconnected packages.
- A package requires renaming of modules or classes, necessitating widespread changes.
- Import statements are scattered and inconsistent across your project, hindering readability.
- You want to modernize an older codebase by applying consistent coding standards.
Key capabilities
- Automated module renaming
- Class renaming
- Import statement updates
- Package structure reorganization
Example prompts
- "Refactor the 'data_processing' package, renaming all classes prefixed with 'Data' to 'Processor'."
- "Update all import statements in the 'utils' package to reflect a new directory structure."
- “Restructure the ‘api’ package into smaller modules based on resource endpoints.”
Tips & gotchas
This skill requires a working Python environment and access to project files. Ensure you have automated tests in place before running refactoring operations, as incorrect changes can break functionality.
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 Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.