Azure Diagnostics 技能
支持 Grok Bot
- 安装量
- 78.8万
- GitHub Star
- 1684
- 通过安全扫描
- 2/3
- 发布方
- 官方认证
- 开源协议
- MIT
- 仓库更新
- 2026年11月30日
TL;DR
azure-diagnostics 是微软面向运维阶段(Operate)的技能,借助 AppLens、Azure Monitor、资源健康检查与分服务指南诊断 Azure 生产故障。
适合安装
在 Azure 上运维应用、需要一套结构化方法快速定位 App Service、Container Apps、Functions、AKS、VM 或消息服务故障根因的开发者。
可以跳过
部署或初始化 Azure 应用——这些职责归属其他 Azure 技能,本技能只负责故障诊断。
npx skills add https://github.com/microsoft/azure-skills --skill azure-diagnostics通过 Skillselion MCP 直接试用——无需安装,磁盘零写入。
1. 添加远程连接器:
claude mcp add --transport http skillselion https://mcp.skillselion.com/mcp2. 向你的 Agent 发送指令:
Use Skillselion load_skill to load skill:microsoft/azure-skills#azure-diagnostics (Azure Diagnostics) and follow it.通过 Skillselion MCP 直接试用——无需安装,磁盘零写入。
1. 将此 URL 添加为自定义连接器(Claude.ai、ChatGPT 或 Cursor):
https://mcp.skillselion.com/mcp2. 向你的 Agent 发送指令:
Use Skillselion load_skill to load skill:microsoft/azure-skills#azure-diagnostics (Azure Diagnostics) and follow it.azure-diagnostics 核心要点
- 全面覆盖 Container Apps、App Service、Functions、AKS、VM 与消息队列服务
- 深度集成 AppLens、Azure Monitor 与 KQL 日志查询
- 强制先查 Resource Health(资源健康),再读日志
- 支持不访问线上 Azure 的纯证据离线分析模式
azure-diagnostics 核心数据
| 累计安装量 | 788,446 (78.8万) | skills.sh 注册表 |
|---|---|---|
| GitHub Star | ★ 1684 | GitHub |
| 安全审计 | 通过 2 / 3 项扫描器检测 | skills.sh 审计 |
| 仓库最后更新 | 2026年11月30日 | GitHub |
| 开源协议 | MIT | SKILL.md / GitHub |
| 代码仓库 | microsoft/azure-skills ↗ | |
数据截至 2026年12月1日(Skillselion 目录同步)
- 5 步快速诊断流程
- 6 套分服务专项排障指南
- 9 条诊断铁律
azure-diagnostics 在 Claude Code 中能做什么?
技能免费;需付费 Azure 订阅并配置相应监控服务。
- 核心能力
- Azure 故障排查 · 日志分析 · 根因定位 · 资源健康检查 · AKS 集群诊断
- 支持集成
- azure · kubernetes
- 适用场景
- 缺陷调试 · DevOps 运维
- 运行方式
- 本地运行
- 定价模式
- 自备 API 密钥
Azure Diagnostics 技能 会输出什么成果?
基于资源健康状态、日志、指标与近期变更沉淀出根因结论及可验证的修复步骤。
- 形成文档的根因分析结论
- 附带验证方法的修复步骤
Deep dive: how does azure-diagnostics actually work?
azure-diagnostics is Microsoft's official agent skill for debugging live Azure services: App Service, Container Apps, Functions, AKS, VMs and messaging. It has 788,446 installs as of December 1, 2026 (Skillselion catalog). The SKILL.md diagnoses almost nothing itself. It is a router into a 54-file bundle, and the symptom-to-cause tables live in there.
研读方法提交 968f7bf
The skill is pinned here at commit 968f7bf of microsoft/azure-skills, read on November 14, 2026, where the frontmatter declares version: "1.2.14". Every measurement below comes from a checkout at that commit, counting the skill's .github/plugins/ tree only, because the repository ships a second byte-identical copy under skills/ that would double any repo-wide grep. On that basis the bundle is 54 files and 230,901 bytes, of which the SKILL.md is 7,481.
azure-diagnostics, step by step
1. Its own diagnostic procedure is five steps long
And every one of them is a verb a model already knows.
Line 12 is a banner reading AUTHORITATIVE GUIDANCE and MANDATORY COMPLIANCE, and the line under it calls the document the official source for debugging and troubleshooting Azure production issues. Then it gives you one numbered flow, and this is all of it:
- Identify symptoms - What's failing?
- Check resource health - Is Azure healthy?
- Review logs - What do logs show?
- Analyze metrics - Performance patterns?
- Investigate recent changes - What changed?
Source: SKILL.md, "Quick Diagnosis Flow"
Any competent model produces that list unprompted, and none of the five steps narrows a symptom to a cause. The banner survives that reading anyway, because the claim is about the skill and not about the file carrying it: the SKILL.md is 7,481 bytes of a 230,901-byte bundle, roughly three percent, and the debugging lives in the other ninety-seven. What the entry point owes you is a reliable way in.
2. What it actually ships is a routing contract
Four rules that decide which document gets loaded.
The load-bearing section is four bullets that decide which file the agent opens next:
- Keep Container Apps and Function Apps diagnostics in this parent skill.
- Route active AKS incidents, AKS-specific intake, evidence gathering, and remediation guidance to AKS Troubleshooting.
- Route Azure VM RDP/SSH connectivity, NSG/firewall, credential reset, and VM agent troubleshooting to VM Connectivity Troubleshooting.
- Route Azure Messaging SDK troubleshooting (Event Hubs, Service Bus) to Messaging Troubleshooting.
Source: SKILL.md, "Routing"
The first bullet reads like a contradiction, because the service table in the section just above points Container Apps and Function Apps at references/ READMEs of their own. It is not one, and the directory layout proves it. Files under references/ are flat symptom tables that the parent reads and applies directly. Files under troubleshooting/ run their own procedure: the AKS and compute guides carry their own evidence order, workflow, error handling and guardrails, and the messaging README routes on by symptom and SDK language. AKS, compute and messaging get handed over to a guide; Container Apps and Functions get consulted as tables while the parent keeps control. The verbs "keep" and "route" carry that distinction, and the directory names back them up.
That makes this an index-plus-references skill of the same family as microsoft-foundry from the same repo, and the same shape as its pipeline siblings azure-prepare and azure-deploy. Where foundry routes by intent into twenty-four sub-skills, this one routes by Azure service into six per-service destinations.
3. The real diagnosis lives in 31 symptom tables
That the entry point never shows you.
Follow a route and the character of the writing changes. Count a symptom table strictly: its first column header has to name the thing you observed (symptom, error, error message, error code, exception, exit code, event message, observation, condition; a header that contains one of these words counts), and its remaining columns have to carry both a cause (cause, likely cause, reason, meaning) and a fix (fix, fix path, quick fix, action). The bundle holds 64 markdown tables in all; 31 of them pass that test, spread across 16 of its 42 markdown files. references/functions/triggers.md contributes seven of them and pod-failures.md five. The latter maps container exit codes: 137 to OOMKilled with a memory-limit fix, 139 to a segfault, 143 to a SIGTERM that may have come from a liveness probe. references/app-service/README.md maps ERR_CERT_DATE_INVALID to an expired certificate and DNS_PROBE_FINISHED_NXDOMAIN to a missing CNAME.
Two boundaries move that number. All seven compute symptom references drop out, because their tables jump from symptom straight to action or solution with no cause column at all. Loosening the rule to cause or fix, with solution also accepted as a fix, raises the count to 40 tables in 25 files. Everything below rests on the strict reading.
The distinctions these tables draw are the ones that decide a fix:
Readiness probe failure -> pod removed from Service endpoints (no traffic). Liveness probe failure -> pod killed and restarted.
Source: troubleshooting/aks/pod-failures.md, "Readiness & Liveness Probe Failures"
An agent that has confused those two will chase a traffic problem while pods restart underneath it. So the skill does diagnose, and the mechanism is lookup rather than inference: match the observed string, read the cause. That is a thinner mechanism than the falsifiable deletion test improve-codebase-architecture hands its agent, and for production triage it is also the better fit. Knowing that context deadline exceeded on an image pull points at an unreachable registry is a fact about Azure rather than a conclusion to be reasoned out, and loading facts is what a reference bundle is for.
4. The scripts collect evidence and refuse to interpret it
And the SKILL.md never names them.
Twelve script files ship in the bundle: six collectors written twice, once in bash and once in PowerShell. They are aks-baseline, appservice-diagnostics, containerapp-diagnostics, pod-evidence, run-ig and test-messaging-connectivity, and together they weigh 66,429 bytes, about 29 percent of everything. They draw a line at the point where a script would start guessing:
For any pod symptom below, run the pod-evidence script to collect the same read-only evidence bundle. Per pod it digests STATUS, STATE (exit code, reason, last state), EVENTS, current/previous LOGS, and RESOURCES (requests vs
top). It only gathers; interpret with the tables.Source: troubleshooting/aks/pod-failures.md, "Evidence Bundle Script"
The App Service and Container Apps READMEs carry one identical sentence saying that interpreting the output remains your job, which with the pod-failures line above puts the boundary in writing in three separate reference files. Deterministic collection goes to bash, judgement goes to the model, and the reference tables are the shared vocabulary between them. Most skills that ship scripts leave that line unstated.
There is a routing gap around it. The SKILL.md does tell the agent to prefer the scripts:
- Prefer bundled diagnostic scripts over ad hoc calls for permitted live collection when identifiers are known. If supplied evidence suffices or live access is prohibited, don't run them; otherwise run the applicable script first.
Source: SKILL.md, "Rules"
That rule names no script and links none, so all twelve files are still reachable only after a route has already fired. Ask about a Container Apps cold start and the reference README hands you containerapp-diagnostics.sh. Ask a question the routing table cannot classify, and the agent knows bundled scripts exist with no path to any of them.
5. The one reference it promotes with a sentence of its own is 1,342 bytes
Four KQL queries and three tips, the second-smallest markdown file in the bundle.
Every other reference in the SKILL.md appears inside a table row, a routing bullet or the closing link list. Exactly one gets a standalone sentence: line 125, under the Azure Monitor tooling, points at references/kql-queries.md for common diagnostic queries. That file is 1,342 bytes, the second-smallest markdown file in the bundle. Four queries against AppExceptions, AppRequests and AppDependencies, then this.
- Always include time filter:
TimeGenerated > ago(Xh)- Limit results with
take 50for large datasets- Use
summarizeto aggregate data before analyzingSource: references/kql-queries.md, "Tips"
Nothing there maps a symptom to a query, and a model writing KQL unaided would have applied all three tips. The file is honestly labelled as common queries, so the complaint is shelf placement: the queries that carry weight are already inline in the per-service references, next to the symptom that calls for them.
Compare the neighbour. references/azure-resource-graph.md is more than twice the size, teaches the HealthResources and ServiceHealthResources tables, and closes by restating rule 4 of the skill's own rule list almost word for word, telling you to check HealthResources before deep-diving into application logs. It gets one bare bullet at the bottom. Ranking the references is most of an index's job, and thin indexes over deep references are a house style for vendor skills like supabase-postgres-best-practices. This one has its emphasis wrong by one file.
6. Read-only is the default, and root cause requires quoted evidence
The AKS and VM guides forbid restarts and deletes without an explicit request, and a root cause has to quote its evidence.
The AKS and VM guides both set guardrails; the messaging README states none. The AKS one:
- default to read-only diagnostics
- do not restart, delete, cordon, drain, scale, upgrade, or reconfigure resources unless the user explicitly asks for remediation
- do not conclude root cause without quoting the evidence that supports it
Source: troubleshooting/aks/aks-troubleshooting.md, "Guardrails"
The third line is the one that separates this from a query library. Hand a fluent model some queries and it will narrate a root cause with total confidence; require the evidence to be quoted before the conclusion is stated and the chain becomes visible, which makes it checkable by whoever else is on the incident call. The compute guide repeats the same rule and adds a sequencing one, that network-layer blockers get fixed before agent-dependent ones.
The VM path also carries a genuine interlock. Four extension-backed commands are gated behind a pre-flight check:
Run before
az vm user update,az vm user reset-ssh,az vm user reset-remote-desktop,az vm run-command invoke, or any extension-backed operation.Source: troubleshooting/compute/references/cannot-connect-to-vm.md, "Pre-Flight Safety Checks"
The check is two az vm reads and a four-row table of safe and unsafe values for power state, provisioning state, VM agent status and extension state. PowerState/running passes; anything else, including a query error, fails. Any failure stops the run and pushes the agent to Serial Console or an offline repair VM. Defined pass conditions turn a warning into an interlock, and this one has them.
7. It prescribes an az command that does not exist
In four separate remediation references.
az command that does not existThe interlock above gates az vm user reset-remote-desktop. There is no such command. az vm user has exactly three subcommands in the current Azure CLI reference, delete, reset-ssh and update, and no reset-remote-desktop appears anywhere under az vm.
The name is a plausible guess because the SSH half of the pair is real. az vm user reset-ssh resets the SSH configuration, restarting the service and opening the port while leaving the account alone. RDP has no such counterpart. Microsoft's own article on resetting Remote Desktop Services offers two routes and neither is the CLI: the portal's "Reset configuration only" button, or PowerShell Set-AzVMAccessExtension -Name VMAccessAgent -ForceRerun $true. The obvious substitute does not close the gap either, since az vm user update sets a username and password through VMAccessAgent, which is the credential repair rather than the configuration one. A user whose RDP service is disabled or whose firewall rule is missing gets nothing from it.
The string occurs six times in the bundle: twice in guardrail lists, and four times as a command the agent is told to run.
az vm user reset-remote-desktop --name <vm> -g <rg>
Source: troubleshooting/compute/references/rdp-connectivity.md, "Quick Commands"
The same command sits in credential-auth-errors.md, firewall-blocking.md and rdp-service-config.md. The failure is loud rather than dangerous, since the CLI rejects an unknown command, and it lands on the exact path a locked-out user reaches: someone who cannot RDP into a Windows VM, has passed the pre-flight checks, and is handed a remediation that errors out. Every other command in this bundle that we checked against the public CLI surface resolves, including az aks check-acr and az vm repair reset-nic. We could not execute anything against a live subscription, so this is a check of the documented CLI surface, not of runtime behavior.
Tools it drives: az CLI reads across webapp, functionapp, containerapp, aks, vm, monitor and graph; kubectl for cluster-side evidence; six bundled collectors, each shipped as a bash and a PowerShell file; Inspektor Gadget through run-ig for kernel-level tracing; and the Azure MCP tools mcp_azure_mcp_applens, _monitor, _resourcehealth, _compute, _appservice, _eventhubs, _servicebus and _documentation, plus the Azure MCP AKS area under whatever name the host assigns it.
Behavior change, before and after:
| You ask | Without the skill | With the skill |
|---|---|---|
| "Why is my pod in CrashLoopBackOff?" | A list of things it could be, then commands to try | One evidence bundle, then the exit code read off a table: 137 means OOMKilled, raise the memory limit |
| "I can't RDP into this VM" | Suggestions in whatever order they occur | Symptom category, then a pre-flight safety check before any credential-reset command runs |
| "Find the logs for this Function App" | Guesses at the App Insights resource | A single Resource Graph join returning the workspace, with a documented CLI fallback |
The fine print worth knowing:
- The twelve script files are not linked from the SKILL.md: rule 7 says to prefer bundled scripts, but only a routed reference names them.
- Most of the value assumes the Azure MCP server is connected. Without it the CLI fallbacks still work, but the AppLens and detector paths that the guides prefer first are gone.
- KQL queries assume Application Insights or a Log Analytics workspace with diagnostic settings already enabled. On a resource with no telemetry the log half of the flow returns nothing.
- Container Apps and Function Apps stay in the parent, so their guidance is thinner than the AKS and compute trees by design.
Should you install azure-diagnostics?
Install it if you run production workloads on App Service, Container Apps, Functions, AKS or Azure VMs and you want an agent that gathers evidence in a fixed order and refuses to name a root cause without showing its work. The symptom tables encode Azure-specific knowledge that a model gets wrong from memory, and the read-only default plus the VM pre-flight check make it safe to point at a live incident. Skip it if your Azure footprint is one web app, where the whole flow reduces to reading the log stream, and skip it if you cannot connect the Azure MCP server and are unwilling to work through CLI fallbacks. Verify any az command it suggests before running it; at this commit at least one is not real.
npx skills add https://github.com/microsoft/azure-skills --skill azure-diagnostics快问快答
Does azure-diagnostics actually diagnose, or does it just run queries?
It diagnoses, but not from the SKILL.md. The entry point contributes a five-step flow and a routing table; the diagnosis is 31 symptom-keyed tables in the routed reference files at commit 968f7bf (November 14, 2026), counting only those that carry a cause column and a fix column, which map an observed string such as exit code 137 or ImagePullBackOff to a cause and a fix. The mechanism is lookup rather than inference, and one guardrail requires the agent to quote the evidence before it states a root cause.
Will azure-diagnostics change my Azure resources?
Not by default. The AKS and VM guides set read-only diagnostics as the default and forbid restarting or deleting resources without an explicit request for remediation; the AKS guide adds cordon, drain, scale, upgrade and reconfigure, and the VM guide adds redeploy and deallocate. The messaging guide states no guardrail. Four VM commands that go through the agent or extensions are additionally gated behind a pre-flight check on power state, provisioning state, VM agent status and extension state, with any unsafe value stopping the run.
Do I need the Azure MCP server for it to work?
No, but you lose the paths the guides reach for first. AppLens diagnostics, the App Service detector run and the Resource Health lookup are all MCP calls, and each guide documents an az CLI fallback for when MCP cannot perform the read. With CLI only you still get every symptom table and every bundled collector script.
azure-diagnostics 包含哪些文件?
展开查看原始英文技能文件(共 54 个文件)
正在加载 SKILL.md…
指南
- Azure Skills for Claude Code: The Complete Guide to microsoft/azure-skills
microsoft/azure-skills is Microsoft's official repo of 27 Azure skills for Claude Code, covering deploy, AKS, diagnostics, compliance, cost, and Azure AI Foundry. Combined they have 9,775,059 installs, with microsoft-foundry alone at 797,832 installs (skills.sh registry, December 1, 2026). This guide maps every skill to the Azure job it does.
与 azure-diagnostics 相关的技能有哪些?
Azure Diagnostics 技能常见问题
Azure Diagnostics 技能 适合哪些用户?
在 Azure 上运维应用、需要一套结构化方法快速定位 App Service、Container Apps、Functions、AKS、VM 或消息服务故障根因的开发者。 以下情况建议跳过:部署或初始化 Azure 应用——这些职责归属其他 Azure 技能,本技能只负责故障诊断。
什么时候应该使用 azure-diagnostics?
当用户需要排查 Azure 生产故障(如 503 报错、CPU 飙升、容器崩溃循环、VM RDP 失败或 Service Bus 锁异常)时调用。
azure-diagnostics 覆盖哪些 Azure 服务?
覆盖 Container Apps、App Service、Function Apps、AKS、VM 连通性(RDP 与 SSH),以及 Event Hubs / Service Bus 消息 SDK 故障。
它的标准诊断顺序是什么?
依次为:识别症状 -> 检查资源健康状态 -> 审阅日志 -> 分析指标 -> 排查近期变更。
没有线上 Azure 访问权限也能用吗?
可以。只要你声明仅做证据分析或禁止实时访问,它会完全基于你提供的日志、指标与时间线完成诊断。
Azure Diagnostics 安装安全吗?
skills.sh 审计显示已通过 3 项安全扫描中的 2 项。在生产环境安装前,请先查阅本页的安全审计面板。
添加 azure-diagnostics 徽章
向开发者展示此技能已收录于 Skillselion,可将以下代码粘贴至 README。