Skip to content

roxorlt/UEmaster / skills/flow-canvas

flow-canvas

Verified

把业务图渲染成横平竖直的规范 SVG:流程图(正交规范)、架构图(泳道分层)、ER 图、甘特图、时序图。触发:画流程图、业务流程图、架构图、ER 图、甘特图、时序图、把 mermaid 转规范图、流程图横平竖直、评审用图、render flowchart / orthogonal flowchart / architecture diagram / ER diagram / gantt / sequence diagram / draw a clean diagram from mermaid。不适用:只要 mermaid 源码文本、脑图、表格。

FileKindSize
LICENSEother1.0 KB
README.mdmarkdown3.7 KB
SKILL.mdskill md10.2 KB
agents/interface.yamlconfig1.4 KB
contract/archspec-v1.mdmarkdown2.1 KB
contract/archspec-v2.mdmarkdown3.0 KB
contract/archspec-v3.mdmarkdown5.1 KB
contract/archspec-v4.mdmarkdown5.0 KB
contract/archspec-v5.mdmarkdown3.5 KB
contract/blueprintspec-v1.mdmarkdown7.7 KB
contract/blueprintspec-v2.mdmarkdown4.0 KB
contract/blueprintspec-v4.mdmarkdown4.1 KB
contract/erspec-v1.mdmarkdown1.9 KB
contract/erspec-v2.mdmarkdown4.2 KB
contract/flowspec-v1.mdmarkdown3.0 KB
contract/ganttspec-v1.mdmarkdown1.9 KB
contract/seqspec-v1.mdmarkdown1.6 KB
examples/arch-3tier.mmdother289 B
examples/arch-logical.mmdother680 B
examples/arch-microservice.mmdother342 B
examples/arch-portal.mmdother262 B
examples/arch-skip.mmdother337 B
examples/blueprint-enterprise.mmdother2.0 KB
examples/blueprint-layered.mmdother794 B
examples/er-blog.mmdother324 B
examples/er-order.mmdother449 B
examples/er-school.mmdother409 B
examples/gantt-day-schedule.mmdother321 B
examples/gantt-infra.mmdother473 B
examples/gantt-release.mmdother483 B
examples/minimal.mmdother133 B
examples/pet-boarding.mmdother1.2 KB
examples/seq-login-auth.mmdother308 B
examples/seq-oauth-resource.mmdother386 B
examples/seq-order-pay.mmdother338 B
examples/seq-push-notify.mmdother414 B
manifest.jsonconfig288 B
scripts/flowcommon.pyexecutablescript21.3 KB
scripts/flowlayout.pyexecutablescript30.7 KB
scripts/layout_arch.pyexecutablescript60.6 KB
scripts/layout_blueprint.pyscript78.8 KB
scripts/layout_er.pyexecutablescript21.1 KB
scripts/layout_gantt.pyexecutablescript14.4 KB
scripts/layout_seq.pyexecutablescript13.5 KB
scripts/selftest.pyexecutablescript6.0 KB
scripts/selftest_arch.pyexecutablescript18.5 KB
scripts/selftest_blueprint.pyscript22.2 KB
scripts/selftest_er.pyexecutablescript10.5 KB
scripts/selftest_gantt.pyexecutablescript6.7 KB
scripts/selftest_seq.pyexecutablescript6.1 KB

contract/erspec-v1.md

View on GitHub
# erspec/1 契约(ER 图)

flow-canvas 多图类型引擎 · ER 图排版契约。破坏性变更时主版本 +1。

## 输入:mermaid erDiagram 子集

```
erDiagram
  CUSTOMER ||--o{ ORDER : "下订单"
  CUSTOMER {
    string id PK
    string name "昵称"
    int age
  }
  ORDER {
    string id PK
    string customer_id FK
    date created_at
  }
```

- 实体:`NAME { 属性行... }`;属性行 = `类型 属性名 [PK|FK] ["注释"]`(PK 下划线、FK 斜体渲染)。
- 关系:`A 基数--基数 B : "标签"`;左右各一个基数记号(`||`、`o|`、`|{`、`o{`、`}|` 中的组合)。
- 不支持:属性定义缺失、未知基数记号、emoji → 报「形态超限」错误降级。

## 布局规则

1. 实体 = 表格块:表头 + 属性行(行高 = 文字行高);列宽 = 表头/属性/基数标签最宽者 + 边距。
2. 实体横向排列;初始按声明序,用 barycenter 重排(实体位置 = 邻居平均序号,迭代 2~4 轮)消除边交叉。
3. 实体间隔 = 最宽实体 + 最宽基数标签 + 通道宽。
4. 边:源右端口 → 目标左端口;直线优先,与其他边或实体相交时改正交折线(水平 → 垂直 → 水平,走实体间通道);每条边独立 y 走廊,同侧端口错位 ±8px。
5. **关系标签长度**:标签走廊约 68px,`"标签"` **≤ 4 个汉字**(超出会被质检以 textOverflow 拦下——缩短标签或改用表格讲解)。
6. 重排后仍有交叉 → 报「形态超限」错误降级。

## 输出 SVG 契约

- 根元素:`<svg data-erspec="1" viewBox="0 0 W H">`
- 实体:`<g class="entity" id="er-{id}">`:表头 rect + 属性行 text + 行分隔线

## 质检

统一 `--check` 报告字段;块重叠 0、边交叉 0、文字溢出 0,任一非 0 拒绝产出并降级。
实体数 > 8 或交叉无法消除 → 报「形态超限」错误降级。
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall