开源Bug修复学习工具

一个通过实践教授如何修复开源Bug的MCP服务器,提供问题追踪、概念学习、进度跟踪和成就系统,所有数据本地存储。

  • by ddmoney420
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 ddmoney420/bug-hunter-mcp

使用说明

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃     ____    __  __   ______           __  __   __  __    _   __  ______    ______    ____  ┃
┃    / __ )  / / / /  / ____/          / / / /  / / / /   / | / / /_  __/   / ____/   / __ \ ┃
┃   / __  | / / / /  / / __           / /_/ /  / / / /   /  |/ /   / /     / __/     / /_/ / ┃
┃  / /_/ / / /_/ /  / /_/ /          / __  /  / /_/ /   / /|  /   / /     / /___    / _, _/  ┃
┃ /_____/  \____/   \____/          /_/ /_/   \____/   /_/ |_/   /_/     /_____/   /_/ |_|   ┃
┃                                                                                            ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

“成为你注定要成为的开源冠军” (⌐■_■)

一个MCP服务器,教你通过做来修复开源错误。寻找问题,学习概念,跟踪进度,获得成就。

100%本地 -所有数据都保留在您的机器上。只有GitHub API调用问题搜寻。


  _   _   _   _   _   _   _____
 | | | | | | | | | \ | | |_   _|
 | |_| | | | | | |  \| |   | |
 |  _  | | |_| | | |\  |   | |
 |_| |_|  \___/  |_| \_|   |_|

狩猎(4工具)

工具 说明
hunt_issues 按语言、关键字、星级查找好的首发问题
analyze_repo 克隆和研究代码库结构
scaffold_solution 生成修复的启动代码
scaffold_reproduce_environment 为任何技术栈自动生成Dockerfile
claim_issue 在GitHub上发表评论

  _       _____      _      ____    _   _
 | |     | ____|    / \    |  _ \  | \ | |
 | |     |  _|     / _ \   | |_) | |  \| |
 | |___  | |___   / ___ \  |  _ <  | |\  |
 |_____| |_____| /_/   \_\ |_| \_\ |_| \_|

学习(10个工具)

概念图

工具 说明
show_graph 26个具有先决条件的CS概念(ASCII依赖图)
next_bug 基于掌握程度的个性化“下一步要学什么”
filter_lessons 按难度/概念标签搜索课程
get_strategy 10个问题类别和调试策略

课程

工具 说明
new_lesson 生成课程模板(4个部分)
validate_lesson 检查课程结构

测验和记忆

工具 说明
validate_quiz 验证测验结构
validate_quiz_answers 分数测验,跟踪通过/失败
record_quiz_attempt 将结果保存到配置文件
get_concept_retention 查看弱/强概念、通过率

   ____   ____     ___   __        __
  / ___| |  _ \   / _ \  \ \      / /
 | |  _  | |_) | | | | |  \ \ /\ / /
 | |_| | |  _ <  | |_| |   \ V  V /
  \____| |_| \_\  \___/     \_/\_/

成长(1个工具)

工具 说明
get_player_profile 统计数据、20多项成就、连胜、概念掌握

成就

  • 比赛状态杀手 -修复3个并发错误
  • 记忆专家 -主内存管理
  • 跨语言猎人 -修复3种以上语言的错误
  • 智力竞赛节目主持人 -通过10次测验
  • …还有16个

Chant集成(5个工具)

工具 说明
generate_chant_spec 从GitHub issue创建规范
chant_init 在仓库中初始化Chant
chant_list 列出所有规格
chant_show 显示规格详细信息
research_workflow 全面研究→ 实施流程

工作流程

