‹ 首页

bug-fix-brief

@giuseppe-trisciuoglio · 收录于 1 周前

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.

适合你,如果需要系统记录和沟通 bug 修复的完整过程

/ 下载安装
bug-fix-brief.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add giuseppe-trisciuoglio/developer-kit/bug-fix-brief
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- giuseppe-trisciuoglio/developer-kit/bug-fix-brief
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify giuseppe-trisciuoglio/developer-kit/bug-fix-brief
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
303GitHub stars
~823上下文体积 · 单文件
镜像托管

怎么用

技能原文 SKILL.md作者撰写 · MIT · 306f428

Bug Fix Brief (BFB)

Overview

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.

When to Use
  • User asks to create a BFB
  • User wants to document a bug fix in a structured way
  • After identifying the root cause of a bug and before implementing the fix

Trigger: "create BFB", "document bug", "bug fix brief", "document fix"

Instructions
Phase 1: Gather Information

Check existing numbering:

ls docs/bfb/ 2>/dev/null || echo "Directory does not exist"

Ask the user for:

  • BFB number (or propose next sequential)
  • Concise title (3-5 words, kebab-case)
  • Issue link (e.g. #1287)
  • Environment (Prod/Stg/Dev) + version
  • Observed vs expected behavior
  • File/function/line of the cause
Phase 2: Generate Template

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
  1. ...
  2. ...

→ [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]
Phase 3: Ask Confirmation

Show the generated BFB and ask with AskUserQuestion:

  • "Create the BFB"
  • "Edit before creating"
  • "Cancel"
Phase 4: Write to Disk

Only after approval:

mkdir -p docs/bfb

Write to docs/bfb/BFB-XXX-title.md

Examples

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
  1. Open login screen
  2. Tap "Login" without entering email

→ 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
Best Practices
  1. Sequential numbering: BFB-001, BFB-002, no gaps
  2. Concise title: 3-5 words, kebab-case in filename
  3. Root cause: exact file, function, line
  4. 2+ fix options: with pros/cons and rationale
  5. Verifiable checklist: each item must be testable
Constraints and Warnings
  • Confirmation required: Always ask before writing
  • Max 3 lines for cause: Stay concise
  • Directory docs/bfb/: Create if it does not exist
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。