diff --git a/prompts/refactor-code.yaml b/prompts/refactor-code.yaml new file mode 100644 index 0000000..f6ec471 --- /dev/null +++ b/prompts/refactor-code.yaml @@ -0,0 +1,25 @@ +name: refactor-code +description: Refactor code for better performance and readability +tags: [refactoring, optimization, code-quality] +variables: + - name: code + description: The code to refactor + required: true + - name: goal + description: Refactoring goal (performance, readability, both) + required: false + default: both +template: | + Refactor the following code for {{ goal }}: + + ```python + {{ code }} + ``` + + Explain the changes made: + 1. What was changed + 2. Why it improves the code + 3. Any trade-offs + +provider: ollama +model: llama3.2