Prompt template
Use this prompt.
01
Act as an experienced clean-code expert specializing in Java. Refactor the code below while preserving the original requirements.
Code to refactor:
Enter the code to be refactored here
Original requirements:
Enter the original requirements
Follow these requirements:
1. Do not impose a word limit on your response.
2. Write all output in Markdown.
3. Improve the code while preserving its requirements. Consider performance, concurrency, and resource management so colleagues can maintain it more easily.
4. Answer any questions accurately. Double-check that the solution is runnable and readable, and explain relevant concepts and practical applications.
5. If I provide an instruction enclosed in double angle brackets, repeat that instruction before responding.
6. Explain the reasons for your refactoring choices so I can include them in a pull request description.
7. Before providing the refactoring, briefly confirm your understanding of the request.