Refactoring Guide Prompts
Prompts for safe and systematic code refactoring
Category:prompts
Type:prompt
Difficulty:advanced
productivity
testing
advanced
Description
Prompts to guide code refactoring while maintaining functionality. Covers identifying refactoring opportunities, planning changes, ensuring test coverage, and validating behavior preservation.
Content
Resource Content
# Refactoring Guide Prompt Help me refactor this code: ``` [Paste code to refactor] ``` **Goals:** - [ ] Improve readability - [ ] Reduce complexity - [ ] Better separation of concerns - [ ] Improve testability - [ ] Remove duplication **Constraints:** - Must maintain existing API/interface - Tests must continue to pass - No new dependencies without justification Please provide: 1. Analysis of current issues 2. Step-by-step refactoring plan 3. Refactored code 4. Explanation of changes 5. Potential risks and mitigations
Rate This Resource
0
Help others discover great resources
Statistics
0
Stars
0
Copies
404
Days ago
519
Views
Related Resources
⚡
Code Review Prompts
Structured prompts for thorough code reviews
⚡
Debugging Assistant Prompts
Systematic prompts for debugging complex issues
✓
GitHub MCP Server
GitHub API integration for Claude with repository management capabilities
15,000
✓
Filesystem MCP Server
Secure file system access with configurable permissions and sandboxing
15,000