code-bugfix
Skill108 starsChanged 10 days agoMITView on GitHub
排障与修 Bug:一眼定位的小问题直接修复验证;根因不明或偶现故障建红灯复现回路、假设证伪并补回归测试与同类清扫。触发:「这里报错了帮我查」「跑不通了修一下」「线上偶现异常」「修下这个 bug」。不适用:只读 CR(diff-review)或完成门禁(vdd)。
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Job-Yang/jobyang-ai-skillsword for word, first seen Nov 29, 2026
Other versions1 project uses a version of this.
Word for word · 1
- Job-Yang/jobyang-ai-skills★ 108100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository29 other files it gives its agents.
- ai-briefingSkill
- argument-readingSkill
- claim-checkSkill
- content-infographicSkill
- diff-reviewSkill
- engineering-docsSkill
- feynman-explainerSkill
- go-workSkill
- haohao-evalSkill
- haohao-shuohuaSkill
- implement-specSkill
- me-contextSkill
- minimum-experimentSkill
- opportunity-radarSkill
- opportunity-scorecardSkill
- outside-viewSkill
- png-compressSkill
- product-briefSkill
- pr-prepSkill
- reverse-teardownSkill
- root-rethinkSkill
- sansi-erhouxingSkill
- skill-library-keeperSkill
- spec-battleSkill
- steelman-choiceSkill
- style-compassSkill
- vddSkill
- video-readerSkill
- writing-craftSkill
The file
Files
Code Bugfix · 红灯驱动根因修复
先证明怎么复现,再按问题复杂度修根因;禁止教条走过场,开发期可逆改动默认开绿灯。
顶部核心原则: ① 可逆改动默认开绿灯:本地改源码随时可 Git 回退,查明根因即可直接修复并验证,绝不机械停手等用户发解锁指令;仅当用户明确说「先别改代码/只查原因」时才只出诊断报告;② 投入匹配问题大小(禁止教条三板斧):一眼能定位的小 Bug 直接修好补测即可,不必硬凑假设;只有根因不明、偶现或首轮未修好的复杂故障才拉起完整红灯复现与多假设证伪;③ 所有真实密钥/token 一律脱敏为
<REDACTED>(不回显明文原串);④ 修完顺手做同类清扫(Sibling Sweep)并真实运行态验证。
1. 授权边界与隐私脱敏
- 可逆开发默认可改,仅显式禁改时只读:本地改代码随时可 Git 回退,默认查清根因即直接修好验证;仅当用户明确要求「先别改代码/只看原因」时才保持只读,且绝不越权执行远端 push 或毁灭性删除。
- 凭证脱敏:所有命令、抓包与报错摘录中的密钥、token、口令统一替换为
<REDACTED>,复现脚本优先读环境变量。 - 现行事实优先:记忆与旧备注只是线索,当前源码、运行日志和真实复现结果永远推翻旧猜想;多仓与工程目录规则按需查阅 工程工作区契约。
2. 按复杂度分级的红灯工作流(方向参考,非必跑清单)
- 快速通道(根因明确的小 Bug):最小复现或核对证据 → 精准修复根因 → 补回归测试与同类清扫(Sibling Sweep)→ 跑通验证交付。
- 完整红灯通道(根因不明、偶现或首轮未修好):
- 建秒级红灯复现回路:在读取大段源码猜原因前,先搭出稳定触发该缺陷、退出码可判别、耗时秒级的复现命令;完整工具梯队与临时 worktree 二分法按需查阅 复现回路与二分梯队。若完全无法构建复现路径,停下来列明已尝试项并向用户索要复现环境或脱敏样本。
- 复现并最小化输入:压缩触发用例到最小自包含输入;遇到偶现(flaky)问题,通过并发/循环/缩小时间窗口把复现率拉高(记录
N次中失败M次),拒绝拿单次碰运气当作稳定复现。 - 列 3–5 个排序假设:仅在根因不明时基于证据列出最可能的 3–5 个候选根因并按概率排序。
- 探针证伪锁定唯一根因:用最小探针、断点日志或对照实验逐个排除假设,直到剩下唯一可证实根因,并用一句话说清「哪个文件哪一行在什么条件下出错」。
- 三假设/多轮停损边界:3 个假设全部证伪,或针对同一根因连续修复 2–3 轮后原症状依旧,停止盲猜,按交接清单(症状、已排除假设及证据、当前收集的日志与环境差异、缺失的权限/上下文)向用户汇报停手。
- 三次调数红线:同一魔法数字或延时调到第 3 次仍出问题,说明结构或契约错误,停手改用具名 token 并找缺失约束。
- 修复根因并锁入回归测试:改动最小精确根因;为该缺陷补一条「改前确认跑红、改后跑绿」的自动化回归测试(若无测试接缝,在报告中说明原因)。
- 全仓同类清扫(Sibling Sweep):用
rg搜索仓库内相同错误形态或被绕过的同类入口;授权范围内直接补修,跨模块或风险未知处列出清单供确认。 - 真实运行态验证并交付:跑通对应模块测试与真实入口验证,遇到持续卡壳或运行时态异常时按需查阅 常见排障陷阱模式。
3. 交付结果卡片
若用户明确要求只读查因,仅输出根因、证据链与修复建议卡片,不改文件。快速通道的小 Bug 用 2–3 句讲清根因、改法与实测结果即可,不必硬套模板;复杂故障首行说明结论与改动是否已本地提交(或未提交),随后附以下结构汇总:
- Root cause:出错原因与精确
file:line; - Fix:修改位置与根因改动说明;
- Loop & Regression guard:红→绿复现命令与对应回归测试位置;
- Tests & Sibling sweep:实际运行的测试范围、通过/失败数、同类清扫数量及结果;
- Status:
resolved/resolved with caveats(写明受限未覆盖范围)/blocked。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

