Query Expert
jamesrochabrun/skills
Master SQL and database queries across multiple systems. An agent skill from jamesrochabrun/skills.
A skill your agent uses when the user wants a Chen-model ER diagram from SQL CREATE TABLE statements or DBML, wants to rearrange or clean up an existing sql2er state, wants a skeleton-only overview…
$ npx skills add ystemsrx/sql_to_ER --skill sql2er -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ystemsrx/sql_to_ER sql2er --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ystemsrx/sql_to_ER.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/sql2er .claude/skills/sql2er && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "sql2er" agent skill from https://github.com/ystemsrx/sql_to_ER/tree/master/skills/sql2er into .claude/skills/sql2er/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sql2er", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ystemsrx/sql_to_ER/tree/master/skills/sql2erType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ystemsrx/sql_to_ER --skill sql2er -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ystemsrx/sql_to_ER sql2er --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ystemsrx/sql_to_ER.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/sql2er .agents/skills/sql2er && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "sql2er" agent skill from https://github.com/ystemsrx/sql_to_ER/tree/master/skills/sql2er into .agents/skills/sql2er/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sql2er", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ystemsrx/sql_to_ER --skill sql2er -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ystemsrx/sql_to_ER sql2er --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ystemsrx/sql_to_ER.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/sql2er .cursor/skills/sql2er && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "sql2er" agent skill from https://github.com/ystemsrx/sql_to_ER/tree/master/skills/sql2er into .cursor/skills/sql2er/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sql2er", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ystemsrx/sql_to_ER.git --path skills/sql2er--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ystemsrx/sql_to_ER --skill sql2er -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ystemsrx/sql_to_ER sql2er --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ystemsrx/sql_to_ER.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/sql2er .gemini/skills/sql2er && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "sql2er" agent skill from https://github.com/ystemsrx/sql_to_ER/tree/master/skills/sql2er into .gemini/skills/sql2er/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sql2er", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ystemsrx/sql_to_ER sql2erInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ystemsrx/sql_to_ER --skill sql2er -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ystemsrx/sql_to_ER.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/sql2er .github/skills/sql2er && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "sql2er" agent skill from https://github.com/ystemsrx/sql_to_ER/tree/master/skills/sql2er into .github/skills/sql2er/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sql2er", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ystemsrx/sql_to_ER --skill sql2er -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ystemsrx/sql_to_ER sql2er --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ystemsrx/sql_to_ER.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/sql2er .opencode/skills/sql2er && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "sql2er" agent skill from https://github.com/ystemsrx/sql_to_ER/tree/master/skills/sql2er into .opencode/skills/sql2er/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sql2er", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
sql2erA skill your agent uses when the user wants a Chen-model ER diagram from SQL CREATE TABLE statements or DBML, wants to rearrange or clean up an existing sql2er state, wants a skeleton-only overview…
Sql2er is an agent skill from ystemsrx/sql_to_ER. Use when the user wants a Chen-model ER diagram from SQL CREATE TABLE statements or DBML, wants to rearrange or clean up an existing sql2er state, wants a skeleton-only overview with attributes hidden at generate time, or needs drawio/svg/png/json/html exports with final visual review.
Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 19 other files, including scripts and reference files (for example `agents/openai.yaml`, `references/commands.md` and `references/data-model.md`).
It sits in Databases, covering Diagrams and SQL. It works with SQL, draw.io, MySQL and MongoDB. The repository describes itself as: 【在线免费使用】 简单快速将SQL或DBML转换为美观的ER图(支持 Agent Skill)/ The best SQL to ER Diagram converter (Support Agent Skill). The licence is AGPL-3.0.
Read from SKILL.md and the folder at commit 0ced3ee. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 12 files in scripts/ (TypeScript and JavaScript), which the agent can run.
Shell commands in SKILL.md call:
nodeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Sql2er loads about 1.1k tokens when it runs, and up to ~4.2k if it reads all its reference files. Until then it costs about 73 tokens; SKILL.md has 478 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from ystemsrx/sql_to_ER at commit 0ced3ee, republished under its AGPL-3.0 licence (© ystemsrx). 478 words, ~1,137 tokens.
.claude/skills/sql2er/SKILL.md (or your agent's skills folder). This skill also uses 15 other files; get the full folder from GitHub.Use the bundled CLI from the repo root:
AGENT=skills/sql2er/scripts/sql2er-agent.mjsState lives in one JSON file passed with --state <path>; reuse the same state path for every command in a diagram session.
node $AGENT generate --input schema.sql --state er.jsonUse --hide-attrs only when the user wants an overview/skeleton, the schema is dense, or attributes are not important. Attribute visibility is fixed at generate; export never adds or removes attributes. If fields, PKs, or column-level semantics matter, generate with attributes.
Use --comment when table/column/ref comments carry readable business labels. Set labels before tuning layout because regenerating resets positions.
If generated names are not semantic enough, relabel nodes before layout tuning:
node $AGENT labels mode comment --state er.json
node $AGENT labels set rel-orders-users-user_id-7 "placed by" --state er.json
node $AGENT labels batch --file labels.json --state er.jsonnode $AGENT describe --state er.jsonUse DIAGNOSTICS for structural decisions: crossings, overlaps, disconnected components, attribute overlaps, and attribute-line crossings. Use the ASCII map only as a rough orientation aid.
If PARSER WARNINGS is present, fix every reported issue. If an issue cannot be fixed, report it to the user.
Copy exact entity ids from the ENTITIES block for manual position edits.
node $AGENT layout optimal --state er.json
node $AGENT attrs compact --state er.json
node $AGENT swap entity-users-0 entity-orders-1 --state er.json
node $AGENT move entity-users-0 600 400 --state er.json
node $AGENT nudge entity-users-0 20 -10 --state er.jsonAutomatic overlap avoidance is on by default and moves attributes first, then relationship diamonds, never entity rectangles. Use avoid off only when the user explicitly wants to preserve exact positions.
Prefer layout optimal after major edits. Use attrs compact for the smallest attribute footprint and attrs moderate for a more even ring. Use swap, move, and nudge only when diagnostics or visual review show a local issue.
node $AGENT export svg --out er.svg --state er.json
node $AGENT export png --out er.png --state er.json
node $AGENT export drawio --out er.drawio --state er.json
node $AGENT export html --out er.html --state er.json --lang zhExport HTML only when the user wants a portable manual fine-tuning editor; choose --lang zh|en for the page language. Always export SVG or PNG and inspect the image before finishing. Ensure labels are legible, the layout is balanced, and nodes/attribute ellipses do not overlap or sit on top of lines. If overlap or crossings are provably unavoidable, minimize them and make each remaining crossing/overlap clear.
When HTML is exported, tell the user the best manual fine-tuning path: open the HTML, enable continuous force layout briefly, turn it off, enable automatic avoidance once, turn it off, double-click nodes to edit the label text inside them, then hand-tune the remaining local details.
crossings / overlaps: run layout optimal; for a small local crossing, try swap.attrOverlaps / attrCrossings: compare attrs compact and attrs moderate, then keep the clearer result.describe --details to identify the exact attribute/node/line pairs before local edits.avoid off; turn it back on with avoid on before final review when possible.COMPONENTS > 1: keep related clusters in one diagram, or use export <fmt> --split for separate files.rotate 90.--hide-attrs only if a skeleton-only answer satisfies the user.references/commands.md for full command syntax, flags, describe output schema, export behavior, and recipes.references/data-model.md when node ids, edge types, cardinality, placeholder entities, self-references, or semantic labels matter.© ystemsrx, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 15 other files (scripts, references) in skills/sql2er of ystemsrx/sql_to_ER.
Open the folder on GitHubat commit 0ced3ee
Sql2er next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Sql2er this skillystemsrx/sql_to_ER | 188 | — | ~1.1k | Automated safety check: Pass | AGPL-3.0 | |
| Query Expertjamesrochabrun/skills | 215 | — | ~4.3k | Automated safety check: Pass | MIT | |
| Mindsdb MCP SkillLeoYeAI/openclaw-master-skills | 2.2k | — | ~2.5k | Automated safety check: Pass | MIT | |
| SQL Database Support for pRESTprest/prest | 4.6k | — | ~1.6k | Automated safety check: Pass | MIT | |
| Chdb SQLvemetric/vemetric | 394 | 1 repos | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Squixeduardofuncao/squix | 273 | — | ~784 | Automated safety check: Pass | MIT |
jamesrochabrun/skills
Master SQL and database queries across multiple systems. An agent skill from jamesrochabrun/skills.
LeoYeAI/openclaw-master-skills
MindsDB MCP服务器交互技能,用于通过自然语言查询和操作200+企业级数据源。当用户需要查询数据库、分析数据、创建AI模型、连接数据源(MySQL、PostgreSQL、MongoDB、Excel、CSV、Gmail、Slack等)、执行SQL查询、进行数据预测、构建知识库(RAG)、智能问答、文档检索或任何与数据库交互的任务时使用此技能。即使没有明确提到MindsDB,只要涉及数据库操…
prest/prest
Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.
vemetric/vemetric
A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…
eduardofuncao/squix
Run SQL queries across databases (Postgres, MySQL, SQLite, etc.) via the squix CLI.
saidake/rhctl
Run and author rhctl CLI workflows and remote environment scripts under scripts/ (PostgreSQL, JetStream, Docker, Redis, MongoDB, AWS LocalStack, execute/upload/patch).
Works with
Categories
A skill your agent uses when the user wants a Chen-model ER diagram from SQL CREATE TABLE statements or DBML, wants to rearrange or clean up an existing sql2er state, wants a skeleton-only overview…. Sql2er is an agent skill from ystemsrx/sql_to_ER. Use when the user wants a Chen-model ER diagram from SQL CREATE TABLE statements or DBML, wants to rearrange or clean up an existing sql2er state, wants a skeleton-only overview with attributes hidden at generate time, or needs drawio/svg/png/json/html exports with final visual review.
Sql2er fits situations like: the user wants a Chen-model ER diagram from SQL CREATE TABLE statements; wants to rearrange; clean up an existing sql2er state; wants a skeleton-only overview with attributes hidden at generate time.
Run `npx skills add ystemsrx/sql_to_ER --skill sql2er -a claude-code`. Or copy the skill folder (skills/sql2er in ystemsrx/sql_to_ER) into .claude/skills/sql2er in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ystemsrx/sql_to_ER --skill sql2er -a codex`. Or copy the skill folder (skills/sql2er in ystemsrx/sql_to_ER) into .agents/skills/sql2er in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ystemsrx/sql_to_ER --skill sql2er -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sql2er, .gemini/skills/sql2er, .github/skills/sql2er and .opencode/skills/sql2er in your project.
Going by SKILL.md and its folder, Sql2er needs TypeScript and JavaScript for the scripts in its folder and the command-line tools its instructions call (node). Our summary lists: Node.js.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Sql2er is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.1k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Sql2er: Query Expert (jamesrochabrun/skills, 215 stars), Mindsdb MCP Skill (LeoYeAI/openclaw-master-skills, 2.2k stars), SQL Database Support for pREST (prest/prest, 4.6k stars) and Chdb SQL (vemetric/vemetric, 394 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ystemsrx (a GitHub user) maintains it in ystemsrx/sql_to_ER, which has 188 GitHub stars. The repository was last updated on September 30, 2026.
Source: ystemsrx/sql_to_ER on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.