Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

fix-bug修复错误

Agent Skill

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

总安装

380

周安装

16

GitHub Stars

2,689

下载量

133
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bytebase/dbhub --skill fix-bug

简介

fix-bug 提供从 GitHub Issue 到代码修复的系统化工作流,适用于 DBHub 项目 bug 处理。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中执行 fetch/analyze/locate/reproduce/plan/implement/verify/PR 八步流程。
  • 使用时需通过 gh issue view 命令获取 issue 详情,并严格遵循项目测试与代码规范要求。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • fix-bug 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Fix Bug from GitHub Issue

Systematic workflow for turning a GitHub issue into a working fix in the DBHub codebase.

Workflow

  1. Fetch → 2. Analyze → 3. Locate → 4. Reproduce → 5. Plan → 6. Implement → 7. Verify → 8. PR

Step 1: Fetch Issue

# From URL: https://github.com/owner/repo/issues/123
gh issue view 123 --json title,body,labels,comments,state

# From another repo
gh issue view 123 --repo owner/repo --json title,body,labels,comments,state
InputHow to fetch
https://github.com/owner/repo/issues/42gh issue view 42 --repo owner/repo
#42 or 42gh issue view 42 (current repo)
owner/repo#42gh issue view 42 --repo owner/repo

Step 2: Analyze Issue

Extract from the issue:

  • What's broken: Expected vs actual behavior
  • Reproduction steps: How to trigger the bug
  • Environment: Database type, connection method (DSN, SSH tunnel, TOML config), transport (stdio/HTTP)
  • Labels/comments: May reveal affected area or prior investigation
  • Linked PRs/issues: Check for related context

Step 3: Locate Relevant Code

Use the issue details to identify which part of the codebase is affected. DBHub has a clear modular structure — most bugs fall into one of these areas:

Bug CategoryWhere to LookKey Files
Connection failuresConnector implementationssrc/connectors/{db-type}/index.ts, src/connectors/manager.ts
SQL execution errorsTool handlerssrc/tools/execute-sql.ts, src/utils/allowed-keywords.ts
Schema/table listingSearch toolsrc/tools/search-objects.ts
DSN parsing issuesParser logicsrc/connectors/{db-type}/index.ts (DSNParser), src/utils/dsn-obfuscate.ts, src/utils/safe-url.ts
SSH tunnel problemsTunnel utilitiessrc/utils/ssh-tunnel.ts, src/utils/ssh-config-parser.ts
TOML config issuesConfig loadingsrc/config/toml-loader.ts, src/types/config.ts
Multi-database routingManager & toolssrc/connectors/manager.ts, src/utils/tool-handler-helpers.ts
Custom tool issuesCustom handlersrc/tools/custom-tool-handler.ts, src/tools/registry.ts
HTTP transportServer setupsrc/server.ts
Read-only violationsSQL validationsrc/utils/allowed-keywords.ts, src/utils/sql-parser.ts
Row limitingSQL rewritingsrc/utils/sql-row-limiter.ts
API endpoint issuesAPI handlerssrc/api/sources.ts, src/api/requests.ts
AWS IAM authToken signingsrc/utils/aws-rds-signer.ts

Search for error messages, function names, or file paths mentioned in the issue. Trace the code path from entry point to the failure.

Step 4: Reproduce

If integration tests exist for the area: Write a failing test that captures the bug. DBHub's test infrastructure makes this straightforward:

  • Database connector bugs → extend existing integration test in src/connectors/__tests__/
  • Utility bugs → add cases to existing unit tests in src/utils/__tests__/
  • Tool handler bugs → add to src/tools/__tests__/
  • Config bugs → add to src/config/__tests__/

Use the test fixtures in src/__fixtures__/ for multi-database or readonly/max_rows scenarios.

If no test infrastructure applies: Trace the code path and confirm the logic flaw by reading.

Step 5: Plan the Fix

For non-trivial fixes (multi-file, architectural impact): use EnterPlanMode.

For simple fixes (single function, clear root cause): proceed directly.

Step 6: Implement

  • Fix the root cause, not just the symptom
  • Keep changes minimal and focused
  • Follow existing code conventions (see CLAUDE.md for style guide)
  • Use parameterized queries for any database operations
  • Validate inputs with zod schemas where appropriate

Step 7: Verify

Run the relevant tests to confirm the fix:

pnpm test:unit                    # Quick check — no Docker needed
pnpm test src/path/to/test.ts     # Run the specific test file
pnpm test:integration             # Full integration suite if needed

Check that:

  • The failing test (if written) now passes
  • No existing tests regressed
  • The diff fully addresses the issue

Step 8: Create PR

  1. Create a branch: git checkout -b fix/issue-123
  2. Commit changes referencing the issue: git add <changed-files> git commit -m "$(cat <<'EOF' Fix: <short description> Closes #123 EOF)"
  3. Push and create the PR: git push -u origin fix/issue-123 gh pr create --title "Fix: <short description>" --body "$(cat <<'EOF' ## Summary <What was broken and how this fixes it> ## Changes <Bullet list of changes> Closes #123 ## Test plan - [] Existing tests pass - [] New test covers the bug scenario (if applicable) EOF)"
  4. Return the PR URL to the user.

Common Mistakes

  • Fixing symptoms instead of root cause: Trace the full code path before patching
  • Skipping reproduction: A fix without a repro is a guess
  • Scope creep: Fix the reported issue, don't refactor surrounding code
  • Missing edge cases: Check if the fix handles related scenarios mentioned in comments
  • Not testing with the right database: If the bug is database-specific, test with that connector

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

39.49%
按下载量换算53

Claude

29.82%
按下载量换算40

Cursor

19.61%
按下载量换算26

Gemini CLI

8.62%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills