Skip to content

Add brendangregg-use-tsa skill - #1467

Open
Daniyal (thecsdoctor) wants to merge 1 commit into
ComposioHQ:masterfrom
thecsdoctor:add-brendangregg-use-tsa
Open

Add brendangregg-use-tsa skill#1467
Daniyal (thecsdoctor) wants to merge 1 commit into
ComposioHQ:masterfrom
thecsdoctor:add-brendangregg-use-tsa

Conversation

@thecsdoctor

@thecsdoctor Daniyal (thecsdoctor) commented Jul 28, 2026

Copy link
Copy Markdown

What problem it solves

AI agents debugging performance issues typically improvise: they run whichever three commands they happen to know (the "streetlight anti-method") or change settings until the symptom stops. This skill gives Claude a fixed, evidence-first procedure for system performance troubleshooting and root-cause analysis: problem statement → 60-second triage → USE sweep (Utilization, Saturation, Errors for every resource) → TSA breakdown (thread time across Executing/Runnable/Paging/Sleeping/Lock/Idle) → drill-down with off-CPU analysis and flame graphs → verified fix → structured report.

The skill itself (SKILL.md, per-resource Linux checklists, thread-state instructions, methodology toolbox, and triage/RCA/postmortem report templates) lives at https://github.com/thecsdoctor/brendangregg-use-tsa-skill — this PR adds the README link, per the repo's external-link convention.

Who uses this workflow

Developers, SREs, and anyone who has ever typed "this server is slow, figure out why" into an agent and gotten guesswork back. It also produces the incident artifacts teams actually need: triage notes, RCA reports with falsifiable hypotheses, and blameless postmortems with command-to-output evidence tables.

Attribution / inspiration

Inspired by Brendan Gregg's published methodologies — the USE Method, the TSA Method, Off-CPU Analysis, and "Thinking Methodically about Performance" (ACM Queue 2012 / CACM 2013), as well as Systems Performance: Enterprise and the Cloud.

Example of how it's used

User: "Checkout latency is 20x normal since this morning. Figure out why."

Claude works the phases instead of guessing: quantifies the regression (p99 95ms → 1.9s after a 14:02 deploy), exonerates host CPU/memory/disk/network in the 60s sweep with the actual numbers, then TSA shows 61% of thread time in Runnable on a half-idle host — the signature of a resource-control limit. Evidence: cpu.max = 1.5 CPUs with nr_throttled climbing 54k/min → cgroup CPU throttling after a replica increase. Fix applied and verified with the same instruments (nr_throttled 0/s for 72h, p99 back to 110ms). The report includes the dead ends that were ruled out, not just the cause.

Checklist

  • Real use case (performance incident triage + postmortem writing), not hypothetical
  • Searched existing skills — no USE/TSA or performance-RCA skill present
  • README-only change: one bullet, external link to the skill repo, alphabetically placed in Development & Code Tools, no blocked keywords (updated after CI feedback on the initial version)
  • Skill is documented, example-driven, and safe by design: read-only diagnostics first, explicit confirmation before any fix

@thecsdoctor

Copy link
Copy Markdown
Author

Prathit (@Prat011) please review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant