analyze-slow-queries

analyze-slow-queries is a skill for Claude Code, Codex from last9/last9-mcp-server. It costs 24 tokens per session (330 once invoked), scanned A, original, Apache-2.0.

A database troubleshooting workflow that ranks slow queries and checks whether the database server is under pressure. A query is a request for data from a database.

In plain words
What is it for?
It helps find the slowest query patterns and report whether each problem is caused mainly by the query or by server resources.
Why use it?
It separates inefficient query structures from problems such as too many connections, limited memory, or slow disks, so you can investigate the right cause.

Skill for Claude CodeCodex

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

Good fit It helps find the slowest query patterns and report whether each problem is caused mainly by the query or by server resources.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/last9/last9-mcp-server/analyze-slow-queries
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 last9/last9-mcp-server --skill analyze-slow-queries
Clone the repo
git clone --depth 1 https://github.com/last9/last9-mcp-server

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 analyze-slow-queries

README.md
[![agentmods](https://agentmods.dev/badge/skills/last9/last9-mcp-server/analyze-slow-queries/github.svg)](https://agentmods.dev/skills/last9/last9-mcp-server/analyze-slow-queries)
Your own site
<a href="https://agentmods.dev/skills/last9/last9-mcp-server/analyze-slow-queries"><img src="https://agentmods.dev/badge/skills/last9/last9-mcp-server/analyze-slow-queries/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 analyze-slow-queries

Your own site · 80×15
<a href="https://agentmods.dev/skills/last9/last9-mcp-server/analyze-slow-queries"><img src="https://agentmods.dev/badge/skills/last9/last9-mcp-server/analyze-slow-queries.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 330 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.
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.00024 $0.00330
Opus 5.5 $0.00010 $0.00132
Sonnet 5.5 $0.00005 $0.00066
Haiku 4.5 $0.00002 $0.00033

Measured today against content hash 4b1e80dc0d47, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

analyze-slow-queries 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 today.

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.

plugins/amp/last9/references/skills/analyze-slow-queries/SKILL.md · 22 lines

What it actually says

Workflow: analyze slow database queries on <db_system> (host ) over .

Steps:

  1. Call get_database_slow_queries (db_system=<db_system>, host=) over to rank the slowest queries.
  2. Call get_database_server_metrics (db_system=<db_system>) over to check whether server-side pressure (connections, memory, disk) explains the slowness.

Report the slowest query pattern and whether it is query-shape-bound or server-resource-bound. Map to each tool's lookback minutes or absolute range.

Additional rendered branches: Workflow: analyze slow database queries (host ) over .

  1. Call get_database_slow_queries (no db_system filter, so it surveys all database systems, host=) over to rank the slowest queries.
  2. From step 1, pick the database system behind the slowest queries, then call get_database_server_metrics (db_system = the system identified in step 1) over to check whether server-side pressure (connections, memory, disk) explains the slowness. Workflow: analyze slow database queries on <db_system> over .
  3. Call get_database_slow_queries (db_system=<db_system>) over to rank the slowest queries.
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. today Changed · +7 lines 4b1e80dc0d47
  2. yesterday First seen · 15 lines · 24 tokens per session scan A c4ec25ad713b

Subscribe to this mod's changes

analyze-slow-queries is a skill published in the GitHub repository last9/last9-mcp-server (62 stars, last pushed today), licensed Apache-2.0. It adds 24 tokens to every session and 330 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-12-05.

Related

analyze-slow-queries compared with skills from other repositories

analyze-slow-queries next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
analyze-slow-querieslast9/last9-mcp-serverSkill62todayApache-2.0A24Claude Code, Codex
observability-phoenixdavila7/claude-code-templatesSkill35ktodayMITA47Claude Code, Codex
sql-optimization-patternswshobson/agentsSkill43k3d agoMITA44Claude Code
langsmith-observabilitysynthetic-sciences/openscienceSkill4.5kyesterdayApache-2.0A45Claude Code, Codex
mongodb-query-optimizerfcakyon/claude-codex-settingsSkill1.2ktodayApache-2.0A98Claude Code
solr-querygriddynamics/rosettaSkill384todayApache-2.0A27Claude Code, Codex
qdrant-advisorqdrant/skillsSkill271yesterdayApache-2.0A216Claude Code