一键导入
sql-query-helper
Generates, explains, optimizes, and migrates SQL queries across multiple database dialects
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generates, explains, optimizes, and migrates SQL queries across multiple database dialects
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyzes project structure, module dependencies, imports, and entry points to generate architecture diagrams in Mermaid format
Analyzes ETL and data pipeline code for optimization opportunities across Python (Pandas, PySpark), Rust (polars, datafusion), SQL, and general pipeline descriptions
Validates environment variable configurations and config files (YAML, TOML, JSON, .env) for missing required variables, type mismatches, deprecated keys, naming convention violations, secret exposure risks, and invalid value ranges
Analyzes code for performance bottlenecks including N+1 queries, O(n^2) or worse algorithms, unnecessary allocations, sync I/O in async contexts, excessive cloning, missing caching opportunities, and large payload transfers. Supports Rust, Python, TypeScript, and Go.
Analyzes, improves, and restructures LLM prompts for clarity, efficiency, and reliability
Analyzes source code for common security vulnerabilities including SQL injection, XSS, command injection, hardcoded secrets, insecure deserialization, path traversal, and SSRF
| name | sql-query-helper |
| description | Generates, explains, optimizes, and migrates SQL queries across multiple database dialects |
| version | 1.0.0 |
| author | go-on-team |
| tags | ["sql","database","query","postgres","mysql","sqlite","migration"] |
| min_go_on_version | 1.0.0 |
Assists with all SQL-related tasks: writing queries from natural language, explaining what existing queries do, optimizing slow queries, generating schema migrations, and translating between database dialects (PostgreSQL, MySQL, SQLite, BigQuery, Snowflake).
| Parameter | Type | Description |
|---|---|---|
description | string | Natural-language description of what the query should do |
sql | string | Optional: existing SQL to explain/optimize instead of generating new |
dialect | string | Target SQL dialect: postgres, mysql, sqlite, bigquery, snowflake (default: postgres) |
schema | string | Optional: table schema context for accurate generation |
action | string | Action: generate, explain, optimize, translate (default: generate) |
target_dialect | string | Required when action=translate: destination dialect |
{
"description": "Find the top 10 customers by total order value in the last 30 days, including their email and order count",
"dialect": "postgres",
"action": "generate",
"schema": "customers(id, email, name, created_at)\norders(id, customer_id, total, ordered_at)"
}
Example output:
-- Generated for PostgreSQL
-- Estimated complexity: Index Scan (efficient with proper indexes)
SELECT
c.email,
c.name,
COUNT(o.id) AS order_count,
SUM(o.total) AS total_spent
FROM customers c
JOIN orders o ON o.customer_id = c.id
WHERE o.ordered_at >= NOW() - INTERVAL '30 days'
GROUP BY c.id, c.email, c.name
ORDER BY total_spent DESC
LIMIT 10;
-- Recommended indexes:
-- CREATE INDEX idx_orders_customer_date ON orders(customer_id, ordered_at);