Token导航 LogoToken导航

Agent Skill · 研究检索

bug-fix(错误修复)

bug-fix 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

bug-fix 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 18,310。

总安装 6,155周安装 249GitHub Stars 39下载 1,932核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:bug-fix(错误修复)
来源仓库:https://github.com/bobmatnyc/claude-mpm-skills
仓库路径:skills/bug-fix
安装命令:
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill bug-fix
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill bug-fix

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

bug-fix 提供标准化的 bug 修复验证流程,确保修复质量并防止回归缺陷。适用于提交 PR 前对 bug 修复进行结构化检查,或在团队协作中统一修复标准。涵盖从复现确认到回归测试的全链路步骤,输出可验证的结论和改进建议。使用前应明确测试环境与边界条件,避免误判或引入新风险,尤其关注边缘情况覆盖。

bug-fix 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/bug-fix

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill bug-fix;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

bug-fix 怎么安装?

在终端执行 npx skills add https://github.com/bobmatnyc/claude-mpm-skills --skill bug-fix。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

bug-fix 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

bug-fix 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

bug-fix 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

bug-fix 用的人多吗?

公开数据是累计安装 6,155 次,近一周安装 249 次,下载 1,932 次,GitHub 39 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

bug-fix 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
bug-fix

错误修复 · 本页

6,15539操作浏览器MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Bug Fix Verification

Systematic workflow for verifying bug fixes to ensure quality and prevent regressions.

When to Use This Skill

Use this skill when:

  • Fixing a reported bug
  • Creating PR for bug fix
  • Need to document bug fix verification
  • Want to ensure fix doesn't introduce regressions
  • Need structured approach to bug resolution

Why Bug Fix Verification Matters

Problems It Solves

  • ❌ Fixing symptoms instead of root cause
  • ❌ Introducing new bugs while fixing old ones
  • ❌ Incomplete testing of edge cases
  • ❌ No proof that bug is actually fixed
  • ❌ Poor documentation of fix reasoning

Benefits

  • ✅ Confirms bug is truly fixed (not masked)
  • ✅ Documents root cause analysis
  • ✅ Prevents regression with tests
  • ✅ Provides clear evidence for stakeholders
  • ✅ Improves team knowledge of codebase

Bug Fix Workflow

Step 1: Reproduce Before Fix

Critical: Never fix a bug without first reproducing it.

Reproduction Checklist
  • Document exact steps to reproduce
  • Capture error message/behavior with screenshots
  • Note frequency (100% reproducible, intermittent, etc.)
  • Video recording if UI-related or complex interaction
  • Identify affected versions/environments
  • Note any workarounds users have found
  • Verify bug exists in clean environment (not just local)
Reproduction Documentation Template
## Bug Reproduction

### Steps to Reproduce
1. Navigate to `/dashboard`
2. Click "Export Data" button
3. Select date range: Jan 1 - Dec 31
4. Click "Generate Report"

### Expected Behavior
- Report downloads as CSV file
- File contains all transactions for date range
- Download completes in < 5 seconds

### Actual Behavior
- Error appears: "Failed to generate report"
- Console error: `TypeError: Cannot read property 'map' of undefined`
- No file downloads
- Issue occurs 100% of the time

### Environment
- Browser: Chrome 120.0.6099.109
- OS: macOS 14.2
- User Role: Admin
- Data Size: ~10,000 transactions

### Screenshots
![Error message](screenshots/export-error.png)
![Console error](screenshots/console-error.png)

Step 2: Root Cause Analysis

Investigate WHY the bug occurs, not just WHAT happens.

Investigation Steps
  1. Review Error Logs: Check server logs, browser console, error tracking
  2. Trace Code Path: Follow execution from trigger point to error
  3. Identify Breaking Point: Find exact line/function where bug occurs
  4. Understand Context: Why does code behave this way?
  5. Check Recent Changes: Did recent commit introduce this?
  6. Review Related Code: Are there similar patterns elsewhere?
Root Cause Documentation
## Root Cause Analysis

### Investigation
- Error occurs in `generateReport()` function at line 45
- Function assumes `transactions` array always exists
- When date range returns no results, backend returns `null`
- Frontend doesn't handle `null` case, tries to call `.map()` on `null`

### Root Cause
- Missing null check before array operations
- Backend API doesn't return consistent data structure (sometimes `[]`, sometimes `null`)
- No validation of API response shape

### Why This Wasn't Caught
- Unit tests only covered happy path (data exists)
- Integration tests didn't test empty result scenario
- Backend inconsistency not documented in API contract

Step 3: Implement Fix

Fix the root cause, not the symptom.

