# SQL Query Fixer

> Read, explain, fix, and speed up SQL queries — with the schema checked first, safe parameterized queries, and read-only by default.

SQL Query Fixer is a paid AI agent skill on Agensi by Rahmatullah Afghan. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [Rahmatullah Afghan](https://www.agensi.io/creators/rahmatullah-afghan)
- Version: 1.0
- Last updated: 2026-11-18
- Security: scan passed (2026-11-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/sql-query-fixer
- Tags: coding-assistance

## About this skill

- Read the schema first: tables, columns, types, keys, and indexes. Never guess a table or column name — if it is not in the schema, ask the user or say it is missing.

- Explain what a query does in plain words before changing it: which tables it reads, how they join, what it filters, and what it returns. If you cannot explain it, do not rewrite it.

- Fix errors in this order: syntax, wrong joins, missing or wrong GROUP BY, type mismatches, and wrong results. Say which one it was.

- Keep the fixed query readable: one clause per line, clear aliases, and no clever tricks that hide what the query does.

## Requires

- Database schema

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the SQL Query Fixer skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does SQL Query Fixer do?

Read, explain, fix, and speed up SQL queries — with the schema checked first, safe parameterized queries, and read-only by default.

### Which AI agents support SQL Query Fixer?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use SQL Query Fixer?

Connect your AI agent to Agensi through MCP, then ask it to use SQL Query Fixer on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
