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 Zhangs-11/zs-skills --skill diagnose-and-explaingit clone --depth 1 https://github.com/Zhangs-11/zs-skillsWrote 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/zhangs-11/zs-skills/diagnose-and-explain)<a href="https://agentmods.dev/skills/zhangs-11/zs-skills/diagnose-and-explain"><img src="https://agentmods.dev/badge/skills/zhangs-11/zs-skills/diagnose-and-explain/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/zhangs-11/zs-skills/diagnose-and-explain"><img src="https://agentmods.dev/badge/skills/zhangs-11/zs-skills/diagnose-and-explain.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.00154 | $0.03088 |
| Opus 5 | $0.00077 | $0.01544 |
| Sonnet 5 | $0.00031 | $0.00618 |
| Haiku 4.5 | $0.00015 | $0.00309 |
Grade A, and why
diagnose-and-explain 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 11d 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 — 123 lines — stays where its author put it; the contents beside it link to each section on GitHub.
诊断并讲清楚
目标不是给出最像答案的猜测,而是建立足以推翻错误结论的证据链,找到问题发生的机制,并让不了解领域的用户真正看懂。
推理底盘与权限
- 先完整读取并使用
$first-principles-adversarial-review。把用户给出的原因和首个合理解释都视为待验证假设。 - 默认自主进行只读调查:读取代码、配置、日志、文档、接口契约、数据只读结果、历史差异、已有正常样本和同类实现。
- 不因发现疑似根因而自动修复。修改代码、配置、测试、文档或数据,添加持久化埋点,以及提交、推送、部署、发消息或更新外部系统前,必须说明拟操作及影响并获得明确确认。
- 运行可能写入状态、触发真实业务、污染数据或影响外部系统的复现与探针,不属于只读调查,必须先确认。优先使用隔离、可回滚、无副作用的验证方式。
调查工作流
0. 先约定诊断的停止条件
用户要求分析报错或找根因时,告警摘要、错误栈转述和“下一步可以查日志/代码”都只是调查入口,不是诊断结果。只要当前权限内还有可访问、低风险,并且可能改变根因判断或结论强度的代码、日志、配置、数据只读查询或正常对照,就直接继续调查,不把本可自主完成的下一步留给用户再次追问。
首轮调查持续到满足以下任一条件:已经形成经过关键反证的根因结论;可用事实源已经穷尽,只能给出有边界的候选原因;继续取证需要用户提供专属材料、开放环境访问或授权有副作用的操作;剩余查询即使得到不同结果也不会改变结论。受阻时说明已经查了什么、具体缺什么,以及缺失证据会区分哪两个候选,不用“后续还能继续分析”掩盖尚未完成的低成本只读调查。
1. 固定问题与事实源
先明确期望行为、实际现象、发生时间、影响对象和判断问题存在的信号。技术问题追踪真实入口、调用链、数据流、状态和错误路径;业务、产品、流程或数据问题追踪参与者、生产者、消费者、规则、指标口径、状态转换和反馈环。
优先检查最新、最接近运行时的事实源。注释、文档、字段名、历史记忆和用户猜测只能作为线索。无法验证时明确标记“推断,未验证”。
问题可能跨环境、地域、租户、账号或部署时,先固定一条可核验的环境身份链:用户实际访问的域名或入口 → 运行时集群、namespace、deployment 与镜像 → 配置中心及其 namespace/group/dataId → 最终数据库、缓存或消息队列实例。以运行时值为准;仓库默认配置、相同版本和相似响应只能作为线索。环境身份链尚未闭合时,不把某个环境的日志、配置或数据当成另一个环境的直接证据。
把业务对象识别为复合身份,而不是裸 ID:至少包含环境身份、事实源和业务 ID,必要时再加租户与时间范围。跨库关联项目号、任务号、订单号等可能重复的编号前,先用域名、集群、配置实例、时间、消息内容或文件路径证明两边属于同一对象;不能证明时,只能作为跨环境对照,不能支撑当前环境的根因。
2. 建立反馈闭环
能安全复现时,建立一个针对用户准确症状的清晰通过/失败信号,而不是只验证“没有崩溃”。优先选择现有测试、只读查询、日志对照、请求回放、历史前后对比或正常样本对照。
让闭环尽量稳定、快速、具体。若问题偶发,设法提高观测或复现概率;若能缩小样本、步骤、输入或参与者,则逐项删除非必要因素,找出最小成立条件。
“无法稳定复现”不是广义诊断的停止条件。对线上事故、业务异常或一次性事件,可以使用时间线、审计记录、多源交叉验证和排除法,但必须降低结论置信度并说明缺失的证据。不得为了满足复现要求制造有副作用的操作。
3. 沿组件边界取证,并检查证据是否独立
问题跨越两个及以上组件、角色或流程节点时,沿边界记录信息在哪里第一次偏离预期。按需使用下表,不为简单单因问题强行套模板:
| 边界 | 输入 | 输出 | 配置或状态 | 期望与实际 | 证据来源 |
|---|
不要把同一事实的多个转述误算成多份证据。来自同一请求链的应用日志、聚合告警和截图通常是一个证据渠道;注释和复述也不是独立的运行时证据。可重复实验、当前运行时或原始日志、真实配置或数据、独立正常对照等来源若彼此不依赖,才可以叠加提高置信度。证据互相矛盾时,先解释矛盾或降低结论强度,不按数量投票。
多个环境出现相似症状时,按环境分别列出入口、生产者、消费者、运行时配置、事实源和失败边界,再寻找共同原因。页面都为空、错误文案相同或接口响应一致,只能证明症状相似;只有各环境在同一已验证边界以同一机制失败,才能合并为一个根因。尤其要分别验证“上游是否仍在生产数据”和“下游是否能读取数据”,避免用修复读取配置掩盖上游已停止写入的问题。
4. 先找等价正常路径,再判断哪一层需要改
What ships with it
3 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.
- 11d ago First seen · 123 lines · 154 tokens per session scan A fcb9e02e7be2
diagnose-and-explain is a skill published in the GitHub repository Zhangs-11/zs-skills (2 stars, last pushed 5d ago), licensed MIT. It adds 154 tokens to every session and 3,088 once invoked, about $0.0008 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-31.
Other skills, from other repositories
systematic-debugging
A step-by-step method for finding the underlying cause of technical problems before changing code. It covers reading errors, reproducing failures, checking recent changes, and tracing data across system components.
diagnosing-bugs
A structured process for finding the cause of difficult bugs and performance slowdowns. It builds a repeatable check that turns the reported problem into a clear pass-or-fail signal.
superpowers-zh
Use when constraining AI coding with Chinese TDD methodology, systematic debugging, code review, and verification workflows. Superpowers-zh: Chinese adaptation of the Superpowers AI-assisted programming skills and methodologies.
jacky-motion2-0-srt
A workflow for turning a Chinese spoken script and matching SRT subtitle file into a single 16:9 HTML information animation. SRT is a subtitle file that stores text with start and end times; the animation follows those times and adds recorded-screen placeholders when needed.
dsh-troubleshoot
A troubleshooting guide for DeepSeek Harness, including its process, configuration, plugins, tools, skills, and model connections.
ask-good-questions
Guidance for asking technical questions and reporting bugs so another developer can reproduce and answer them. It covers versions, environment details, minimal reproduction steps, expected and actual results, errors, and attempted fixes.