{
  "x402Version": 2,
  "id": 32978,
  "slug": "32978",
  "resource": "https://api.aiskills402.com/v1/skills/sql-query-optimizer/file",
  "description": "SQL Query Optimizer for D1, SQLite and Turso — Reviews SQL queries, schemas and migrations for SQLite, Cloudflare D1 and Turso, where the bill and the speed follow the rows a query READS, not the rows it returns. Finds full scans hidden behind LIMIT, aggregates over growing tables, index column gaps, NOT IN, OR, functions and LIKE patterns that switch an index off, OFFSET pagination, N+1 loops, the D1 limit of 100 bound parameters, tables that never shrink and new flag columns that turn the who…",
  "type": "http",
  "serviceName": "SQL Query Optimizer for D1",
  "resourceType": "Payments",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x8e37022edcf0f21cf3c9f93fee9d4d32519f36f4",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "50000",
      "amountUsd": 0.05,
      "maxTimeoutSeconds": 60
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "method": "GET",
          "type": "http"
        },
        "output": {
          "example": {
            "file": {
              "content": "<the SKILL.md file>",
              "encoding": "utf-8",
              "name": "SKILL.md"
            },
            "name": "SQL Query Optimizer for D1, SQLite and Turso",
            "ok": true,
            "receipt": {
              "settled": true,
              "tx": "0x<settlement transaction>"
            },
            "redownload": {
              "token": "<64 hex chars>",
              "url": "<api>/v1/purchases/<token>"
            },
            "sha256": "<sha256 of SKILL.md>",
            "skill": "sql-query-optimizer",
            "version": "1.0.0"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "enum": [
                  "GET",
                  "HEAD"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "agent-skill",
    "sql-query-optimizer",
    "sql",
    "query-optimization",
    "sqlite",
    "bazaar"
  ],
  "sourceHost": "api.aiskills402.com",
  "lastUpdated": "2026-10-12T20:05:02.441Z",
  "quality": {
    "calls30d": 4,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-12T20:05:02.202Z"
  },
  "metadata": {
    "serviceName": "SQL Query Optimizer for D1",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "method": "GET",
            "type": "http"
          },
          "output": {
            "example": {
              "file": {
                "content": "<the SKILL.md file>",
                "encoding": "utf-8",
                "name": "SKILL.md"
              },
              "name": "SQL Query Optimizer for D1, SQLite and Turso",
              "ok": true,
              "receipt": {
                "settled": true,
                "tx": "0x<settlement transaction>"
              },
              "redownload": {
                "token": "<64 hex chars>",
                "url": "<api>/v1/purchases/<token>"
              },
              "sha256": "<sha256 of SKILL.md>",
              "skill": "sql-query-optimizer",
              "version": "1.0.0"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "enum": [
                    "GET",
                    "HEAD"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.aiskills402.com",
    "manifest_name": "api.aiskills402.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}