Improve the following code
Improve the following code
Prompt template
- Format
- Markdown Parameterized
- Outputs
- result (text)
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.
Replace the ${…} placeholders with your values
before using this prompt. See parameters
and defaults below
Parameters
Replace each placeholder with your own value, or use its default when one is provided
${selectedtext}
selectedtext
Required
What you'll create
The response pairs revised code with explanations of the changes. Maintainability and appropriate patterns are considered alongside efficiency.
Frequently asked questions
Should the response contain code only?
No. It explicitly asks for explanations for each improvement.
Comments
Tried this prompt? Share what you made, compare results, or ask a question