workload-analysis

workload-analysis is a skill for Claude Code, Codex from DeepSQLAI/deepsql. It costs 31 tokens per session (684 once invoked), scanned A, original, Apache-2.0.

A database workload analysis skill that examines slow queries, performance changes, customer load, and table growth across a database.

In plain words
What is it for?
Use it to find slow-query hotspots, detect regressions, identify customers causing heavy load, and track growing tables.
Why use it?
It helps explain what is driving database load and whether performance problems are isolated, growing, or getting worse.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to find slow-query hotspots, detect regressions, identify customers causing heavy load, and track growing tables.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/deepsqlai/deepsql/workload-analysis
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.

Any agent
npx skills add DeepSQLAI/deepsql --skill workload-analysis
Clone the repo
git clone --depth 1 https://github.com/DeepSQLAI/deepsql

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 workload-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/deepsqlai/deepsql/workload-analysis/github.svg)](https://agentmods.dev/skills/deepsqlai/deepsql/workload-analysis)
Your own site
<a href="https://agentmods.dev/skills/deepsqlai/deepsql/workload-analysis"><img src="https://agentmods.dev/badge/skills/deepsqlai/deepsql/workload-analysis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for workload-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/deepsqlai/deepsql/workload-analysis"><img src="https://agentmods.dev/badge/skills/deepsqlai/deepsql/workload-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 684 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00031 $0.00684
Opus 5.5 $0.00012 $0.00274
Sonnet 5.5 $0.00006 $0.00137
Haiku 4.5 $0.00003 $0.00068

Measured 3mo ago against content hash eafbe05f9fe7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

workload-analysis scanned grade A with 0 findings 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 3mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agent/skills/workload-analysis/SKILL.md · 37 lines

How it starts

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

Workload Analysis

Use for whole-workload questions: "what's slow right now?", "what regressed this week?", "which customer is driving load?", "what's growing fast?" For a single named query, use slow-query-optimize.

Procedure

  1. Resolve the connection (list_connections → UUID).

  2. Find the hotspots. get_slow_query_insights(connectionId, kind="all", window=…) returns pre-computed AI insights grouped as hotspots (most total DB time), remediation (actionable fixes), tail-risk (p95/max outliers), plan-drift (plan changed), skew (one tenant overloaded). analyze_slow_queries and list_tracked_queries give the raw fingerprint list with call counts and mean/max times.

  3. Catch regressions. get_query_regressions(connectionId) ranks queries that got slower on the latest analysis run by slowdown factor. Drill into one with get_slow_query_timeline(queryId) to see the day-by-day trend.

  4. Attribute load. get_slow_query_customers(connectionId) ranks tenants/customers by total slow-query time (with resolved customer name when configured) — answers "who is driving the load?"

  5. Watch growth. get_table_growth(connectionId) for size/row-count trends; get_growth_anomalies(connectionId) for tables growing abnormally. These predict the next performance cliff before it hits.

  6. Synthesize, then route. Lead with the few things that matter most (biggest total-time consumer, worst regression, fastest-growing table). For each, hand off to the right next step: a specific slow query → slow-query-optimize; an indexing opportunity → index-advisor.

Guardrails

  • Rank by total impact (calls × mean_exec_time), not by single-execution worst case — a 5-second query run twice a day matters less than a 200ms query run a million times.
  • Start with compact persisted analytics (get_latest_slow_query_analysis, get_slow_query_insights, list_tracked_queries). If a persisted payload is too large/truncated to inspect cleanly, pivot to the compact endpoints rather than trying to parse the oversized blob.
  • Use analyze_slow_queries when you need a fresh top-N snapshot for the last 24 hours; say explicitly that this triggers fresh analysis work, unlike the persisted analytics endpoints.
  • Everything here is read-only and analytics-store backed unless you intentionally call analyze_slow_queries for a fresh collection. Say so if the user worries about adding load.
  • get_query_samples exposes literal bind values — treat the output as potentially sensitive data.

Read the full file on GitHub · 37 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. 3mo ago First seen · 37 lines · 31 tokens per session scan A eafbe05f9fe7

Subscribe to this mod's changes

workload-analysis is a skill published in the GitHub repository DeepSQLAI/deepsql (41 stars, last pushed 5d ago), licensed Apache-2.0. It adds 31 tokens to every session and 684 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

workload-analysis compared with skills from other repositories

workload-analysis next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
workload-analysisDeepSQLAI/deepsqlSkill415d agoApache-2.0A31Claude Code, Codex
sql-expertpersonamanagmentlayer/pclSkill461mo agoApache-2.0A66Claude Code
datasetsAryan-Jhaveri/mcp-statcanSkill823d agoMITA67Claude Code, Codex
graphjin-evaldosco/graphjinSkill3.2kyesterdayApache-2.0A27Claude Code, Codex
planetscaleericrisco/rsc-harnessSkill6825d agoMITA87Claude Code, Codex
output-dev-credentialsgrowthxai/outputSkill4454d agoApache-2.0A36Claude Code
changebibinprathap/VeritasGraphSkill327yesterdayMITA27Claude Code