원클릭으로
sql-query
Generate, explain, and optimize SQL queries. Use when user asks to write SQL, optimize a query, or explain what a query does.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generate, explain, and optimize SQL queries. Use when user asks to write SQL, optimize a query, or explain what a query does.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
本地离线 OCR 文字识别,基于 tesseract.js。当用户发图片/截图/扫描件要求提取文字时使用,支持中英文。纯本地运行,无需联网。
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
Use when implementing any feature or bugfix, before writing implementation code
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.
| name | sql-query |
| description | Generate, explain, and optimize SQL queries. Use when user asks to write SQL, optimize a query, or explain what a query does. |
| version | 1.0.0 |
| author | deskwand |
| license | MIT |
| metadata | {"tags":["SQL","Database","Queries","MySQL","PostgreSQL","SQLite"]} |
| allowed-tools | read,shell |
Write, review, and optimize SQL queries.
Before writing a query, identify:
-- ✅ Parameterized
SELECT * FROM users WHERE id = ?;
-- ❌ String interpolation (SQL injection risk)
SELECT * FROM users WHERE id = '${userId}';
EXPLAIN ANALYZE SELECT ...
-- Join with aggregation
SELECT u.name, COUNT(o.id) as order_count
FROM users u
LEFT JOIN orders o ON u.id = o.user_id
GROUP BY u.id, u.name
HAVING COUNT(o.id) > 5
ORDER BY order_count DESC;
-- Window functions
SELECT
department,
employee,
salary,
RANK() OVER (PARTITION BY department ORDER BY salary DESC) as rank
FROM employees;
-- CTE (Common Table Expression)
WITH monthly_sales AS (
SELECT DATE_TRUNC('month', created_at) as month, SUM(amount) as total
FROM orders
GROUP BY 1
)
SELECT month, total, LAG(total) OVER (ORDER BY month) as prev_month
FROM monthly_sales;
-- Upsert (PostgreSQL)
INSERT INTO users (id, email, name)
VALUES (1, 'a@b.com', 'Alice')
ON CONFLICT (id) DO UPDATE
SET email = EXCLUDED.email, name = EXCLUDED.name;
When reviewing an existing query:
SELECT * in production code.| Feature | PostgreSQL | MySQL | SQLite |
|---|---|---|---|
| String concat | || | CONCAT() | || |
| Limit + offset | LIMIT n OFFSET m | LIMIT m, n | LIMIT n OFFSET m |
| Current timestamp | NOW() | NOW() | datetime('now') |
| Boolean type | BOOLEAN | TINYINT(1) | INTEGER (0/1) |
| JSON support | JSONB | JSON | TEXT + json functions |