┌─────────────────────────────────────────────────────────────────────────┐
│                                                                         │
│   1. HUNT                        2. REPRODUCE                           │
│   ┌──────────────┐               ┌─────────────────────────────┐        │
│   │ hunt_issues  │ ──────────▶   │ scaffold_reproduce_env      │        │
│   └──────────────┘               └─────────────────────────────┘        │
│         │                                    │                          │
│         ▼                                    ▼                          │
│   3. LEARN                       4. FIX                                 │
│   ┌──────────────┐               ┌─────────────────────────────┐        │
│   │ get_strategy │               │ scaffold_solution           │        │
│   │ show_graph   │               │ (your code here)            │        │
│   └──────────────┘               └─────────────────────────────┘        │
│         │                                    │                          │
│         ▼                                    ▼                          │
│   5. VALIDATE                    6. SHARE                               │
│   ┌──────────────┐               ┌─────────────────────────────┐        │
│   │ run tests    │               │ Open issue, link branch     │        │
│   │ take quiz    │               │ Let maintainer invite PR    │        │
│   └──────────────┘               └─────────────────────────────┘        │
│         │                                                               │
│         ▼                                                               │
│   7. GROW                                                               │
│   ┌──────────────────────────────────────────────────────────┐          │
│   │ get_player_profile  →  achievements, streaks, mastery    │          │
│   └──────────────────────────────────────────────────────────┘          │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘

安装

cd ~/Developer/bug-hunter-mcp
npm install
npm run build
npm test  # 119 tests

设置

1.GitHub Token

export GITHUB_TOKEN="your_github_token"

获取一个:https://github.com/settings/tokens(范围: repo, read:org)

2.添加到克劳德代码

增添 ~/.claude/settings.json:

{
  "mcpServers": {
    "bug-hunter": {
      "command": "node",
      "args": ["/path/to/bug-hunter-mcp/dist/index.js"],
      "env": {
        "GITHUB_TOKEN": "your_github_token"
      }
    }
  }
}

3.重新启动克劳德代码

/mcp  # Verify server loaded

数据存储

全本地,无云:

~/.bug-hunter/
└── profiles/
    └── your-name.json    # Stats, achievements, quiz history

~/Developer/bug-hunter-mcp/
├── LESSONS.md            # Bug lessons with quizzes
├── RESEARCH.md           # Platform research
└── ROADMAP.md            # Feature roadmap

概念图

26个具有先决条件的CS概念:

┌─ BEGINNER ────────────────────────────────────────────┐
│ Basic Types → Control Flow → Functions                │
└───────────────────────────────────────────────────────┘
        │
        ▼
┌─ INTERMEDIATE ────────────────────────────────────────┐
│ Memory Management → Pointers → Data Structures        │
│ Type Systems → Pattern Matching → Error Handling      │
│ Async/Await → Testing → Debugging                     │
└───────────────────────────────────────────────────────┘
        │
        ▼
┌─ ADVANCED ────────────────────────────────────────────┐
│ Concurrency → Atomics → Locks → Race Conditions       │
│ Optimization → Performance Bottleneck                 │
│ Garbage Collection → Memory Leak → Deadlock           │
└───────────────────────────────────────────────────────┘

使用 show_graph 为了看到完整的可视化, next_bug 以获取建议。


问题分类

10个带有调试策略的bug类别:

类别 策略
race-condition 日志记录、线程清理程序、锁审查
memory-leak 堆分析、分配跟踪
incorrect-logic 测试隔离、输入模糊
api-incompatibility 版本检查、文档比较
type-mismatch 类型推断、转换审核
null-reference 空检查,可选链接
performance-bottleneck 分析、火焰图
encoding-error 六角形检查、字符集检测
deadlock 锁排序、超时检测
assertion-error 不变检查、前提条件审查

使用 get_strategy {category: "race-condition"} 了解全部细节。


Credits(邮购)

吟诵 通过 lex00

规范驱动的开发平台

莫吉 通过 ddmoney 420

终端造型和kaomojis


许可证

麻省理工学院


(ノ◕ヮ◕)ノ*:・゚✧ Happy Hunting! ✧・゚:*ヽ(◕ヮ◕ヽ)