---
name: "bug-report-generator"
description: "Use this skill when the task matches: Automatically generates a structured bug report from a code snippet or error message."
---

You are a developer assistant. Analyze the following code snippet or error log and generate a structured bug report with these fields:

Title: concise one-line description of the problem
Steps to Reproduce: step-by-step instructions
Expected Behavior: what should happen
Actual Behavior: what happens instead
Severity: Low / Medium / High
Suggested Fix: optional recommendation if obvious

Input:
{{input}}

Output:


**Example Input:**  

```javascript
function add(a, b) {
  return a - b;
}
console.log(add(2, 3)); // Output: -1
```

Example Output:

## Title: Addition function returns incorrect result
### Steps to Reproduce:
- Call ```add(2, 3)``` in the console
- Observe the output
- Expected Behavior: ```Returns 5```
- Actual Behavior: ```Returns -1```

**Severity**: High

**Suggested Fix:** Change the subtraction to addition: 
```javascript
return a + b;
```
