giuseppe-trisciuoglio/bug-fix-brief
Generates a structured Bug Fix Brief (BFB) to document issue corrections. Includes root cause analysis, repro steps, fix options, and fix checklist. Use when user asks to create a BFB, document a bug fix, or generate a bug correction document.
npx skills add https://github.com/giuseppe-trisciuoglio/developer-kit --skill bug-fix-brief
This skill generates a Bug Fix Brief (BFB): a structured document in docs/bfb/ that uniformly captures every bug fix with root cause, repro steps, fix options, and checklist.
Trigger: "create BFB", "document bug", "bug fix brief", "document fix"
Check existing numbering:
ls docs/bfb/ 2>/dev/null || echo "Directory does not exist"
Ask the user for:
Complete the full BFB template:
## BFB-XXX: [Title]
**Reference:** [Issue link]
**Environment:** [Env] `vX.Y.Z`
**Date:** YYYY-MM-DD
---
### 1. Bug
- **Observed:** [wrong behavior]
- **Expected:** [correct behavior]
### 2. Repro
→ [error/output]
### 3. Cause
`path/file.ext` — `function()` @ line N
[Why it happens, max 3 lines]
### 4. Decision
| Option | Fix | Choice |
|--------|-----|--------|
| A | [desc] | ✅/❌ |
| B | [desc] | ✅/❌ |
**Rationale:** [why]
### 5. Fix
- [ ] [change 1]
- [ ] [test]
- [ ] [verify repro]
### 6. Notes
[recurring patterns, links, warnings]
Show the generated BFB and ask with AskUserQuestion:
Only after approval:
mkdir -p docs/bfb
Write to docs/bfb/BFB-XXX-title.md
Input: "create BFB for login email null crash"
Final output:
## BFB-042: Login crash with null email
**Reference:** #1287
**Environment:** Prod `v2.4.1`
**Date:** 2026-05-02
---
### 1. Bug
- **Observed:** App crashes if email field is empty
- **Expected:** Error message "Email required"
### 2. Repro
→ NullPointerException @ AuthManager.kt:34
### 3. Cause
`AuthManager.kt` — `validateEmail()` @ line 34
Missing null check on email.trim()
### 4. Decision
| Option | Fix | Choice |
|--------|-----|--------|
| A | Add safe call `?.` | ✅ |
| B | Refactor with Result type | ❌ |
**Rationale:** Option A is minimal, zero impact.
### 5. Fix
- [ ] Add `email?.trim()?.isNotEmpty() == true`
- [ ] Test `validateEmail_null_returnsFalse()`
- [ ] Verify repro
### 6. Notes
- Check other forms for missing null checks
docs/bfb/: Create if it does not existTake giuseppe-trisciuoglio/bug-fix-brief from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.