developer coding template risk: low
Code Improvement and Refactoring Suggester
Improves provided code by suggesting enhancements for readability and maintainability, performance optimization, best practices and patterns, and error handling with edge cases. De…
PROMPT
Improve the following code
```
${selectedText}
```
Please suggest improvements for:
1. Code readability and maintainability
2. Performance optimization
3. Best practices and patterns
4. Error handling and edge cases
Provide the improved code along with explanations for each enhancement. INPUTS
- selectedText REQUIRED
-
The code snippet to improve
REQUIRED CONTEXT
- code snippet
EXPECTED OUTPUT
- Format
- markdown
- Constraints
-
- provide improved code
- explanations for each enhancement
- address readability and maintainability
- performance optimization
- best practices and patterns
- error handling and edge cases
SUCCESS CRITERIA
- Improve code readability and maintainability
- Optimize performance
- Apply best practices and patterns
- Handle errors and edge cases
- Provide improved code
- Explain each enhancement
FAILURE MODES
- Might overlook improvements in one of the specified areas
- Could fail to provide explanations for changes
- Risk of breaking existing functionality
- May not consider language-specific best practices
CAVEATS
- Dependencies
-
- Requires the selectedText code snippet
- Missing context
-
- Programming language of the code
- Detailed output format (e.g., use markdown sections for explanations)
QUALITY
- OVERALL
- 0.92
- CLARITY
- 0.95
- SPECIFICITY
- 0.90
- REUSABILITY
- 1.00
- COMPLETENESS
- 0.85
IMPROVEMENT SUGGESTIONS
- Add a placeholder for the programming language, e.g., 'Language: ${language}'
- Specify output structure: 'Use markdown with sections for each improvement category, followed by the full improved code.'
- Include constraints like 'Keep changes minimal unless performance gains justify otherwise.'
USAGE
Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.
MORE FOR DEVELOPER
- Context7 Library Documentation Expert developer coding
- Structured Python Production Code Generator developer coding
- Angular Standalone Directive Generator developer coding
- Pytest Unit Test Suite Generator developer coding
- Unity Architecture Specialist developer coding
- Web Typography CSS Generator developer coding
- VSCode CodeTour File Expert developer coding
- Senior Python Code Reviewer developer coding
- Structured Cross-Language Code Translator developer coding
- Multi-DB SQL Query Optimizer and Builder developer coding
- Base R Programming Reference Guide developer coding
- Flutter Map SDK Layer Bug Fixer developer coding
- Expert Mobile App Builder for iOS Android developer coding
- Scalable Backend Architect Expert developer coding
- Comprehensive TypeScript Codebase Reviewer developer coding
- Vercel SPA Blank Screen Diagnoser developer coding
- CLAUDE.md File Generator for AI Coders developer coding
- App Store Screenshots Gallery Generator developer coding
- Spring Boot SOLID Architect Specialist developer coding
- React SaaS Metrics Dashboard Generator developer coding
- Software Optimization Auditor developer coding
- Senior Frontend Task Checklist Architect developer coding
- POSIX Shell Script Developer with Checklists developer coding
- Astro v6 Strict Architecture Rules developer coding
- Iterative App Improvement Analyst developer coding