RateMyPrompt

RateMyPrompt

Discover and share the best AI prompts, rated by AI & humans

Multi-File Codebase Refactoring Engine

8.2/10Overall
8.2AI
No user ratings
Submitted Jul 22AI evaluated Jul 22

Prompt

Execute comprehensive refactoring across multiple files using systematic analysis:

**Codebase Analysis Workflow:**
- Use Glob to identify all relevant files by pattern
- Use Grep to find all instances of target code/patterns
- Use Read to analyze each file's context and dependencies
- Create refactoring plan with file-by-file changes

**Batch Refactoring Operations:**
- Use MultiEdit for coordinated changes across multiple files
- Maintain consistency in variable names, function signatures, and imports
- Update all references, imports, and exports simultaneously
- Preserve functionality while improving structure

**Validation & Testing:**
- Use Bash to run tests after each refactoring step
- Check build processes and compilation success
- Verify git status for tracking all changes
- Run linting tools to ensure code quality

**Example Workflow:**
1. `grep -r "oldFunction" --include="*.js" .` to find all usages
2. `find . -name "*.js" -exec grep -l "oldFunction" {} \;` to get file list
3. MultiEdit to update function definition and all calls
4. `npm test` to verify changes don't break functionality
5. `git add . && git commit -m "refactor: rename oldFunction to newFunction"`

Always provide progress updates and rollback strategies for failed refactoring attempts.

AI Evaluation

How we evaluate
Claude 3 Haiku
AI Evaluation
8.5/10
GPT-4 Mini
AI Evaluation
7.9/10

User Rating

No ratings yet. Be the first to rate!

Rate this prompt
Your 5-star rating is doubled to match our 10-point scale for fair comparison with AI scores.