Skip to content

Commit

Permalink
🟢 prompts/CodeAnalyze.txt
Browse files Browse the repository at this point in the history
🟢 prompts/CodeAnalyze2.txt

🟢 prompts/CodeAnalyze3.txt
  • Loading branch information
voytas75 committed Jul 15, 2024
1 parent 325f95e commit f45821c
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
24 changes: 24 additions & 0 deletions prompts/CodeAnalyze.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Analyze the provided PowerShell code for quality and adherence to best practices. Use the following evaluation framework:
1. Evaluate the code based on these key categories:
a. Readability and Formatting
b. Error Handling and Logging
c. Performance and Efficiency
d. Security and Best Practices
e. Modularity and Reusability
f. Documentation and Comments
2. Score each category on a scale of 1-10, where:
1-3: Poor
4-6: Adequate
7-8: Good
9-10: Excellent
3. For each category:
- Provide a brief explanation of the score
- Highlight specific strengths or weaknesses in the code
- Offer actionable suggestions for improvement
4. Calculate an overall score by averaging the category scores.
5. Summarize the assessment with:
- The overall score
- Key strengths of the code
- Priority areas for improvement
- General recommendations for enhancing code quality
Please ensure your evaluation is thorough, constructive, and provides clear guidance for improving the PowerShell code.
28 changes: 28 additions & 0 deletions prompts/CodeAnalyze2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Analyze the provided PowerShell code for quality and adherence to best practices. Perform the following steps:
1. Conduct an initial analysis of the code using the evaluation framework below. Do not output this analysis.
2. Perform a second, more in-depth analysis, considering any insights gained from the first analysis. Again, do not output this analysis.
3. Conduct a third and final analysis, synthesizing insights from the previous two analyses. This is the analysis you will present in your response.
4. Present your final analysis based on the third iteration, using the following evaluation framework:
1. Evaluate the code based on these key categories:
a. Readability and Formatting
b. Error Handling and Logging
c. Performance and Efficiency
d. Security and Best Practices
e. Modularity and Reusability
f. Documentation and Comments
2. Score each category on a scale of 1-10, where:
1-3: Poor
4-6: Adequate
7-8: Good
9-10: Excellent
3. For each category:
- Provide a brief explanation of the score
- Highlight specific strengths or weaknesses in the code
- Offer actionable suggestions for improvement
4. Calculate an overall score by averaging the category scores.
5. Summarize the assessment with:
- The overall score
- Key strengths of the code
- Priority areas for improvement
- General recommendations for enhancing code quality
Please ensure your evaluation is thorough, constructive, and provides clear guidance for improving the PowerShell code.
40 changes: 40 additions & 0 deletions prompts/CodeAnalyze3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Analyze the provided PowerShell code for quality and adherence to best practices. Perform the following steps:
1. Conduct an initial analysis of the code using the evaluation framework below. Do not output this analysis.
2. Perform a second, more in-depth analysis, considering any insights gained from the first analysis. Again, do not output this analysis.
3. Conduct a third and final analysis, synthesizing insights from the previous two analyses. This is the analysis you will present in your response.
4. Present your final analysis based on the third iteration, using the following evaluation framework:
1. Evaluate the code based on these key categories:
a. Readability and Formatting
b. Error Handling and Logging
c. Performance and Efficiency
d. Security and Best Practices
e. Modularity and Reusability
f. Documentation and Comments
2. Score each category on a scale of 1-10, where:
1-3: Poor
4-6: Adequate
7-8: Good
9-10: Excellent
3. For each category:
- Provide a brief explanation of the score
- Highlight specific strengths or weaknesses in the code
- Offer actionable suggestions for improvement
4. Calculate an overall score by averaging the category scores.
After your detailed analysis, create a summary section formatted as follows:
---
PowerShell Code Quality Assessment Summary

Overall Score: [Insert overall score]

Key Strengths:
- [Bullet point list of 2-3 key strengths]

Priority Improvements:
N. [Concise, actionable improvement point]
- [Brief explanation or example]
...

General Recommendations:
- [bullet points with general recommendations for enhancing code quality]
---
Ensure this summary section is self-contained, clear, and ready to be copied and sent directly to a PowerShell developer. The summary should provide a quick overview of the code's quality and specific, actionable items for improvement.

0 comments on commit f45821c

Please sign in to comment.