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 agentmods add skills/davidyichengwei/agentic-engineering-framework/troubleshootingnpx skills add davidYichengWei/agentic-engineering-framework --skill troubleshootinggit clone --depth 1 https://github.com/davidYichengWei/agentic-engineering-frameworkWrote 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/davidyichengwei/agentic-engineering-framework/troubleshooting)<a href="https://agentmods.dev/skills/davidyichengwei/agentic-engineering-framework/troubleshooting"><img src="https://agentmods.dev/badge/skills/davidyichengwei/agentic-engineering-framework/troubleshooting.svg" alt="Measured on agentmods" 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 | $0.00040 | $0.01345 |
| Opus 5 | $0.00020 | $0.00673 |
| Sonnet 5 | $0.00008 | $0.00269 |
| Haiku 4.5 | $0.00004 | $0.00135 |
Grade A, and why
troubleshooting 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 4d 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 — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.
问题排查 (Troubleshooting)
Iron Law
NO ASSUMPTIONS. NO FIX WITHOUT ROOT CAUSE.
- 禁止假设:所有结论必须基于代码 + 用户提供的 log,不得凭经验猜测
- 未找到根因,禁止提修复建议
核心约束
- AI 无法访问用户环境:只能看用户发来的信息 + codebase 代码
- 让用户执行命令:命令必须用代码块输出,方便复制
- 输出目标:根因 + 修复建议(不自己修复)
Log 不足时的处理
禁止在缺少 log 的情况下猜测根因。
当用户提供的 log 不足以定位问题时:
- 在代码中找关键 log:定位相关代码路径,找出能区分不同故障场景的 log 语句
- 提供 grep 命令:告诉用户如何从日志文件中提取关键信息
示例:
# 查找某个错误码相关的日志
grep -E "error_code|ErrorCode" /path/to/log | head -50
# 查找某个函数调用前后的上下文
grep -B5 -A10 "FunctionName" /path/to/log
# 按时间范围过滤
grep "2025-01-29 10:3[0-9]" /path/to/log | grep -i error
要点:
- 明确告诉用户 grep 什么关键字
- 说明这个 log 能帮助确认/排除什么
排查记录
流水线/现网问题排查时,创建排查记录文档实时跟踪进度。
判断是否创建:询问用户问题类型:
- 流水线报错 / 现网告警 → 创建排查记录
- 开发调试中的问题 → 不创建,直接排查
模板位置:reference/troubleshooting-log-template.md
创建方式:
cp skills/troubleshooting/reference/troubleshooting-log-template.md \
troubleshooting-[问题简述]-$(date +%Y%m%d).md
记录要点:
- 每个重要发现立即记录(日志、代码位置、中间结论)
- 每次有新进展必须更新文档:新发现的 log、代码分析结果、排除的假设
- 同步更新待确认点:哪些假设已验证、哪些还需确认、下一步要做什么
- 定位后补充根因和证据链
Red Flags:瞎猜信号
| 危险想法 | 正确做法 |
|---|---|
| "看起来像是 X" | 有什么证据?让用户验证 |
| "试试改 Y 看看" | 这是猜测,不是诊断 |
| "应该是 Z 导致的" | "应该"不是证据 |
排查流程
1. 收集信息
| 必须收集 | 深度排查额外收集 |
|---|---|
| 错误日志、堆栈、错误码 | 时间线、环境差异 |
| 复现条件、触发步骤 | 是否间歇性发生 |
| 代码版本、最近变更 | 完整服务拓扑 |
代码上下文调研(必须):调用 codebase-researcher subagent 调研问题相关的代码上下文,包括:
- 报错涉及的函数/模块的实现逻辑和调用链
- 相关数据结构和状态流转
- 上下游模块的交互方式
信息不足时主动追问,不要猜测。
2. 假设-验证循环
形成假设 → 让用户验证 → 确认或否定 → 迭代
3+ 轮失败规则:连续 3 轮假设被否定 → 停止猜测,扩大信息收集范围。
3. 历史案例(深度排查时)
流水线/现网问题时,在 reference/cases/ 搜索匹配案例:
- 提取错误关键字(错误码、异常类型、模块名)
- 匹配
symptoms.keywords - 按案例诊断步骤验证
4. 模块专项排查
根据项目需要,可在 reference/ 下为特定模块添加专项排查资料。
输出格式
- 开发调试问题:直接在对话中输出根因和修复建议
- 流水线/现网问题:更新排查记录文档,格式参见 troubleshooting-log-template.md
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 4d ago First seen · 150 lines · 40 tokens per session scan A 9eca0b031488
troubleshooting is a skill published in the GitHub repository davidYichengWei/agentic-engineering-framework (159 stars, last pushed 5mo ago), licensed MIT. It adds 40 tokens to every session and 1,345 once invoked, about $0.0002 per session on Opus 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.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…