sql2er
安装方式
先用 Prompt 核对来源与依赖。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "sql2er":https://skillpi.com/zh/skills/deepskill-b242ce5084289d78dab8f92f19c6f16a5aea7c9ee37d64908dc6815f3f22cf52。安装前核对上游来源和版本:https://github.com/ystemsrx/sql_to_ER。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
当前版本的下载许可尚未确认或受限。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
当用户需要从 SQL CREATE TABLE 语句或 DBML 生成 Chen 模型 ER 图、重排或清理现有 sql2er 状态、在生成时隐藏属性以仅查看骨架概览,或导出 drawio/svg/png/json/html 以供最终视觉审查时使用此技能。
介绍来源: third_party · ystemsrx · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
本站暂无可核验的版本文件清单。
在原站浏览文件 ↗Frontmatter
name: sql2er
description: 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
Use the bundled CLI from the repo root:
AGENT=skills/sql2er/scripts/sql2er-agent.mjs
State lives in one JSON file passed with --state <path>; reuse the same state path for every command in a diagram session.
Core workflow
- Generate the diagram:
node $AGENT generate --input schema.sql --state er.json
Use --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.json
- Inspect diagnostics:
node $AGENT describe --state er.json
Use 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.
- Improve layout as needed:
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.json
Automatic 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.
- Export and review:
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 zh
Export 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.
Cleanup rules
crossings/overlaps: runlayout optimal; for a small local crossing, tryswap.attrOverlaps/attrCrossings: compareattrs compactandattrs moderate, then keep the clearer result.- Persistent attribute issues: run
describe --detailsto identify the exact attribute/node/line pairs before local edits. - Unwanted automatic movement: run
avoid off; turn it back on withavoid onbefore final review when possible. COMPONENTS > 1: keep related clusters in one diagram, or useexport <fmt> --splitfor separate files.- Awkward aspect ratio: try
rotate 90. - Busy attribute-heavy diagram: regenerate with
--hide-attrsonly if a skeleton-only answer satisfies the user.
References
- Read
references/commands.mdfor full command syntax, flags,describeoutput schema, export behavior, and recipes. - Read
references/data-model.mdwhen node ids, edge types, cardinality, placeholder entities, self-references, or semantic labels matter.
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供从 SQL/DBML 到 Chen 模型 ER 图的完整转换工作流
- 支持多种导出格式(drawio/svg/png/json/html)满足不同使用场景
- 包含智能布局优化和可视化审查机制
亮点
- description 清晰定义四种核心使用场景
- 触发条件具体明确,边界清晰无歧义
待提升项
-
缺少 When to Use 章节 原报告严重程度:轻微
文档结构完整但缺少显式的 When to Use 章节标题
改进建议:建议添加明确的 When to Use 章节以提升可读性
亮点
- 核心工作流四步骤划分清晰
- 提供详细的清理规则和参考文档指引
亮点
- 工具来源明确,参数说明完整
- 覆盖主要异常处理场景
- 导出流程包含视觉审查确认机制
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
risk · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。