来源信息
- 仓库
- lxgicstudios/ai-sql
- 最近来源活动
- 2026年8月21日 07:06
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 2
- 分支
- 0
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- sql-gen
- description
- Generate SQL queries from natural language
# SQL Generator
Describe what you want, get the SQL. Works with any database.
## Quick Start
```bash
npx ai-sql "get all users who signed up this month and made a purchase"
```
## What It Does
- Converts English to SQL
- Handles complex JOINs
- Adds proper WHERE clauses
- Optimizes for performance
## Usage Examples
```bash
# Generate query
npx ai-sql "top 10 products by revenue last quarter"
# With schema context
npx ai-sql "users without orders" --schema ./schema.sql
# Specific dialect
npx ai-sql "monthly active users" --dialect postgres
```
## Dialects Supported
- PostgreSQL
- MySQL
- SQLite
- SQL Server
- Oracle
## Output Example
```sql
SELECT u.id, u.email, COUNT(o.id) as order_count
FROM users u
LEFT JOIN orders o ON u.id = o.user_id
WHERE u.created_at >= DATE_TRUNC('month', CURRENT_DATE)
GROUP BY u.id, u.email
HAVING COUNT(o.id) > 0;
```
## Requirements
Node.js 18+. OPENAI_API_KEY required.
## License
MIT. Free forever.
---
**Built by LXGIC Studios**
- GitHub: [github.com/lxgicstudios/ai-sql](https://github.com/lxgicstudios/ai-sql)
- Twitter: [@lxgicstudios](https://x.com/lxgicstudios)
在 GitHub 查看