Fix Guidelines
  • Minimal Change: Fix only what's necessary
  • Defensive Coding: Add validation/guards
  • Consistent Patterns: Follow existing error handling patterns
  • Type Safety: Use types to prevent similar bugs
  • Documentation: Comment non-obvious fixes
Example Fix
// BEFORE (Bug)
function generateReport(transactions) {
  return transactions.map(t => ({
    date: t.date,
    amount: t.amount,
  }));
}

// AFTER (Fixed)
function generateReport(transactions) {
  // Guard against null/undefined from backend
  if (!transactions || !Array.isArray(transactions)) {
    console.warn('No transactions to export');
    return [];
  }

  return transactions.map(t => ({
    date: t.date,
    amount: t.amount,
  }));
}

Step 4: Verify Fix

Prove the bug is fixed through systematic testing.

Verification Checklist
  • Follow same reproduction steps
  • Confirm bug no longer occurs
  • Test edge cases around the fix
  • Verify no new errors introduced
  • Check fix works across environments (dev, staging)
  • Validate fix matches expected behavior
Verification Documentation
## Fix Verification

### Testing Performed
1. ✅ Followed original reproduction steps - bug no longer occurs
2. ✅ Tested with empty date range - shows "No data to export" message
3. ✅ Tested with valid date range - exports successfully
4. ✅ Tested with large dataset (50k+ transactions) - works correctly
5. ✅ Tested in Chrome, Firefox, Safari - all working
6. ✅ Tested on staging environment - fix confirmed

### Edge Cases Tested
- Empty result set → Shows appropriate message
- Null response from API → Handled gracefully
- Single transaction → Exports correctly
- Malformed transaction data → Logs error, doesn't crash

### No New Issues
- ✅ No console errors
- ✅ No memory leaks
- ✅ No performance degradation
- ✅ Other export features still work

Step 5: Add Tests to Prevent Regression

Critical: Every bug fix must include tests.

Test Requirements
  • Test that reproduces original bug (should pass after fix)
  • Tests for edge cases discovered during investigation
  • Integration test if bug involved multiple components
  • Update existing tests if they need to handle new scenarios
Example Tests
describe('generateReport', () => {
  // Test that reproduces original bug
  it('should handle null transactions gracefully', () => {
    const result = generateReport(null);
    expect(result).toEqual([]);
    expect(console.warn).toHaveBeenCalledWith('No transactions to export');
  });

  // Edge cases
  it('should handle undefined transactions', () => {
    const result = generateReport(undefined);
    expect(result).toEqual([]);
  });

  it('should handle empty array', () => {
    const result = generateReport([]);
    expect(result).toEqual([]);
  });

  it('should handle single transaction', () => {
    const transactions = [{ date: '2025-01-01', amount: 100 }];
    const result = generateReport(transactions);
    expect(result).toHaveLength(1);
    expect(result[0]).toEqual({ date: '2025-01-01', amount: 100 });
  });

  // Original happy path (should still work)
  it('should transform multiple transactions correctly', () => {
    const transactions = [
      { date: '2025-01-01', amount: 100 },
      { date: '2025-01-02', amount: 200 },
    ];
    const result = generateReport(transactions);
    expect(result).toHaveLength(2);
  });
});

Step 6: Document in PR

Comprehensive PR description for bug fixes.

PR Template for Bug Fixes
## Bug Fix: [Brief Description]

**Ticket**: #123 / ENG-456 / JIRA-789

### Problem
[Clear description of the bug]

### Reproduction Steps (Before Fix)
1. [Step 1]
2. [Step 2]
3. [Error occurs]

**Expected**: [What should happen]
**Actual**: [What happened instead]

### Root Cause
[Detailed explanation of why bug occurred]

- Where: `src/utils/report.ts`, line 45
- Why: Null check missing before array operation
- Impact: Affects all users trying to export with empty date ranges

### Solution
[Explanation of how fix works]

- Added null/undefined check before array operations
- Return empty array instead of crashing
- Added user-facing warning message
- Updated API response handling to be more defensive

### Fix Verification (After)
1. ✅ Followed reproduction steps - bug no longer occurs
2. ✅ Tested edge cases (null, undefined, empty array)
3. ✅ Tested across browsers (Chrome, Firefox, Safari)
4. ✅ Verified on staging environment
5. ✅ No new console errors or warnings

### Test Coverage
- Added unit tests for null/undefined handling
- Added tests for empty array edge case
- Updated integration tests for export feature
- All existing tests still passing

**Coverage**: +15 lines covered, 0 lines uncovered

### Regression Prevention
- [x] Tests added that would catch this bug if reintroduced
- [x] Similar patterns checked in codebase (found 2, fixed in this PR)
- [x] Documentation updated to note API response inconsistency

