Borrowing it
Nothing to install: this file belongs to studyzy/tapd-ai-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/studyzy/tapd-ai-cli/main/.codebuddy/skills/fix-bug/SKILL.mdgit clone --depth 1 https://github.com/studyzy/tapd-ai-cliWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/studyzy/tapd-ai-cli/fix-bug)<a href="https://agentmods.dev/skills/studyzy/tapd-ai-cli/fix-bug"><img src="https://agentmods.dev/badge/skills/studyzy/tapd-ai-cli/fix-bug/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/studyzy/tapd-ai-cli/fix-bug"><img src="https://agentmods.dev/badge/skills/studyzy/tapd-ai-cli/fix-bug.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00073 | $0.02919 |
| Opus 5.5 | $0.00029 | $0.01168 |
| Sonnet 5.5 | $0.00015 | $0.00584 |
| Haiku 4.5 | $0.00007 | $0.00292 |
Grade A, and why
fix-bug scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 306 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Bug 修复流水线
从 Bug 描述出发,自动完成:Bug 分析与定位 → 创建隔离 Worktree → 代码修复 → 补充测试 → 全量验证 → 合入主分支 → 清理 Worktree。
适用于 tapd-ai-cli 项目——一个纯 Go CLI 工具,无前端、无 E2E 测试。
流程总览
用户输入 Bug 描述
|
v
[阶段 1] Bug 分析与定位
|
v
确认修复方案
|
v
[阶段 2] 创建 Worktree(隔离工作区)
|
v
[阶段 3] 代码修复
|
v
[阶段 4] 补充单元测试
|
v
[阶段 5] 全量验证(fmt / lint / build / test / coverage)
| ← 失败则修复代码并重新验证
v
[阶段 6] 合入主分支并清理 Worktree
|
v
完成
步骤
阶段 1:Bug 分析与定位
-
获取 Bug 信息
用户在调用此 SKILL 时应附带 Bug 描述。如果未提供,使用 AskUserQuestion tool 询问:
"请描述您遇到的 Bug,包括复现步骤、期望行为和实际行为。"
-
阅读项目上下文
阅读以下文件获取项目背景:
CODEBUDDY.md— 项目架构、构建命令、代码规范docs/requirement.md— 需求规格
-
分析 Bug 根因
使用 Agent tool(subagent_type=Explore)深入分析 Bug:
- 根据 Bug 描述定位相关代码文件
- 项目目录结构:
cmd/tapd/(入口)、internal/cmd/(命令层)、internal/client/(API 客户端层)、internal/config/(配置层)、internal/output/(输出层)、internal/model/(数据模型层) - 追踪数据流:参数解析 → API 调用 → 响应转换 → 格式化输出
- 分析可能的根因
- 检查是否有相关的已有测试覆盖该场景
-
提出修复方案并确认
使用 AskUserQuestion tool 向用户展示分析结果并确认修复方案:
- Bug 根因分析
- 受影响的文件和模块
- 修复方案(如有多种方案,列出各方案的优缺点)
- 可能的影响范围
等待用户确认修复方案后再继续。
阶段 2:创建 Worktree(隔离工作区)
-
确认当前分支状态
在创建 worktree 前,先检查当前分支状态:
git status git branch --show-current- 如果当前有未提交的更改,使用 AskUserQuestion tool 提醒用户并询问是否继续(worktree 是独立的,不影响当前工作区的更改)。
- 记录当前所在的主分支名称(通常是
main或master),后续合入时使用。
-
创建隔离 Worktree
使用 git 命令在项目父目录下创建 worktree,避免在项目内部产生额外目录:
# 获取项目根目录的父目录路径 PROJECT_ROOT=$(git rev-parse --show-toplevel) WORKTREE_DIR="$(dirname "$PROJECT_ROOT")/worktree/fix-<bug简述>" # 基于主分支创建新分支和 worktree git worktree add -b fix-<bug简述> "$WORKTREE_DIR" <主分支名>- 分支命名:使用
fix-<bug简述>格式,例如fix-auth-token-error - Worktree 路径:
../worktree/fix-<bug简述>(相对于项目根目录) - 基于步骤 5 中记录的主分支创建
创建成功后,使用
cd切换到新的 worktree 目录中。后续所有代码修改和测试都在此工作区中进行。 - 分支命名:使用
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 306 lines · 73 tokens per session scan A 550241a4ad80
fix-bug is a skill published in the GitHub repository studyzy/tapd-ai-cli (61 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 73 tokens to every session and 2,919 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
fix-bug compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| fix-bugstudyzy/tapd-ai-cli | Skill | 61 | 3mo ago | Apache-2.0 | A | 73 | Claude Code |
| systematic-debuggingopen-metadata/OpenMetadata | Skill | 16k | yesterday | Apache-2.0 | A | 37 | Claude Code |
| log-error-digestzebbern/claude-code-guide | Skill | 4.7k | 3d ago | MIT | A | 71 | Claude Code, Codex |
| cwv-optimizeradobe/skills | Skill | 319 | yesterday | Apache-2.0 | A | 112 | Claude Code |
| ci-fixersipyourdrink-ltd/bernstein | Skill | 1.2k | yesterday | Apache-2.0 | A | 15 | Claude Code, Codex |
| incident-response-incident-responsermyndharis/antigravity-skills | Skill | 1.9k | 23d ago | MIT | A | 36 | Claude Code |
| triaging-web-analytics-supportPostHog/posthog | Skill | 41k | yesterday | none | A | 151 | Claude Code, Codex |