performance-investigation

performance-investigation is a skill for Claude Code, Codex from microsoft/sre-agent. It costs 84 tokens per session (1,986 once invoked), scanned A, original, MIT.

An incident guide for investigating degraded Zava Learning services, such as failed APIs, slow quizzes, missing service instances, and failed reporting jobs. It uses application logs and service health information to find the cause.

In plain words
What is it for?
Use it to investigate API errors, slow quiz launches, unhealthy or inactive Container App revisions, and reporting-worker batch failures. It also helps identify configuration changes and scale settings that need correction.
Why use it?
It gives a clear order for checking whether the network, application, service instances, or recent configuration changes caused the incident. This helps avoid blaming the wrong layer and missing inactive or zero-instance services.

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/microsoft/sre-agent/performance-investigation
Any agent
npx skills add microsoft/sre-agent --skill performance-investigation
Clone the repo
git clone --depth 1 https://github.com/microsoft/sre-agent

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 performance-investigation

README.md
[![agentmods](https://agentmods.dev/badge/skills/microsoft/sre-agent/performance-investigation.svg)](https://agentmods.dev/skills/microsoft/sre-agent/performance-investigation)
Your own site
<a href="https://agentmods.dev/skills/microsoft/sre-agent/performance-investigation"><img src="https://agentmods.dev/badge/skills/microsoft/sre-agent/performance-investigation.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,986 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00084 $0.01986
Opus 5 $0.00042 $0.00993
Sonnet 5 $0.00017 $0.00397
Haiku 4.5 $0.00008 $0.00199

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

Security

Grade A, and why

performance-investigation scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

error in the response `detail` field (it is NOT written to the logs): `curl` the lane's `/health`
labs/zava-learning/sre-config/agent-config/skills/performance-investigation/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Zava Learning — Application Incident Runbook

Resource Group: @@RG@@. Services (Container Apps): learner-portal, course-api, assessment-api. Quiz launch path: portal -> assessment-api -> course-api.

Confirm the network/edge is healthy first (App Gateway backend healthy, NSG clean) so you don't misattribute an app fault. Then:

  1. Query App Insights failures/exceptions filtered by the failing cloud_RoleName.
  2. Check Container App revision health and replica counts — an API with zero replicas serves no requests and surfaces as quiz launch / 502 failures with a clean network path. A revision can hit zero replicas two ways: scaled to zero, OR the active revision was deactivated (an inactive revision runs zero replicas). az containerapp revision list shows only ACTIVE revisions, so a deactivated lane looks like it has "no revisions" — list with --all and inspect properties.active / properties.latestRevisionName. The latent cause is often a scale floor of zero in IaC (appLaneMinReplicas: 0); the durable fix restores a non-zero minimum.
  3. Inspect recent revisions/config changes.
  4. For LATENCY regressions (slow quiz responses / the latency alert) on a clean network path: pull assessment-api request durations from Log Analytics console logs (each request logs ms=<duration>), find the step-change in latency and align it to the most recent assessment-api revision/image deployment, then inspect src/assessment-api/server.js for expensive synchronous work added on the request path (e.g. a synchronous KDF/crypto call). This is a code regression — mitigate live by rolling back to the prior revision, then fix durably with a code PR.

Reporting-worker grade-export failures

If the symptom is the nightly grade-export job failing (no quiz/portal impact — this is a back-office batch job on a dedicated VM vm-zava-reporting-*):

  1. Query Log Analytics Syslog for ProcessName == "zava-export" — the worker logs a heartbeat on success and a FAILED line plus the raw OS error (export write error: ...) on failure. Read the raw error to identify the failure mode.
  2. Correlate with disk telemetry: the Perf table carries Logical Disk % Used Space and Free Megabytes for the worker. A data volume (/data) at ~100% used / near-zero free is the signal that the export writes are failing for lack of space.
  3. Confirm on the VM with a read command (az vm run-command invoke ... --scripts "df -h /data").
  4. Mitigate live: free space on the worker's data disk (remove the accumulated backlog file under /data/exports) via az vm run-command. Re-check that the next export run logs a success heartbeat.
  5. Durable fix: the worker's export retention/rotation lives in src/reporting-worker/cloud-init.yaml — a PR that enforces retention (or grows the data disk in infra/modules/vm.bicep) is the lasting fix.

Read the full file on GitHub · 111 lines

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 · 111 lines · 84 tokens per session scan A 2d482efaadfd

Subscribe to this mod's changes

performance-investigation is a skill published in the GitHub repository microsoft/sre-agent (149 stars, last pushed 10d ago), licensed MIT. It adds 84 tokens to every session and 1,986 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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