### Screenshots/Evidence
**Before (Bug)**:
![Error state](screenshots/before-error.png)

**After (Fixed)**:
![Success state](screenshots/after-success.png)
![Empty state](screenshots/after-empty.png)

### Deployment Notes
- No migrations required
- No environment variable changes
- Safe to deploy immediately
- Rollback: Revert this commit

### Related Issues
- Closes #123
- Related to #456 (similar null handling issue)

Common Pitfalls to Avoid

During Investigation

  • ❌ Assuming you know the cause without verifying
  • ❌ Fixing symptoms instead of root cause
  • ❌ Not checking if similar bugs exist elsewhere
  • ❌ Skipping reproduction in clean environment

During Implementation

  • ❌ Making changes beyond fixing the bug
  • ❌ Refactoring unrelated code in bug fix PR
  • ❌ Adding features while fixing bugs
  • ❌ Not handling all edge cases discovered

During Verification

  • ❌ Only testing happy path after fix
  • ❌ Not testing in multiple environments
  • ❌ Skipping regression testing
  • ❌ Not documenting what was tested

During Documentation

  • ❌ Vague PR descriptions ("Fixed bug")
  • ❌ Not explaining root cause
  • ❌ Missing before/after evidence
  • ❌ Not linking to original bug report

Bug Fix Quality Standards

Minimum Requirements

  • ✅ Root cause identified and documented
  • ✅ Fix is minimal and targeted
  • ✅ Tests added to prevent regression
  • ✅ Verification documented with evidence
  • ✅ No new bugs introduced
  • ✅ Works across all supported environments

Excellence Indicators

  • ✅ Similar patterns checked and fixed
  • ✅ Multiple edge cases tested
  • ✅ Performance impact measured
  • ✅ Team knowledge shared (wiki/docs updated)
  • ✅ Preventive measures suggested

Automation Support

Bug Fix PR Template

Create .github/PULL_REQUEST_TEMPLATE/bug_fix.md:

## Bug Fix

**Ticket**: [Ticket number/link]

### Problem
[Description of bug]

### Reproduction Steps (Before Fix)
1.
2.
3.

**Expected**:
**Actual**:

### Root Cause
[Explanation of why bug occurred]

### Solution
[How fix works]

### Verification (After)
- [ ] Original reproduction steps no longer trigger bug
- [ ] Edge cases tested
- [ ] Tested in multiple browsers/environments
- [ ] No new errors or warnings

### Test Coverage
- [ ] Tests added for bug scenario
- [ ] Tests added for edge cases
- [ ] All existing tests passing

### Screenshots
**Before**: [Screenshot]
**After**: [Screenshot]

GitHub Actions for Bug Fix PRs

name: Bug Fix Verification
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  verify-bug-fix:
    if: contains(github.event.pull_request.labels.*.name, 'bug')
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Check PR description
        run: |
          PR_BODY="${{ github.event.pull_request.body }}"
          if [[ ! "$PR_BODY" =~ "Root Cause" ]]; then
            echo "::error::Bug fix PR must document root cause"
            exit 1
          fi
          if [[ ! "$PR_BODY" =~ "Verification" ]]; then
            echo "::error::Bug fix PR must document verification steps"
            exit 1
          fi

      - name: Run tests
        run: npm test

      - name: Check test coverage
        run: |
          COVERAGE=$(npm test -- --coverage --json | jq '.total.lines.pct')
          if (( $(echo "$COVERAGE < 90" | bc -l) )); then
            echo "::warning::Test coverage is below 90%"
          fi

Success Criteria

Bug Fix is Complete When

  • ✅ Bug can no longer be reproduced
  • ✅ Root cause is understood and documented
  • ✅ Fix is minimal and targeted
  • ✅ Tests prevent regression
  • ✅ Edge cases are handled
  • ✅ Works in all environments
  • ✅ PR documentation is comprehensive
  • ✅ No new issues introduced

Related Skills

  • universal-verification-pre-merge - Pre-merge verification checklist
  • universal-verification-screenshot - Visual verification for UI bugs
  • universal-debugging-systematic-debugging - Systematic debugging methodology
  • universal-debugging-root-cause-tracing - Root cause analysis techniques
  • universal-testing-testing-anti-patterns - Testing patterns to avoid

平台分布

Claude Code

31.27%
按下载量换算604

Gemini CLI

21.93%
按下载量换算424

Antigravity

16.99%
按下载量换算328

OpenCode

12.4%
按下载量换算240

Cursor

7.9%
按下载量换算153

github-copilot

3.95%
按下载量换算76

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills