Overview
This prompt is designed to guide individuals in analyzing and improving source code files. Programmers and software developers will benefit by enhancing their code review and optimization skills.
Prompt Overview
Purpose: Provide concise explanations and improvement suggestions for each code file.
Audience: Programmers and developers seeking to understand and enhance code functionality.
Distinctive Feature: Focus on clarity and brevity in code analysis and improvement suggestions.
Outcome: Improved code understanding and potential enhancements for better performance and maintainability.
Quick Specs
- Media: Text
- Use case: Generation
- Industry: Productivity & Workflow
- Techniques: Structured Output, Output Constraints, Plan-Then-Solve
- Models: Applicable AI models
- Estimated time: 10-20 minutes
- Skill level: Intermediate
Variables to Fill
- [Number] – Number
- [Brief description] – Brief Description
- [Brief list or sentences of improvement points] – Brief List Or Sentences Of Improvement Points
Example Variables Block
- [Number]: Example Number
- [Brief description]: Example Brief Description
- [Brief list or sentences of improvement points]: Example Brief List Or Sentences Of Improvement Points
The Prompt
You will be given 10 separate files, each containing source code. For each file, carefully analyze the code to determine what it does. Provide a concise explanation of its functionality, followed by brief suggestions for potential improvements or enhancements. Please keep your responses short and focused for each file.
# Steps
1. Review each of the 10 code files individually.
2. Summarize in a few sentences what the code in each file accomplishes.
3. Suggest practical and concise improvements or enhancements for each code file.
4. Present your output clearly separated by file, ensuring each file’s description and suggestions are easy to distinguish.
# Output Format
For each file, structure your response as follows:
File [Number]:
Functionality: [Brief description]
Improvement Suggestions: [Brief list or sentences of improvement points]
Repeat this format for all 10 files.
# Notes
– If the code is complex, focus on the main functionality rather than minor details.
– Improvement suggestions can include code optimization, readability, maintainability, security, or feature enhancements.
– Ensure clarity and brevity in your explanations.
Screenshot Examples
[Insert relevant screenshots after testing]
How to Use This Prompt
- file_number: Identifier for each code file.
- functionality: Brief description of code purpose.
- improvement_suggestions: Suggestions for code enhancements.
- code_complexity: Level of complexity in the code.
- code_optimization: Suggestions for performance improvements.
- readability: Suggestions for improving code clarity.
- maintainability: Suggestions for easier future updates.
- security: Suggestions for enhancing code security.
Tips for Best Results
- Understand the Code: Carefully read each file to grasp the main functionality before diving into details.
- Summarize Clearly: Provide a concise explanation of what each code file does, focusing on the primary purpose.
- Suggest Improvements: Offer practical enhancements such as optimizing performance, improving readability, or adding comments for clarity.
- Maintain Consistency: Use a consistent format for each file to ensure clarity and ease of understanding across all explanations.
FAQ
- What does the code in File 1 do?
The code calculates the factorial of a given number using recursion. - How can File 1 be improved?
Use an iterative approach to avoid stack overflow and improve performance. - What is the functionality of the code in File 2?
The code sorts an array of integers using the bubble sort algorithm. - What improvements can be made to File 2?
Implement a more efficient sorting algorithm like quicksort or mergesort.
Compliance and Best Practices
- Best Practice: Review AI output for accuracy and relevance before use.
- Privacy: Avoid sharing personal, financial, or confidential data in prompts.
- Platform Policy: Your use of AI tools must comply with their terms and your local laws.
Revision History
- Version 1.0 (March 2026): Initial release.


