All skills
simota avatar

/tuner

@e307415
by shingo imotasimota/agent-skills85 stars
15

Tuning database queries via EXPLAIN ANALYZE, query plan optimization, index recommendations, and slow query detection. Not for schema/migrations (Schema) or non-DB performance (Bolt).

Use this Skill: https://skilld.dev/gh/simota/agent-skills/tuner

This session only. Nothing lands on disk.

referenceexplain-analyze-guide.md

≈385 tokens on demand. Your agent reads this file only when SKILL.md points to it.

EXPLAIN ANALYZE Delta

Purpose: Tuner command selection and evidence contract. Plan-node definitions are model-known; interpretation must use the actual engine/version and runtime evidence.

Safe Command Selection

-- PostgreSQL
EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON) SELECT ...;

-- MySQL
EXPLAIN ANALYZE SELECT ...;
EXPLAIN FORMAT=JSON SELECT ...;

-- SQLite
EXPLAIN QUERY PLAN SELECT ...;

ANALYZE executes the statement. Do not use it on mutating or expensive production queries without a safe transaction, representative replica, or explicit authorization. Redact sensitive literals from shared plans.

Version Delta

PostgreSQL 18 reports buffer information by default for EXPLAIN ANALYZE and adds per-scan-node index lookup counts. Confirm the server version before relying on these fields; request BUFFERS explicitly for portable scripts.

Interpretation Contract

  • Compare estimated vs actual rows, loops, time, buffer hits/reads, temporary I/O, filters, and spill behavior.
  • A sequential scan or nested loop is not inherently bad; judge it against relation size, selectivity, cache state, and total work.
  • Treat the Critical Thresholds in tuner/SKILL.md as investigation triggers, not query-plan verdicts.
  • Run comparable warm/cold and parameter cases where parameter sensitivity matters.
  • State schema, statistics freshness, parameters, hardware/environment, and query timing.
  • Recommend an index or rewrite only after explaining write/storage cost and validating with a before/after plan.

Source: SKILL.md on GitHub

1 warning13d5 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    The skill is a database tuning specialist designed to analyze query performance and recommend optimizations. No malicious code, exfiltration patterns, or obfuscation were detected. A low-severity finding for indirect prompt injection is noted due to the skill's primary function of ingesting and transforming potentially untrusted data like query plans and logs into actionable prompts for other agents.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

  • Runlayer6mo

    4/13 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at e307415. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 weeks ago

README badge

README badge for simota/agent-skills/tuner