performance-investigation
Skill187 starsChanged 6 months agoMITView on GitHub
Use for Zava Learning incidents where the platform is reachable but a compute tier is degraded — elevated 5xx from the APIs, slow quiz responses, exceptions, an API with no healthy instances, or a back-office batch job failing on the reporting-worker VM (e.g. nightly grade exports). Diagnoses from Application Insights / Log Analytics / Syslog and remediates the application or worker tier.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- cormacc/dotagentstheir own version, first seen Nov 8, 2026
- REPOZY/superpowers-optimizedtheir own version, first seen Nov 8, 2026
- ericwang200608-beep/LANYANT-Skillstheir own version, first seen Nov 8, 2026
- itsofficialadi/boundifftheir own version, first seen Oct 25, 2026
- iamHrithikRaj/loomtheir own version, first seen Oct 20, 2026
- sveltejs/sveltetheir own version, first seen Oct 8, 2026
Used with
Projects with it also use security-review.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillsecurity-review
Finds exploitable application security vulnerabilities in code changes. Use for Warden security scans, appsec review, OWASP-style checks, authentication or authorization bugs, injection, XSS, SSRF, path traversal, secrets, unsafe crypto, webhook verification, open redirects, or sensitive data exposure.
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- sveltejs/svelte★ 89ksame name
- REPOZY/superpowers-optimized★ 146same name
- adamentwistle/fable-skills★ 98same name
- ericwang200608-beep/LANYANT-Skills★ 2same name
- cormacc/dotagents★ 1same name
- motao123/dev-workflow-kit★ 1same name
- gclm/super-stack★ 0same name
- iamHrithikRaj/loom★ 0same name
- itsofficialadi/boundiff★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- labs/onboardinglab/AGENTS.mdAGENTS.md
- labs/zava-aks-postgres/AGENTS.mdAGENTS.md
- labs/zava-learning/AGENTS.mdAGENTS.md
- deployment-compliance-checkSkill
- onboarding-labSkill
- azure-monitor-rcaSkill
- email-incident-followupSkill
- github-issue-followupSkill
- proactive-health-checkSkill
- ticketing-pr-validationSkill
- compliance-drift-detectionSkill
- vm-performance-diagnosticsSkill
- deploying-demoSkill
- managing-sre-agentSkill
- running-demoSkill
- connectivity-triageSkill
- cost-analysisSkill
- evidence-before-afterSkill
- nsg-auditSkill
- pagerduty-incident-updateSkill
- pr-deliverySkill
- rbac-auditSkill
- rca-analysisSkill
- recommendations-next-stepsSkill
- redaction-guardSkill
- servicenow-change-managementSkill
- zava-audit-reportSkill
- zava-reportingSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Check Container App revision health and replica counts — an API with zero replicas serves no requests and surfaces as quiz launch / 502 …
- Very specific: line 37
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 …
- Very specific: line 56
Read the quiz service's console logs (ContainerAppConsoleLogs_CL for the failing quiz-* app / assessment-api) for the request shape: a slow …
- Very specific: line 69
Slow quiz loading (query lane, db
zava_query): check the question_bank indexes — SELECT indexname FROM pg_indexes WHERE … - Very specific: line 74
Errors under load (pool lane, db
zava): check the connecting role's connection limit — SELECT rolname,rolconnlimit FROM pg_roles WHERE … - Very specific: line 101
If the root cause is in application source, the app code lives under src/ in @@REPO@@.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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:
- Query App Insights failures/exceptions filtered by the failing
cloud_RoleName. - 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 listshows only ACTIVE revisions, so a deactivated lane looks like it has "no revisions" — list with--alland inspectproperties.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. - Inspect recent revisions/config changes.
- 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 inspectsrc/assessment-api/server.jsfor 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-*):
- Query Log Analytics
SyslogforProcessName == "zava-export"— the worker logs a heartbeat on success and aFAILEDline plus the raw OS error (export write error: ...) on failure. Read the raw error to identify the failure mode. - Correlate with disk telemetry: the
Perftable carries Logical Disk% Used SpaceandFree Megabytesfor 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. - Confirm on the VM with a read command (
az vm run-command invoke ... --scripts "df -h /data"). - Mitigate live: free space on the worker's data disk (remove the accumulated backlog file under
/data/exports) viaaz vm run-command. Re-check that the next export run logs a success heartbeat. - 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 ininfra/modules/vm.bicep) is the lasting fix.
Database-backed quiz lanes (slow loading / errors under load / auth failures)
The quiz lanes read PostgreSQL on the request path, so a DB fault produces app-shaped symptoms on a
clean edge + healthy replicas. Do NOT stop at "the DB looks slow" and report root cause unknown —
identify WHICH database surface — log-first, confirm from the lane's error detail, then optionally
verify in the database:
- Read the quiz service's console logs (
ContainerAppConsoleLogs_CLfor the failingquiz-*app /assessment-api) for the request shape: a slowms=<duration>on/quiz/*→ index/latency; a burst ofstatus=500on/quiz/*(and anypool error:lines) → a backend DB failure. - Get the EXACT backend error straight from the lane — the service returns the underlying Postgres
error in the response
detailfield (it is NOT written to the logs):curlthe lane's/health(returns503 {"status":"degraded","detail":"<pg error>"}when the DB path is broken) or/quiz/<courseId>(500 {"error":"...","detail":"<pg error>"}). Thedetailnames the cause directly — e.g.password authentication failed(28P01) → bad DB secret;too many connections/remaining connection slots/ connection-limit → pool exhaustion; a slow-but-200/quizwith climbingms=→ missing index. This needs no DB credentials and is the primary confirmation. - Optionally confirm against the database itself with a read-only query (connection recipe in the
knowledge base — server/login from
az postgres flexible-server list, admin password from Key Vaultdb-password, thenaz postgres flexible-server execute --querytext "<SQL>"):- Slow quiz loading (query lane, db
zava_query): check thequestion_bankindexes —SELECT indexname FROM pg_indexes WHERE tablename='question_bank';andSELECT relname,seq_scan,idx_scan FROM pg_stat_user_tables WHERE relname='question_bank';. A missing index onquestion_bankwith seq-scans climbing is the root cause; the durable fix is to (re)build it (REINDEX/CREATE INDEX) — delivered as a PR. - Errors under load (pool lane, db
zava): check the connecting role's connection limit —SELECT rolname,rolconnlimit FROM pg_roles WHERE rolname='app_pool';and live connections inpg_stat_activity. Arolconnlimitof 1 (or far below the pool size) is the root cause; restore a sane limit (ALTER ROLE app_pool CONNECTION LIMIT <n>). - Authentication errors (secret lane): the lane's Key Vault DB secret (
db-password-secretlane) was rotated to an invalid value — confirm the auth-failure log signature; the fix is to restore a valid value INTOdb-password-secretlane(copy it from the baselinedb-passwordsecret withaz keyvault secret set) and then force the lane to re-read it by creating a NEW revision (az containerapp update --set-env-vars FORCE_ROTATE=<timestamp>). A plainaz containerapp revision restartis NOT enough — Container Apps resolve Key Vault secret references at revision-creation time, so a restart reuses the cached (still-invalid) value; only a new revision re-reads the secret. Then re-check the lane returns 200. Do NOT runaz containerapp secret set/ re-assert the secret'sidentityref(unnecessary — the reference is already correct), and do NOT repointpg-passwordto a different Key Vault secret (e.g. the shareddb-password) — that masks the fault and breaks lane isolation; only thedb-password-secretlanevalue should change.
- Slow quiz loading (query lane, db
- Mitigate live with the smallest corrective action (rebuild the index / restore the connection limit / restore the secret), re-check the lane returns 200, then deliver the durable fix as a PR. Base the RCA on the confirmed surface above — DB-internal faults must resolve to a named cause (index, connection limit, or secret), never "root cause unknown."
Permitted autonomous actions
- Restore replica counts / restart a Container Apps revision.
- Reactivate a deactivated revision (
az containerapp revision activate) to bring back zero-replica lanes. - Roll back to the last-known-good revision.
- Free space on the reporting-worker VM's data disk (remove an accumulated backlog file under
/data).
Code fix
If the root cause is in application source, the app code lives under src/ in @@REPO@@. After
the live mitigation (revision rollback/restart), the durable code fix is delivered as a GitHub PR
by the pr-delivery skill and recorded as a Change Request by servicenow-change-management.
Incident communication
PagerDuty acknowledgement, status/summary notes, and resolution are owned by the
pagerduty-incident-update skill.
Verification
Confirm /api/quiz/* returns 200 and the API success rate is back to baseline.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

