Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add rushengzhou/sid-code --skill bug-fixgit clone --depth 1 https://github.com/rushengzhou/sid-codeWrote 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/rushengzhou/sid-code/bug-fix)<a href="https://agentmods.dev/skills/rushengzhou/sid-code/bug-fix"><img src="https://agentmods.dev/badge/skills/rushengzhou/sid-code/bug-fix/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/rushengzhou/sid-code/bug-fix"><img src="https://agentmods.dev/badge/skills/rushengzhou/sid-code/bug-fix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00062 | $0.02128 |
| Opus 5.5 | $0.00025 | $0.00851 |
| Sonnet 5.5 | $0.00012 | $0.00426 |
| Haiku 4.5 | $0.00006 | $0.00213 |
Grade A, and why
bug-fix 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 1mo 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 — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Bug Fix Skill — 半自动修复标准作业流程(SOP)
你是 sid-code 内置的 bug-fix Skill,负责把一个 bug 从「报错」走到「已验证修复」的完整闭环。
你的核心原则是 要证据、不拍脑袋:每个根因结论都要有 file:line 实证,每个"已修复"都要有测试/构建通过的实证。
这是「为 AI 代码兜底」叙事里的修复环节——code-review 只读不改、负责发现问题;bug-fix 负责落地修复。 两者职责互补,本 Skill 会写代码(allowed-tools 含 write/edit),因此必须经过 plan mode + 人工审批才动手。
0. 执行总纲(六步,顺序不可跳)
Step 1 复现与范围确认 → Step 2 定位根因(要证据) → Step 3 plan 出方案
→ [人工审批] → Step 4 实现 → Step 5 测试验证 → Step 6 清理与汇报
开始前先用 todo_write 把这六步登记成 todo,逐步推进、逐步勾掉,避免长任务中途遗漏环节。
Step 1:复现与范围确认
- 读取用户给的报错信息 / 失败用例 / 异常堆栈,提炼出确切的失败现象(什么输入 → 期望什么 → 实际什么)。
- 用
grep/glob圈定涉及的文件与符号(报错里的函数名、文件名、错误文案是最好的检索锚点)。 - 如果项目可运行:先跑一次复现(
bash跑相关测试 / 启动命令),亲眼确认失败,而不是假设它失败。- 跑不起来 / 缺环境 → 如实说明,基于静态阅读继续,但在汇报里标注"未实测复现"。
产出:一句话描述确切失败现象 + 一份"嫌疑文件清单"。
Step 2:定位根因(要证据,不拍脑袋)
- 用
read读嫌疑文件的完整相关段落(不只看片段——很多根因要靠上下文才能看清)。 - 沿调用链追:谁调用了它、它依赖什么、数据从哪来到哪去,一直追到真正的根因,而非表层症状。
- 每一个根因结论都必须引用
file:line实证:- ✅ "根因在
src/query/empty-param.ts:43-48,isEmptyToolInput({})对任何空对象返回 true,不看工具是否本就无参数。" - ❌ "可能是参数校验有问题"(无位置、无证据 → 禁止)。
- ✅ "根因在
- 区分根因与症状:报错出现的地方往往不是根因所在。改症状不改根因 = 没修。
⚠️ 红线 RL-FIX-1:未拿到
file:line证据前,不得进入 Step 3 出方案。
Step 3:进入 plan mode 出修复方案
- 调用
enter_plan_mode进入计划模式。 - 在计划文件里写清三件事:
- 根因:用 Step 2 的
file:line证据链说明问题出在哪、为什么会触发。 - 修复点:要改哪些文件、改成什么样、为什么这样改能根治(而非打补丁掩盖症状)。
- 验证方式:改完怎么证明修好了(跑哪些测试、补哪些用例、构建是否通过)。
- 根因:用 Step 2 的
- 评估影响面与可逆性:是否触及共享状态 / 删除数据 / 改动认证或基础设施——高风险点在 plan 里显式标注。
- 调用
exit_plan_mode提交人工审批。审批通过前不写任何代码。
这一步是 bug-fix 做成 activate 模式的原因:只有在主对话里才能进 plan mode 并等用户审批 (子代理被禁止进入 plan mode)。
Step 4:实现
审批通过后再动手:
- 按方案用
write/edit落地修复。遵守全局文件编辑规范:- 改动 > 30 行或同文件改 3 处以上 → 用
write整块覆盖,不要连续edit。 edit的old_string要带上下文保证唯一;连续失败 2 次立即重新read再改。- 禁止三连点省略占位符:代码里 NEVER 用
// ... rest of代替已存在代码。
- 改动 > 30 行或同文件改 3 处以上 → 用
- 只解决被问的那个 bug:不顺手重构无关代码、不加方案外的功能。
- 如需排查复杂分支,可临时加调试日志;修复确认后必须在 Step 6 清理掉。
红线 RL-FIX-2:不修改测试断言来"让测试变绿"。测试暴露的是问题,不是要被改的对象。
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.
- 1mo ago First seen · 132 lines · 62 tokens per session scan A c3766a2b2a29
bug-fix is a skill published in the GitHub repository rushengzhou/sid-code (2 stars, last pushed 1mo ago), licensed MIT. It adds 62 tokens to every session and 2,128 once invoked, about $0.0002 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-31.
Other skills, from other repositories
test-failure-explorer
Import and query an existing Vitest 3.2 JSON report to explore test failures, file-level errors and original diagnostic evidence.
confirm-failures-are-causally-linked-to-the-task-before-reportin
When delegating a task affected by this skill, include.
isolate-the-specific-failure-mode-before-proposing-a-fix
When delegating a task affected by this skill, include.
qa-sweep
Codex adapter for independent QA review of opencode-swarm changes. Use after implementation or debugging when the user asks for a QA sweep, regression check, review pass, quality gate, or confidence check before publishing.
test-fix
Diagnose and minimally fix a failing test, then re-run.
investigate
A structured root-cause investigation method for software bugs. It moves from history and reproduction through tested hypotheses, a focused fix, verification, and a report.