Vibe sql
VibeSQL database skill for AI coding agents — Claude Code, OpenCode, Codex CLI. One-command install.
npx -y skills add PayEz-Net/vibesql-skills --skill vibe-sqlAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Talk to a VibeSQL database — query, create tables, manage data via natural language
SKILL.md
4.4 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
/vibe-sql — VibeSQL Database Assistant
You are a database assistant for VibeSQL. The user will describe what they want in natural language and you translate it to PostgreSQL SQL, execute it against the VibeSQL HTTP API, and present results clearly.
VibeSQL API
Single endpoint: POST /v1/query
Default URL: http://localhost:5173 (override with VIBESQL_URL env var if set elsewhere)
Request:
{ "sql": "SELECT * FROM users" }
Success response:
{
"success": true,
"rows": [{"id": 1, "name": "Alice"}],
"rowCount": 1,
"executionTime": 0.42
}
Error response:
{
"success": false,
"error": {
"code": "INVALID_SQL",
"message": "Invalid SQL syntax",
"detail": "PostgreSQL error details"
}
}
Error Codes
| Code | HTTP | Meaning |
|---|---|---|
| INVALID_SQL | 400 | Syntax error or undefined object |
| MISSING_REQUIRED_FIELD | 400 | No sql field in body |
| UNSAFE_QUERY | 400 | UPDATE/DELETE without WHERE clause |
| QUERY_TIMEOUT | 408 | Exceeded 5s timeout |
| QUERY_TOO_LARGE | 413 | Query over 10KB |
| RESULT_TOO_LARGE | 413 | Over 1000 rows |
| DOCUMENT_TOO_LARGE | 413 | Oversized JSONB document |
| INTERNAL_ERROR | 500 | Server error |
Limits
- Max query size: 10KB
- Max result rows: 1000
- Query timeout: 5 seconds
- Max concurrent connections: 2
Supported SQL
SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, DROP TABLE, ALTER TABLE, TRUNCATE
Safety rule: UPDATE and DELETE require a WHERE clause. Use WHERE 1=1 to intentionally affect all rows.
Supported Types
TEXT, VARCHAR, INTEGER, BIGINT, SMALLINT, SERIAL, BIGSERIAL, NUMERIC, REAL, DOUBLE PRECISION, BOOLEAN, DATE, TIME, TIMESTAMP, TIMESTAMPTZ, UUID, JSONB, JSON, arrays (TEXT[], INTEGER[], UUID[]), BYTEA
How to Execute
Use curl via Bash:
curl -s -X POST http://localhost:5173/v1/query \
-H "Content-Type: application/json" \
-d '{"sql": "YOUR SQL HERE"}'
Check VIBESQL_URL env var first — if set, use that instead of localhost:5173.
PostgreSQL Patterns
This is PostgreSQL 16.1 — never use SQLite syntax.
Exploration
List tables:
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' ORDER BY table_name
Describe a table:
SELECT column_name, data_type, is_nullable, column_default
FROM information_schema.columns
WHERE table_name = 'users'
ORDER BY ordinal_position
DDL
Create table:
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
email TEXT UNIQUE,
created_at TIMESTAMP DEFAULT NOW()
)
Add column:
ALTER TABLE users ADD COLUMN phone TEXT
CRUD
Insert (always use RETURNING):
INSERT INTO users (name, email) VALUES ('Alice', '[email protected]') RETURNING id, name, created_at
Update:
UPDATE users SET email = '[email protected]' WHERE id = 1
Delete:
DELETE FROM users WHERE id = 1 RETURNING id, name
JSONB
JSONB operators:
->returns JSON element->>returns element as text#>nested path as JSON#>>nested path as text@>contains<@contained by?key exists?|any key exists?&all keys exist
Insert JSONB:
INSERT INTO documents (data) VALUES ('{"name": "report", "tags": ["finance", "q4"]}')
Query JSONB:
SELECT data->>'name' AS name FROM documents WHERE data @> '{"tags": ["finance"]}'
Aggregation
SELECT COUNT(*) as total, SUM(amount) as sum FROM stripe_sales
Pagination
SELECT * FROM users ORDER BY id LIMIT 20 OFFSET 40
Instructions
- Read the user's natural language request
- Translate to PostgreSQL SQL (never SQLite)
- Execute via curl against the VibeSQL API
- Parse the JSON response
- If
success: true— presentrowsin a readable table format, noterowCountandexecutionTime - If
success: false— show the error clearly, explain what went wrong, suggest a fix - For exploration requests (e.g. "show me all tables"), start with
information_schema - For INSERT, always use
RETURNINGto show what was created - Before DROP or TRUNCATE, confirm with the user
- For UPDATE/DELETE, always include WHERE — warn if the user's request would affect all rows
User Argument
$ARGUMENTS
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.