optimize-cpu-workloads — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited optimize-cpu-workloads (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
The MCP fetches the data — hot traces, flamegraphs, host metrics, top functions, top entities; you analyze: name the hot stacks, identify the pattern, recommend and apply the fix.
For CPU-only deployments. This skill stays entirely on the CPU side — no GPU view, no GPU metrics, no inference-server (vLLM/SGLang/Triton) framing. A CPU-only customer never needs any of that. Running GPU workloads? Use optimize-gpu-workloads instead — there, cross-checking the GPU and CPU sides together is the load-bearing step.
The common discipline — data-source policy, pre-flight, rank-first vs. drill-down, scope-to-own-code/ROI, the always-recommend-and-apply-the-fix rule, the output-template skeleton, severity sizing, and security — lives in shared/analysis-conventions.md. Read it. This skill adds the CPU-specific profiles and call-tree rendering on top.
Connection setup lives in configure-zymtrace-mcp; this skill assumes the MCP is connected.
"What's is consuming the most CPU coreover the last 1 hour?" · "Which of my apps should I optimize first?"
Most CPU requests are rank-first (see the shared doc): the user wants to know which thing is hottest or where the best return is. Start by ranking with the MCP's topentities (hottest container/pod/host/process) or topfunctions (hottest functions), then drill into the top user-owned code with hot_traces. The recap leads with the ranking, then the analysis of that entry. If the user already named a workload ("analyze my API service"), skip the ranking and drill straight in.
Default to the last 1 hour if no range is given, and the whole cluster if no workload is named (ask which to narrow if results look noisy).
The MCP pulls the data; you do the analysis. Establish a data path first (pre-flight, in the shared doc).
hot_traces. Rank by cores consumed (CPU-cores, i.e. the absolute on-CPU time the entity holds — not just % of one core), so the ranking reflects real machine cost. Present it as a table (see Ranking table) — one row per consumer with cores over the window, annualized core-hours (cores × 8,760), and annualized cost only; host / container / deployment go in a reference line below the table, not as columns. Then pick the top entry. Mark third-party / unmodifiable system processes (kube-proxy, kubelet, systemd, the kernel) with ❌ and drill into the highest user-owned entry. See scope-to-own-code/ROI in the shared doc.Escalation check (when you arrived here by the entity-only default). If the metrics show real GPU activity (non-trivial GPU utilization / memory), this is a GPU workload, not a CPU-only one — stop and hand off to optimize-gpu-workloads for the GPU↔CPU cross-view. Don't analyze a GPU workload from the CPU side alone. (Skip this when the user explicitly asked a CPU question, or the deployment has no GPUs.)
futex, pthread_mutex_lock, sync.(*Mutex).Lock, runtime scheduler frames.malloc/free, gc, mark, tcmalloc, allocator frames dominating; on a Java service hand off to optimize-memory-allocation to name the allocation sites (JVM only).read/write/epoll_wait/send/recv; the CPU is shuffling bytes or waiting.A "cores consumed" figure is an average rate — N vCPUs held continuously over the window — so it annualizes directly. Always turn cores into money; percentages don't move budgets.
zymtrace-vcpu-rate line in AGENTS.md, or CLAUDE.md for Claude Code). If none, default to $0.04 / vCPU-hour (≈ $350 / core-year), label it an assumption in the recap, and ask the user for their real rate. When they give one, offer to persist it — add a zymtrace-vcpu-rate: $<rate>/vCPU-hour line to that agent-instructions file (AGENTS.md for cross-agent, CLAUDE.md under Claude Code) so later analyses reuse it instead of re-asking. Only write the file on the user's yes.payments' CPU → ≈ $310/yr recovered." That dollar figure is the ROI; lead the recap's impact with it.Lead a rank-first recap with a table — one row per top consumer, hottest first. Keep the table to cores and cost only — no host/container/deployment columns. Carry both the annualized CPU-core usage and its cost:
| # | Workload | Cores (last \<window\>) | Annualized core-hrs | Annualized cost |
|---|---|---|---|---|
| 1 | payments | 2.5 | 21,900 | ≈ $770/yr |
| 2 | checkout | 1.1 | 9,636 | ≈ $340/yr |
| 3 | kube-proxy ❌ | 0.8 | 7,008 | ≈ $245/yr |
cores × 8,760 (the window rate projected to a year, if sustained).annualized core-hrs × per-vCPU-hour rate (= cores × rate × 8,760); rate per Cost: annualize the cores. State the rate (and (assumed) if it's the default) in a line under the table.zymtrace-profiler / the profiler DaemonSet) from the table — it being hot usually just signals an otherwise-idle cluster, not a target. Hard skip (note "(zymtrace profiler excluded)" if it would have ranked), not an ❌ reference row.When the CPU pattern is allocation churn / GC (step 4) — allocator and GC frames dominating on-CPU time — the on-CPU view can't name which call sites allocate. On a Java service, hand off to optimize-memory-allocation (the JVM allocation profile, weighted by bytes) to turn "GC is hot" into a named, fixable allocation site. (Non-Java workloads have no allocation profile — stay here.)
The output-template skeleton is in the shared doc. The CPU Observed Call Tree block renders like this:
**Observed Call Tree — CPU profile** (<process path / container / host / time range>)
<top-level frame> (<self % / total %>)
├── <child frame> (<%>)
│ ├── <leaf frame> (<%>)
│ └── <leaf frame> (<%>)
└── <child frame> (<%>) ← hot pathCall-tree conventions:
├── and └── for the hierarchy (matches what the MCP returns).self % / total %) as the MCP returns them; mark the dominant path with ← hot path.zymtrace-vcpu-rate (AGENTS.md/CLAUDE.md) or the user; if the default was assumed, it was labelled and the user asked for their real rate (and offered persistence).(Plus the common Done checklist in the shared doc — template, every 🔴/🟡 has a Fix:, fix applied, follow-up question.)
optimize-gpu-workloads.shared/analysis-conventions.md.</content>
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.