Refactor
Automatically refactors Python code for improved readability, performance, and adherence to phodal's style guidelines.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add phodal-refactor npx -- -y @trustedskills/phodal-refactor
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"phodal-refactor": {
"command": "npx",
"args": [
"-y",
"@trustedskills/phodal-refactor"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill automatically refactors code to improve readability and maintainability. It can identify areas of complex logic, extract them into smaller functions, and apply consistent formatting based on defined style guides. The goal is to reduce technical debt and make the codebase easier for developers to understand and modify.
When to use it
- Refactoring a large, monolithic function into smaller, more manageable components.
- Standardizing code formatting across a project to ensure consistency.
- Improving the readability of legacy code that lacks clear structure or documentation.
- Automating repetitive refactoring tasks to free up developer time.
Key capabilities
- Code extraction and function creation
- Consistent code formatting
- Identification of complex logic blocks
- Style guide application
Example prompts
- "Refactor this function to improve readability." (followed by the function's code)
- "Apply a consistent coding style to this file." (followed by the filename)
- "Extract this block of code into a separate function." (followed by the code block)
Tips & gotchas
The skill requires access to the codebase being refactored. Ensure proper permissions and context are provided for optimal results.
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.