prompts/prompt-refactoring

Prompts for safe and systematic code refactoring

Prompts to guide code refactoring while maintaining functionality. Covers identifying refactoring opportunities, planning changes, ensuring test coverage, and validating behavior preservation.

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

Details

Categoryprompts
Tagsproductivitytestingadvanced
LicenseCC-BY-4.0
AuthorClaude Code Directory
Difficultyadvanced