Skip to content
Back to search

academic-figures-drawer

Create camera-ready, editable academic figures from papers and method descriptions.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/m1n-n9--academic-figures-drawer/badge.svg)](/listings/m1n-n9--academic-figures-drawer)

HTML

<a href="/listings/m1n-n9--academic-figures-drawer"><img src="/api/listings/m1n-n9--academic-figures-drawer/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Copy the `academic-figures-drawer` directory into a directory scanned by Codex skills. For a personal installation, the usual location is:

将 `academic-figures-drawer` 目录复制到 Codex 会扫描的 skill 目录。个人安装通常放在:

~/.codex/skills/academic-figures-drawer/

The package can also be used directly from its current path:

也可以直接从当前路径使用:

C:\Code\DrawioSkill\academic-figures-drawer\

After installation, invoke it with:

安装后使用以下方式触发:

$academic-figures-drawer

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 138 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: academic-figures-drawer
  3. description: "Create camera-ready, editable draw.io figures from papers, method descriptions, code, or reference images. Use for ICML, NeurIPS/NIPS, ICLR, and similar ML/AI research figures: concise framework overviews, module-detail diagrams, tensor and attention flows, ablations, training/inference pipelines, and downstream-task panels. Optionally use image generation for a non-semantic visual concept or input/context asset, then translate the approved semantics into vector draw.io XML with preview, static validation, and screenshot-driven refinement."
  4. ---
  5. # Academic Figures Drawer
  6. Turn a paper or description into a figure that is easy to decode at two-column size. The editable `.drawio` XML is the source of truth; PNG/SVG/PDF are derived exports. Optimize for visual hierarchy and semantic clarity, not for enumerating every standard layer.
  7. ## Operating contract
  8. - Make the story explicit: **input → transformation → contribution → output**.
  9. - Use a concise framework view for the global story and a separate module view only when internal mechanics matter.
  10. - Every shape, color, icon, tensor label, and connector must have a named meaning. Delete decorative grids, token cards, or colored blocks that do not encode real data.
  11. - Keep real-object imagery (sensor, device, body part, waveform, application scene) in input/data/context regions only. Represent model computation with editable vector primitives.
  12. - Distinguish prior/standard components from the paper contribution with one restrained accent color and an explicit legend.
  13. - Preserve the paper's terminology, tensor symbols, stage order, and training/inference distinction. Never invent results, dimensions, or module names.
  14. - Apply the reusable quality rules in `references/general-quality-contract.md`; they encode paper-scale readability, compact composition, explicit connector semantics, rendered LaTeX, real-object asset boundaries, and export-driven review.
  15. ## Fast decision tree
  16. 1. **Framework overview** — 5–8 major stages, one dominant left-to-right path, only key tensors and one or two branch relations.
  17. 2. **Module detail** — zoom into the novelty: operation order, input/output dimensions, Q/K/V or feature-interaction direction, residual/skip paths, and where parameters are learned. Do not expand routine Linear/Norm/Activation layers unless they explain the novelty.
  18. 3. **Multi-panel figure** — use `(a) Overall Architecture`, `(b) Proposed Module`, and optionally `(c) Training/Downstream Tasks)` when one canvas would otherwise be unreadable. Panels share the same grid and legend.
  19. 4. **Reference replication** — treat the image as a style/layout source, not as the scientific source. Follow `references/reference-replication-protocol.md` and create the required intermediate artifacts before writing XML.
  20. Ask at most three focused questions only when the input cannot establish the diagram type, output format, or missing scientific semantics. Otherwise infer a safe default: landscape, editable draw.io plus PNG preview, English labels unless the source is Chinese.
  21. ## End-to-end workflow
  22. ### 1. Intake and semantic brief
  23. Read the paper section, abstract/method, prompt, code, and supplied images. Classify each source as content, structure, style, layout, or asset. Extract:
  24. - raw input and its modality/shape;
  25. - preprocessing or patching that is essential to the story;
  26. - named stages and their data dependencies;
  27. - the novel module(s), their operation sequence, and any tensor reshapes;
  28. - training-only branches, losses, inference path, and final output;
  29. - known/frozen components versus trainable/new components.
  30. Create `brief.md` with goal, audience, must-communicate items, exclusions, terminology, and open assumptions. Use `references/self-supervision-and-intake.md` for the traceability table.
  31. ### 2. Style contract before drawing
  32. If reference images are provided, read `references/style-extraction.md` and record exact or measured values in `visual-spec.md`: palette, font, type hierarchy, corner radius, stroke widths, dash pattern, margins, spacing rhythm, arrow grammar, icon language, density, and panel composition.
  33. If no style reference is available, read `references/topconf-paper-style.md` and apply `references/figure-contract.md`.
  34. Use this default semantic palette unless the extracted contract overrides it:
  35. | Meaning | Fill | Stroke |
  36. |---|---|---|
  37. | Input/raw signal/context | `#E8F2F5` | `#58727D` |
  38. | Existing or standard component | `#EAF0F6` | `#63758A` |
  39. | Feature/tensor transform | `#EDE9F4` | `#7B6A9A` |
  40. | Training/task/output head | `#F4EEDC` | `#9A7B3F` |
  41. | Paper contribution (accent) | `#F1D7D4` | `#B44948` |
  42. | Output/decision | `#E5F1E3` | `#5A8A55` |
  43. | Main data flow | none | `#263238` |
  44. | Auxiliary/skip/feedback | none | `#6B7280` (dashed) |
  45. Use one font family throughout (Arial/Helvetica; Noto Sans CJK for Chinese text), 1.5–2 px normal strokes, 2–3 px contribution strokes, 10–14 px body labels, 16–24 px panel/stage headings, 8 px alignment grid, and 16–28 px outer margins. Tune these values to the actual canvas and render; never shrink important text below paper-scale legibility.
  46. Relative-scale gate: treat typography and module area as a final design constraint, not an afterthought. Before handoff, inspect a canvas-only screenshot at the intended paper width and verify that panel titles are the largest text, contribution/module titles are visibly larger than annotations, and standard helper cells are not larger than the innovation block. As a practical starting point, use ≥20 px panel titles, ≥15 px key-module labels, ≥12 px tensor annotations on a 1600–2200 px canvas, and reserve at least 80–120 px width or 120–180 px height for a key module. If the figure is dense, enlarge the important module and remove redundant words before shrinking its font. Record any intentional deviations in `visual-spec.md` and the final screenshot review.
  47. ### 3. Optional image-2 concept pass
  48. Use the image-generation capability only when it helps explore composition or supplies a real-world input/context asset. Prompt for a clean academic concept with **no scientific text, no equations, and no tiny unlabeled blocks**. Treat the result as a visual reference; keep the paper-derived semantic graph authoritative. Do not embed the generated bitmap as the model pipeline. If a real input asset is used, record its provenance and role in `asset-ledger.md`.
  49. Recommended concept prompt shape: “wide camera-ready scientific figure, left-to-right input–core innovation–output story, muted blue/teal/lavender/ochre palette, one restrained coral highlight for the proposed module, consistent rounded vector cards and arrows, generous whitespace, no words or equations, no decorative grids.” After generation, inspect the bitmap, write the semantic/layout inventory, and redraw the shapes and connectors in XML. If editing a user image, inspect it first and pass its local path as the image-generation reference; never use a guessed or missing path.
  50. ### 4. Plan the composition
  51. For a framework view, choose a wide landscape canvas (roughly 1600–2200 × 850–1200 px), align stages on a single baseline, and leave whitespace around the contribution. For a module view, use a large central container with 3–6 labeled operations and small tensor-shape annotations. Use dashed containers only for meaningful groups (encoder, training-only path, memory bank, optional branch). Put the legend near a corner, never in the main flow.
  52. Define each edge before authoring it: source, target, direction, relation type (data/control/feedback/update/annotation), cardinality, label, and forbidden crossing zones. Prefer orthogonal or short straight routes; use waypoints and `exitX/exitY`/`entryX/entryY` when fan-in/out would stack or cross.
  53. ### 5. Author editable XML
  54. Read `references/xml-authoring.md` before hand-authoring XML. Use explicit `mxGeometry` positions and stable ids (never reuse reserved ids `0` and `1`). Use rounded rectangles, containers, arrows, and simple editable primitives. Use `scripts/shapesearch.py` for a specific draw.io library shape and `scripts/aiicons.py` only for a required AI brand mark. Use `scripts/autolayout.py` only as a first placement for large graphs; manually restore the paper composition afterward. Run `scripts/edgeports.py` when several edges leave the same side of a node.
  55. Annotate dimensions only where they answer a reader question, using a compact second line such as `X ∈ R^(B×T×D)` or `(B, C, H, W) → (B, T, D)`. For attention, show Q/K/V and arrow direction; for feature interaction, show the actual axes or branches being mixed. Add a legend mapping every used semantic color to a category and mark the contribution explicitly (e.g., `Proposed / trainable`).
  56. ### 6. Preflight and visual verification
  57. Use `references/general-quality-contract.md` as the review contract. In particular, verify that the canvas is fitted to the composition, every arrow has an explicit semantic source and target, and formulas are rendered in the exported artifacts rather than shown as source delimiters.
  58. Before any preview, run:
  59. ```powershell
  60. python <skill-dir>\scripts\validate_visual_quality.py <figure>.drawio
  61. python <skill-dir>\scripts\validate_drawio.py <figure>.drawio
  62. ```
  63. Zero `FAIL` items are required. Review every warning, especially text overflow, arrow-box collision, overlap, spacing variance, palette scatter, orphan labels, and edge-density hotspots. Read `references/xml-preflight.md` when a warning is ambiguous.
  64. Run a proportion pass after static preflight: compare title/body/annotation scale, compare contribution versus standard-module area, and confirm that the smallest required label remains readable in the canvas-only screenshot. A figure is not ready if the XML is structurally valid but the key innovation or tensor dimensions disappear at paper scale.
  65. Preferred preview on Windows or when URLs are long:
  66. ```powershell
  67. python <skill-dir>\scripts\serve_drawio_preview.py <figure>.drawio --port 8765
  68. ```
  69. Open the local preview and capture a canvas-only screenshot (the diagram should fill most of the crop). If browser automation is unavailable, export a preview with draw.io CLI without `-e`; if the CLI is unavailable, deliver XML and a browser-fallback URL from `scripts/encode_drawio_url.py`.
  70. For a camera-ready or user-critical figure, perform at least three screenshot → complete 9-zone defect inventory → fix all P0/P1 → re-render → verify cycles. Log them in `defect-log.md`; use `references/self-supervision-and-intake.md` for the inventory, red-team pass, and self-score. Compare at paper scale, not only at editor zoom.
  71. ### 7. Final export and handoff
  72. Export the requested formats. For an editable PNG, use the double extension and repair the known draw.io IEND truncation:
  73. ```powershell
  74. drawio -x -f png -e -s 2 -o <figure>.drawio.png <figure>.drawio
  75. python <skill-dir>\scripts\repair_png.py <figure>.drawio.png
  76. ```
  77. SVG/PDF exports may also embed the XML. Report the `.drawio` source, latest preview/screenshot, exports, validation status, self-score, and remaining approximations. Never claim completion when a required component/edge is missing, text is clipped, semantics are ambiguous, or the latest evidence is partial.
  78. ## Input-specific notes
  79. - **Paper/PDF:** use the available PDF/document reader to extract method and notation; cite no fabricated numbers. Separate training, inference, and evaluation paths.
  80. - **Description only:** state assumptions in `brief.md` and keep the first version abstract; ask only for information that changes the semantic graph.
  81. - **Reference screenshot:** preserve layout rhythm and typography but redraw as vectors; use a raster only for an explicitly requested input/context image.
  82. - **Existing `.drawio`:** patch labels, geometry, styles, or edges in place for local changes; regenerate only for a layout-wide change. Re-run both validators after every edit.
  83. ## Bundled resources
  84. - `references/figure-contract.md` — concise ICML/NeurIPS/ICLR visual and semantic contract.
  85. - `references/topconf-paper-style.md`, `style-extraction.md`, `reference-replication-protocol.md`, `self-supervision-and-intake.md` — paper-figure intake, reference extraction, and evidence loop.
  86. - `references/xml-authoring.md`, `xml-preflight.md`, `primitive-icons.md` — editable XML, layout, and icon recipes.
  87. - `references/diagram-types.md`, `shapes.md`, `troubleshooting.md` — draw.io shape vocabulary and fallback guidance.
  88. - `references/THIRD_PARTY_NOTICES.md` — license notices for included utility portions.
  89. - `scripts/make_drawio_preview.py`, `serve_drawio_preview.py`, `validate_drawio.py`, `validate_visual_quality.py`, and `validate_replication_artifacts.py` — preview and quality gates.
  90. - `scripts/init_figure_workspace.py` — create non-destructive `brief.md`, `visual-spec.md`, `layout-grid.md`, `asset-ledger.md`, and `defect-log.md` scaffolding.
  91. - `scripts/repair_png.py`, `encode_drawio_url.py`, `shapesearch.py`, `aiicons.py`, `autolayout.py`, `edgeports.py`, and `validate.py` — export repair, browser fallback, shape lookup, optional layout, edge-port distribution, and structural lint.
  92. - `data/shape-index.json.gz` and `data/lobe-icons.json` — local indexes used by shape and AI-icon lookup scripts.
README.md · README · 188 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Academic Figures Drawer
  2. Academic Figures Drawer turns a paper, method description, codebase, or visual reference into a clear, editable, camera-ready academic figure. It is designed for ML/AI papers in venues such as ICML, NeurIPS, and ICLR.
  3. Academic Figures Drawer 可将论文、方法描述、代码库或视觉参考图转换为清晰、可编辑、适合论文发表的学术图。它面向 ICML、NeurIPS、ICLR 等机器学习与人工智能论文场景。
  4. ## What it produces / 输出内容
  5. - Editable Draw.io source: `<figure>.drawio`
  6. - Preview and export files: PNG, SVG, PDF, or a local HTML preview when requested
  7. - A concise framework view showing `input → transformation → contribution → output`
  8. - An optional module-detail view showing operation order, tensor shapes, attention directions, or feature interactions
  9. - Evidence files such as `brief.md`, `visual-spec.md`, `layout-grid.md`, `asset-ledger.md`, and `defect-log.md` for non-trivial figures
  10. - 可编辑的 Draw.io 源文件:`<figure>.drawio`
  11. - PNG、SVG、PDF 导出文件,或按需生成的本地 HTML 预览
  12. - 用于说明“输入 → 变换 → 核心创新 → 输出”的整体框架图
  13. - 可选的模块细节图,用于说明操作顺序、张量维度、注意力方向或特征交互
  14. - 对复杂图形生成 `brief.md`、`visual-spec.md`、`layout-grid.md`、`asset-ledger.md` 和 `defect-log.md` 等过程记录
  15. The `.drawio` file is the source of truth. Raster images are used only for an explicitly requested real-world input or context asset; model computation is redrawn with editable vector primitives.
  16. `.drawio` 文件是唯一的可编辑源文件。真实物体或应用场景图片只应出现在明确需要的输入/上下文区域;模型计算过程应使用可编辑的矢量图形重新绘制。
  17. ## Installation / 安装
  18. Copy the `academic-figures-drawer` directory into a directory scanned by Codex skills. For a personal installation, the usual location is:
  19. 将 `academic-figures-drawer` 目录复制到 Codex 会扫描的 skill 目录。个人安装通常放在:
  20. ```text
  21. ~/.codex/skills/academic-figures-drawer/
  22. ```
  23. The package can also be used directly from its current path:
  24. 也可以直接从当前路径使用:
  25. ```text
  26. C:\Code\DrawioSkill\academic-figures-drawer\
  27. ```
  28. After installation, invoke it with:
  29. 安装后使用以下方式触发:
  30. ```text
  31. $academic-figures-drawer
  32. ```
  33. ## Quick start / 快速开始
  34. Give the skill the scientific source and the desired figure type. Include a reference image when its style or composition should be followed.
  35. 向 skill 提供论文内容或方法描述,并说明希望生成的图形类型。如果需要参考某张图的风格或构图,同时提供参考图片。
  36. ### English prompt
  37. ```text
  38. Use $academic-figures-drawer to create an editable, camera-ready figure for this method.
  39. Figure type: framework overview plus one module-detail panel.
  40. Input: multichannel time-series signal.
  41. Core contribution: an adaptive cross-channel interaction block.
  42. Output: prediction head and final task output.
  43. Requirements: landscape layout, readable at two-column width, muted semantic colors,
  44. one restrained accent color for the contribution, tensor shapes where informative,
  45. and a PNG preview next to the .drawio source.
  46. ```
  47. ### 中文提示词
  48. ```text
  49. 使用 $academic-figures-drawer 为下面的方法生成可编辑、适合论文发表的结构图。
  50. 图形类型:整体框架图 + 一个核心模块细节图。
  51. 输入:多通道时间序列信号。
  52. 核心创新:自适应跨通道交互模块。
  53. 输出:预测头和最终任务输出。
  54. 要求:横向布局,缩小到论文双栏宽度后仍清晰;使用低饱和度语义配色;
  55. 用一个克制的强调色突出原创模块;只在有助于理解的位置标注张量维度;
  56. 并在 .drawio 源文件旁生成 PNG 预览。
  57. ```
  58. ## Recommended workflow / 推荐工作流
  59. ### 1. Extract the semantic graph / 提取语义图
  60. First identify the real input, essential preprocessing, named stages, paper contribution, output, and any training-only branches. Do not add layers, dimensions, losses, or metrics that are not supported by the source.
  61. 先确认真实输入、必要预处理、主要阶段、论文创新、最终输出,以及仅训练阶段存在的分支。不要凭空补充论文没有提供的层、维度、损失或指标。
  62. ### 2. Build a visual contract / 建立视觉规范
  63. Use a supplied figure as a style reference only after extracting its font hierarchy, palette, spacing rhythm, corner radius, stroke width, arrow grammar, and panel composition. Without a reference, use the default contract in `references/figure-contract.md` and `references/topconf-paper-style.md`.
  64. 如果提供了参考图,应先提取字体层级、配色、间距节奏、圆角、线宽、箭头语法和面板构成,再开始绘图。没有参考图时,使用 `references/figure-contract.md` 和 `references/topconf-paper-style.md` 中的默认规范。
  65. ### 3. Optional ImageGen concept pass / 可选的 ImageGen 草图阶段
  66. For difficult compositions or real-world input context, generate a clean concept image first (for example with image-2). Ask for a wide academic composition with no scientific text, equations, or tiny unlabeled blocks. Treat the image as a composition and visual-language reference; then redraw the semantic content as Draw.io vectors.
  67. 对于复杂构图或真实输入场景,可以先用图像生成模型(例如 image-2)生成草图。提示词应要求宽幅学术构图、无科学文字、无公式、无微小无标签模块。草图只用于参考构图和视觉语言,最终语义内容要重新用 Draw.io 矢量图绘制。
  68. ### 4. Author the editable diagram / 绘制可编辑图
  69. Use a concise framework view for the global story. Add a separate module view only when the internal mechanism matters. Show tensor shapes, Q/K/V, residual paths, or interaction axes only where they answer a reader question.
  70. 整体框架图只展示关键阶段和模块关系。只有在内部机制确实重要时才增加模块细节图。张量维度、Q/K/V、残差路径或交互轴只在能够回答读者问题的位置出现。
  71. Use the semantic palette consistently:
  72. 统一使用具有固定含义的语义配色:
  73. | Meaning / 含义 | Fill / 填充 | Stroke / 描边 |
  74. |---|---|---|
  75. | Input or raw signal / 输入或原始信号 | `#E8F2F5` | `#58727D` |
  76. | Existing component / 已有组件 | `#EAF0F6` | `#63758A` |
  77. | Feature or tensor transform / 特征或张量变换 | `#EDE9F4` | `#7B6A9A` |
  78. | Training/task head / 训练或任务头 | `#F4EEDC` | `#9A7B3F` |
  79. | Paper contribution / 论文创新 | `#F1D7D4` | `#B44948` |
  80. | Output or decision / 输出或决策 | `#E5F1E3` | `#5A8A55` |
  81. ### 5. Validate and refine / 校验与精修
  82. Run both validators before handoff:
  83. 交付前运行两个校验脚本:
  84. ```powershell
  85. python <skill-dir>\scripts\validate_visual_quality.py <figure>.drawio
  86. python <skill-dir>\scripts\validate_drawio.py <figure>.drawio
  87. ```
  88. Then inspect a canvas-only screenshot at the intended paper width. Confirm that panel titles are dominant, the contribution block is not smaller than standard helper modules, and the smallest required label remains readable. Fix overflow, crossings, orphan labels, uneven spacing, and excessive text before reducing font size.
  89. For the complete reusable review contract—including compact-canvas rules, rendered LaTeX checks, explicit arrow source/target semantics, transparent real-object asset boundaries, and the three-cycle export review—see [`references/general-quality-contract.md`](references/general-quality-contract.md).
  90. 随后在论文目标尺寸下检查只包含画布的截图。确认面板标题最醒目,原创模块的面积不小于普通辅助模块,最小的必要文字仍然可读。优先修复溢出、连线穿模、孤立标签、间距不均和文字冗余,不要先通过缩小字号解决拥挤。
  91. For a local browser preview:
  92. 生成本地浏览器预览:
  93. ```powershell
  94. python <skill-dir>\scripts\serve_drawio_preview.py <figure>.drawio --port 8765
  95. ```
  96. For a reusable evidence workspace:
  97. 创建可复用的图形证据工作区:
  98. ```powershell
  99. python <skill-dir>\scripts\init_figure_workspace.py <work-dir> --title "Your Figure Title"
  100. ```
  101. ## Choosing a figure type / 图形类型选择
  102. | Type / 类型 | Use when / 适用场景 | Typical content / 典型内容 |
  103. |---|---|---|
  104. | Framework overview / 整体框架图 | The reader needs the global story first / 读者首先需要理解总体逻辑 | 5–8 stages, main data flow, contribution location, final output |
  105. | Module detail / 模块细节图 | The novelty depends on internal mechanics / 创新点依赖内部机制 | Operation order, tensor shapes, Q/K/V, feature-interaction direction |
  106. | Multi-panel figure / 多面板图 | One canvas would become crowded / 单一画布会过于拥挤 | (a) overview, (b) proposed module, optional training or downstream panel |
  107. | Reference replication / 参考图复刻 | Style and layout must follow a supplied figure / 需要沿用给定参考图的风格和构图 | Extracted style contract plus a vector redraw |
  108. ## Package structure / 目录结构
  109. ```text
  110. academic-figures-drawer/
  111. ├── SKILL.md # Core agent instructions / 核心 skill 指令
  112. ├── README.md # This guide / 本使用说明
  113. ├── agents/openai.yaml # UI metadata / 界面元数据
  114. ├── references/ # Style, XML, and review guidance / 规范与校验文档
  115. ├── scripts/ # Preview, validation, layout utilities / 工具脚本
  116. └── data/ # Local shape and icon indexes / 本地形状与图标索引
  117. ```
  118. ## Design principles / 设计原则
  119. - Clarity before decoration. / 清晰度优先于装饰。
  120. - Show the contribution with one restrained accent color. / 用一个克制的强调色突出论文创新。
  121. - Keep real images in input/context regions. / 将真实图片限制在输入或上下文区域。
  122. - Use vectors for model computation. / 模型计算过程使用矢量图形表达。
  123. - Preserve scientific semantics; never invent missing facts. / 保留科学语义,不虚构缺失事实。
  124. - Optimize for two-column readability, not editor zoom. / 以论文双栏尺寸的可读性为最终标准,而不是编辑器缩放效果。
  125. - Fit the canvas to the composition and remove redundant whitespace. / 让画布贴合实际构图,删除冗余留白。
  126. - Make every connector and symbol semantically explicit. / 确保每条连线和每个符号的语义都明确。
  127. - Review exported artifacts iteratively, not only the editable canvas. / 反复检查导出物,而不只检查可编辑画布。

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.