Skip to content
Back to skills

Db Query Analyzer

ASecurity

Analyze database query performance with execution plans and index recommendations

  • 1,760 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added February 8, 2026
data-aijavascriptjavabashsqldatabasebackendperformance

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add a5c-ai/babysitter --skill db-query-analyzer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Db Query Analyzer?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Db Query Analyzer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/a5c-ai-db-query-analyzer/badge)](https://www.skillsdirectory.com/skills/a5c-ai-db-query-analyzer)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: db-query-analyzer
description: Analyze database query performance with execution plans and index recommendations
allowed-tools:
  - Bash
  - Read
  - Write
  - Glob
graph:
  domains: [domain:software-engineering]
  specializations: [specialization:software-architecture]
  skillAreas: [skill-area:backend-data-persistence, skill-area:postgres-tuning]
  roles: [role:backend-engineer, role:architect]
  workflows: [workflow:technical-debt-reduction]
  topics: [topic:technical-debt]

---

# Database Query Analyzer Skill

## Overview

Analyzes database query performance including execution plan analysis, index recommendations, slow query identification, and optimization suggestions.

## Capabilities

- Query execution plan analysis
- Index recommendation
- Slow query identification
- Query optimization suggestions
- Table scan detection
- Join optimization analysis
- Support for PostgreSQL, MySQL, SQL Server

## Target Processes

- performance-optimization
- data-architecture-design

## Input Schema

```json
{
  "type": "object",
  "required": ["queries"],
  "properties": {
    "queries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "sql": { "type": "string" },
          "name": { "type": "string" }
        }
      }
    },
    "database": {
      "type": "string",
      "enum": ["postgresql", "mysql", "sqlserver", "oracle"],
      "default": "postgresql"
    },
    "connectionString": {
      "type": "string",
      "description": "Database connection string (optional, for live analysis)"
    },
    "options": {
      "type": "object",
      "properties": {
        "analyzeExplain": {
          "type": "boolean",
          "default": true
        },
        "suggestIndexes": {
          "type": "boolean",
          "default": true
        },
        "slowQueryThreshold": {
          "type": "number",
          "default": 1000,
          "description": "Slow query threshold in milliseconds"
        }
      }
    }
  }
}
```

## Output Schema

```json
{
  "type": "object",
  "properties": {
    "analyses": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "query": { "type": "string" },
          "executionPlan": { "type": "object" },
          "estimatedCost": { "type": "number" },
          "issues": { "type": "array" },
          "suggestions": { "type": "array" }
        }
      }
    },
    "indexRecommendations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "table": { "type": "string" },
          "columns": { "type": "array" },
          "type": { "type": "string" },
          "reason": { "type": "string" }
        }
      }
    },
    "slowQueries": {
      "type": "array"
    }
  }
}
```

## Usage Example

```javascript
{
  kind: 'skill',
  skill: {
    name: 'db-query-analyzer',
    context: {
      queries: [
        { sql: 'SELECT * FROM users WHERE email = ?', name: 'get-user-by-email' }
      ],
      database: 'postgresql',
      options: {
        analyzeExplain: true,
        suggestIndexes: true
      }
    }
  }
}
```

Files in this skill

  • README.md386 B
  • SKILL.md2.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…