bug-trace
它能做什么
这项技能把已报告的漏洞追溯到根本原因。它阅读报告,沿着出错的代码路径查找,找出导致问题的修改,并排除其他解释。适合调查原因尚不明确的漏洞的开发者。
适用场景
- ✓当一份漏洞报告到达,而你还不知道是什么原因导致的时候。
- ✓当一个漏洞有多个症状,需要分别处理的时候。
- ✓当你希望在决定修复方案之前排除相互竞争的解释的时候。
技能链接
https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/bug-trace/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“你能从这份漏洞报告入手,找出为什么部分用户的结账会失败吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体写下出错路径的每一步及其前提条件,将每一步与当前代码进行核对,查找涉及该路径的最近修改,并检验相互竞争的解释。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Bug trace
This skill finds a root cause. It doesn't judge whether the cause is
systemic; investigate-bug adds that judgment on top. Never change
product code while tracing.
1. Take in the report
pnpm exec tsx .agents/skills/bug-trace/scripts/bug-intake.ts \
--issue <N|url> | --jira <KEY|url> | --file <path> | --text "<report>" \
[--title "<line>"] [--run <id>]
It writes bug.json to the run directory and prints the run id
(bug-gh-123, bug-eng-456, or bug-<date>-<hash>). Re-running with the
same report reuses the run. Jira intake uses jira-refactor-findings'
client and credentials.
2. Split symptoms
A report often lists several. Treat each one on its own, with a short label.
3. Trace each symptom
Follow references/bug-investigation.md:
- Write the path as hops, each with file:line and its runtime precondition.
- Check every precondition against today's code.
- List what changed on the path: system-history
analyze.ts --focuswith every file on the path, then read each regression candidate withpr.ts. - Hold at least two explanations, and run the check that separates them.
- Reproduce in the branch browser when the path runs there.
- Check
AGENTS.md, skills, andpackages/corefor a rule or primitive the code bypasses.
When fanning out to sub-agents, give each one the symptom, its entry point, and the whole brief. Don't give it a theory or a short list of files: that list becomes the boundary of its search.
Output
For each symptom:
- the hop list, and the broken hop;
- the trigger commit, or
none-foundand what you checked; - the explanations you ruled out, and how;
- the evidence level:
reproduced,traced(a broken hop shown in code), orinferred; - the framework rule involved;
- the sibling sites.
常见问题
它会修改产品代码吗?
不会。该技能只追溯原因,在追溯过程中不编辑代码。
报告可以来自哪里?
可以来自议题、工单、文件或粘贴的文本。
如果原因仍然不清楚怎么办?
技能要求至少保留两种解释,并运行能够区分它们的检查。
详情
作者的原始描述
Find the root cause of a reported bug: take in the report (GitHub issue, Jira ticket, file, or pasted text), trace the failing path hop by hop with each hop's runtime precondition, find the recent change that broke it, and rule out rival explanations. Use for any bug investigation where the cause is not yet known.
repo: BuilderIO/agent-native
热度
- GitHub 星标
- 7.6k
- 排名
- #13141
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …