troubleshooting

troubleshooting is a skill for Claude Code, Codex from davidYichengWei/agentic-engineering-framework. It costs 40 tokens per session (1,345 once invoked), scanned A, original, MIT.

A troubleshooting workflow for locating the root cause of build errors, runtime failures, failed tests, pipeline errors, and production alerts.

In plain words
What is it for?
Use it to inspect error paths, identify useful log messages, give commands for extracting missing evidence, and record the investigation for pipeline or production incidents.
Why use it?
It prevents fixes based on guesses by requiring evidence from the code and relevant logs before suggesting a solution.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/davidyichengwei/agentic-engineering-framework/troubleshooting
Any agent
npx skills add davidYichengWei/agentic-engineering-framework --skill troubleshooting
Clone the repo
git clone --depth 1 https://github.com/davidYichengWei/agentic-engineering-framework

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for troubleshooting

README.md
[![agentmods](https://agentmods.dev/badge/skills/davidyichengwei/agentic-engineering-framework/troubleshooting.svg)](https://agentmods.dev/skills/davidyichengwei/agentic-engineering-framework/troubleshooting)
Your own site
<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>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,345 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 4d ago against content hash 9eca0b031488, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

skills/troubleshooting/SKILL.md · 150 lines

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.
  1. 禁止假设:所有结论必须基于代码 + 用户提供的 log,不得凭经验猜测
  2. 未找到根因,禁止提修复建议

核心约束

  1. AI 无法访问用户环境:只能看用户发来的信息 + codebase 代码
  2. 让用户执行命令:命令必须用代码块输出,方便复制
  3. 输出目标:根因 + 修复建议(不自己修复)

Log 不足时的处理

禁止在缺少 log 的情况下猜测根因。

当用户提供的 log 不足以定位问题时:

  1. 在代码中找关键 log:定位相关代码路径,找出能区分不同故障场景的 log 语句
  2. 提供 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

Read the full file on GitHub · 150 lines

Files

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.

Changes

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.

  1. 4d ago First seen · 150 lines · 40 tokens per session scan A 9eca0b031488

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

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.

obra/superpowers · 37 tokens

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.

microsoft/vscode · 62 tokens

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.

microsoft/vscode · 51 tokens

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.

microsoft/vscode · 53 tokens

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…

microsoft/vscode · 71 tokens