Agent skill

Draw

by ZimoLiao in ZimoLiao/scholaraio

A skill your agent uses when the user wants diagrams, flowcharts, architecture visuals, data relationships, timelines, concept maps, Mermaid, Graphviz, drawio, or polished paper figures generated…

MITAuto-check: notesDevelopment

Install Draw

skills CLI
$ npx skills add ZimoLiao/scholaraio --skill draw -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ZimoLiao/scholaraio draw --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ZimoLiao/scholaraio.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/draw .claude/skills/draw && rm -rf skills-src

Use ~/.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/

Facts

Skill name
draw
GitHub stars
577
Token cost
~1.3k tokens
SKILL.md length
223 words
Files
1
Skills in repo
43
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user wants diagrams, flowcharts, architecture visuals, data relationships, timelines, concept maps, Mermaid, Graphviz, drawio, or polished paper figures generated…

  • Works in 2 steps: 调用 LLM 将描述转换为 IR JSON → 使用 render_ir() 或 scholaraio diagram…
  • The user wants diagrams
  • SKILL.md covers Capability Routing, 后端选择速查表, 工作流架构 and 使用方式, plus 2 more sections
  • Calls brew, apt-get and conda

What it does

Draw is an agent skill from ZimoLiao/scholaraio. Use when the user wants diagrams, flowcharts, architecture visuals, data relationships, timelines, concept maps, Mermaid, Graphviz, drawio, or polished paper figures generated from structured text or IR.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Diagrams. It works with draw.io, Mermaid and Python. The repository describes itself as: Scholar All-In-One: A research infrastructure for AI agents. The licence is MIT.

When your agent uses it

  • The user wants diagrams
  • Architecture visuals
  • Data relationships
  • Polished paper figures generated from structured text

Example prompts

  • “/draw”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. 调用 LLM 将描述转换为 IR JSON
  2. 使用 render_ir() 或 scholaraio diagram --from-ir 生成目标格式

What it can do on your machine

Read from SKILL.md and the folder at commit 777628b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • brew
    • apt-get
    • conda

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Draw loads about 1.3k tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 223 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

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.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:98
    sudo apt-get install graphviz inkscape

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from ZimoLiao/scholaraio at commit 777628b, republished under its MIT licence (© ZimoLiao). 223 words, ~1,288 tokens.

Download SKILL.mdSave it as .claude/skills/draw/SKILL.md (or your agent's skills folder).
name
draw
description
Use when the user wants diagrams, flowcharts, architecture visuals, data relationships, timelines, concept maps, Mermaid, Graphviz, drawio, or polished paper figures generated from structured text or IR.

绘图工具(Text → IR → Diagram)

Capability Routing

当前 Agent 原生能力优先,但必须先做能力检查:按所需输出格式和可复现性路由,不按 Agent 品牌路由。若当前会话实际提供 Mermaid、DOT、SVG 或图片生成能力,就由当前使用的 Agent 原生能力完成普通流程图、架构图、关系图和演示示意图。只有需要从 ScholarAIO 论文库提取结构、保存 IR、批量复现或生成可继续编辑的 drawio 文件时,才调用 scholaraio diagram。不要为普通绘图安装额外 Python 绘图库。

draw skill 的核心工作流是两步式:先将文字描述或论文内容转换为统一的中间表示(IR),再将 IR 渲染为多种可编辑格式。

后端选择速查表

需求推荐后端输出格式特点
快速画流程图/架构图,零依赖预览Mermaid.mermaid / 嵌入 Markdown文本即代码,常见 Markdown 宿主可直接渲染
论文插图,LaTeX Beamer 直插Graphviz SVG.svg + .dot 源码矢量图,可版本控制,<?xml> 级精确
在线协作/精调布局drawio.drawio XML导入 diagrams.net 后手动拖拽调整
自定义实验示意图、信息图当前 Agent 直接生成 SVG/图片.svg / .png普通场景零新增 Python 依赖
程序化批处理、版本控制Graphviz DOT.dot纯文本,Diff 友好,任何平台可编译

工作流架构

┌─────────────┐     extract_diagram_ir()      ┌────────────┐
│  文字描述    │  ────────────────────────────> │     IR     │
│  或论文全文  │                               │  {nodes,   │
└─────────────┘                               │   edges,   │
                                              │   layout}  │
                                              └─────┬──────┘
                                                    │ render_ir(fmt)
              ┌─────────────────────────────────────┼─────────────────────────────────────┐
              ▼                                     ▼                                     ▼
        ┌──────────┐                          ┌──────────┐                        ┌──────────┐
        │  Mermaid │                          │   SVG    │                        │  drawio  │
        │ flowchart│                          │ (Graphviz│                        │  XML     │
        └──────────┘                          └──────────┘                        └──────────┘
  • IR(Intermediate Representation):标准化 JSON,包含 title、nodes[]、edges[]、layout_hint
  • 提取:可由 LLM 从论文 Method/Architecture 章节自动提取,也可由用户直接提供文字描述后调用 LLM 生成 IR
  • 渲染:通过 render_ir(ir, fmt) 分发到注册的后端,完全解耦

使用方式

方式 1:从论文自动生成(调用 diagram CLI)
bash
# 提取论文中的模型架构,渲染为 SVG
scholaraio diagram <paper-id> --type model_arch --format svg

# 只提取 IR,保存 JSON 供后续二次渲染
scholaraio diagram <paper-id> --type model_arch --dump-ir

# 从已有 IR 渲染为 drawio
scholaraio diagram --from-ir workspace/_system/figures/xxx.ir.json --format drawio

# 启用 Critic-Agent 闭环迭代自审(自动检查完整性、准确性、一致性并修正)
scholaraio diagram <paper-id> --type model_arch --format svg --critic

# 指定 Critic 最大迭代轮次(默认 3 轮)
scholaraio diagram <paper-id> --type model_arch --format svg --critic --critic-rounds 2
方式 2:从文字描述生成 IR 再渲染

当用户给出一段文字描述(如研究流程、实验设计)时:

  1. 调用 LLM 将描述转换为 IR JSON
  2. 使用 render_ir() 或 scholaraio diagram --from-ir 生成目标格式
方式 3:Mermaid 零依赖渲染

若用户只需要快速预览流程图,直接在 Markdown 中写 Mermaid 语法即可:

markdown
```mermaid
flowchart TD
    A[文献调研] --> B[问题定义]
    B --> C[方法设计]
    C --> D[实验实施]

支持 Mermaid 的当前 Agent 宿主可直接预览,无需任何 Python 渲染依赖。

## 各后端详细用法

### Graphviz DOT / SVG

需要系统安装 Graphviz 的 `dot`;如要插入 Beamer SVG,也要安装 Inkscape。可先用
`scholaraio setup check` 查看 `Graphviz dot` 与 `Inkscape` 状态。

```bash
# Ubuntu/Debian
sudo apt-get install graphviz inkscape

# macOS
brew install graphviz
brew install --cask inkscape

# conda 环境只需要 DOT/SVG 渲染时
conda install -c conda-forge graphviz

# 验证
dot -V
inkscape --version

生成 SVG(同时保留 .dot 源码):

bash
scholaraio diagram <paper-id> --format svg -o workspace/_system/figures/

完整 Graphviz DOT/SVG 工作流见 docs/writing-guide/graphviz-guide.md。

LaTeX Beamer 插入代码(需 -shell-escape + Inkscape):

latex
\begin{frame}
\centering
\includesvg[width=0.8\columnwidth]{workspace/_system/figures/diagram_xxx.svg}
\end{frame}
drawio XML
bash
scholaraio diagram <paper-id> --format drawio -o workspace/_system/figures/

用浏览器打开 https://app.diagrams.net 后选择 File → Open from → Device 导入编辑。

Mermaid
bash
scholaraio diagram <paper-id> --format mermaid -o workspace/_system/figures/

输出 .mermaid 文件,可直接嵌入 Markdown 或用 mmdc 本地渲染为 PNG/SVG。

执行逻辑

  1. 判断输入来源:

    • 用户提供了论文 ID → 调用 scholaraio diagram 提取 + 渲染
    • 用户提供了文字描述 → LLM 生成 IR → render_ir()
    • 用户已有 Mermaid 代码 → 直接嵌入 Markdown 或转 IR 后多格式输出
  2. 选择后端:参照上方「后端选择速查表」,根据用户的最终使用场景推荐格式

  3. 输出到 workspace/_system/figures/:

    workspace/_system/figures/
    ├── diagram_xxx.svg
    ├── diagram_xxx.dot
    ├── diagram_xxx.drawio
    └── diagram_xxx.mermaid
  4. 提示嵌入方式:SVG → Beamer \includesvg;drawio → diagrams.net 导入;Mermaid → Markdown 嵌入

示例

用户说:"画一个我的研究流程图" → 若已有论文:提取 Method → IR → SVG → 若无论文:根据描述生成 IR → Mermaid flowchart

用户说:"帮我画一个实验装置示意图" → 当前 Agent 直接生成可编辑 SVG;只在用户明确需要照片式或插画式结果时使用宿主图片生成能力

用户说:"把这个 Mermaid 代码转成 SVG" → 解析为 IR → render_ir(ir, "svg")

用户说:"把这篇论文的模型架构画成可编辑的图" → scholaraio diagram <paper-id> --type model_arch --format drawio

© ZimoLiao, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/draw of ZimoLiao/scholaraio.

Open the folder on GitHubat commit 777628b

Compare with similar skills

Draw 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.

Draw compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Draw this skillZimoLiao/scholaraio577—~1.3kAutomated safety check: NotesMIT
draw.io Architecture DiagrammingHoangNguyen0403/agent-skills-standard571—~1.3kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design47k1 repos~7.5kAutomated safety check: PassMIT
Draw.io Diagram StudioAgents365-ai/drawio-skill10k—~2.4kAutomated safety check: NotesMIT
Code Graph Mermaid Diagramstrailofbits/skills7.4k—~1.7kAutomated safety check: PassCC-BY-SA-4.0
Design Doc MermaidSpillwaveSolutions/design-doc-mermaid1761 repos~5.6kAutomated safety check: PassNone

Similar skills

  • draw.io Architecture Diagramming

    HoangNguyen0403/agent-skills-standard

    Draws architecture diagrams as editable draw.io files from a JSON spec, with a fixed house style, one C4 level per diagram and evidence-tagged shapes.

    571 GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    47k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 6 days ago
    DevelopmentAuto-check: notes
  • Code Graph Mermaid Diagrams

    trailofbits/skills

    Official

    Generates Mermaid diagrams from Trailmark code graphs, including call graphs, class hierarchies, module dependency maps, complexity heatmaps and attack surface data flows.

    7.4k GitHub stars~1.7k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Design Doc Mermaid

    SpillwaveSolutions/design-doc-mermaid

    Create Mermaid diagrams (flowchart, sequence, class, ER, state, C4, architecture) from text or source code.

    176 GitHub starsUsed in 1 repo~5.6k tokens
    DevelopmentAuto-check passed
  • Drawio Diagram Builder

    Will-hxw/drawio-diagram-builder

    Create, edit, replicate, and iteratively refine editable research and technical diagrams in diagrams.net/draw.io (.drawio XML) from prompts, papers, repositories, screenshots, or existing diagrams.

    413 GitHub stars~5.9k tokensUpdated 3 mo ago
    DevelopmentAuto-check passed

More from ZimoLiao/scholaraio

All 43 skills in this repo
  • Document

    ZimoLiao/scholaraio

    A skill your agent uses when the user wants to create or inspect DOCX, PPTX, or XLSX files, generate a downloadable Office deliverable, or verify its structure and layout warnings with scholaraio…

    577 GitHub stars~674 tokensUpdated 13 days ago
    Auto-check passed
  • Academic Writing

    ZimoLiao/scholaraio

    A skill your agent uses when the user needs help choosing or organizing an academic-writing workflow by deliverable, stage, or format, including review articles, guided reading, paper sections, PPT…

    577 GitHub stars~827 tokensUpdated 13 days ago
    Auto-check passed
  • Arxiv

    ZimoLiao/scholaraio

    A skill your agent uses when the user wants to browse arXiv preprints, search arXiv directly, fetch a PDF by arXiv ID or URL, or send a preprint into the ScholarAIO ingest pipeline.

    577 GitHub stars~799 tokensUpdated 13 days ago
    Auto-check passed
  • Bioinformatics

    ZimoLiao/scholaraio

    A skill your agent uses when working on bioinformatics workflows such as alignment, variant calling, phylogenetics, or protein-structure analysis, especially across BLAST, minimap2, samtools…

    577 GitHub stars~1.4k tokensUpdated 13 days ago
    Auto-check passed
  • Citation Check

    ZimoLiao/scholaraio

    A skill your agent uses when the user wants to verify citations in AI-generated or human-written text against the local knowledge base and catch hallucinated, wrong, or missing references.

    577 GitHub stars~454 tokensUpdated 13 days ago
    Auto-check passed
  • Explore

    ZimoLiao/scholaraio

    A skill your agent uses when the user wants to survey a journal or field, fetch papers from OpenAlex, cluster topics, build exploration embeddings, or search named explore libraries under…

    577 GitHub stars~755 tokensUpdated 13 days ago
    Auto-check passed

Categories

Questions about Draw

What does Draw do?

A skill your agent uses when the user wants diagrams, flowcharts, architecture visuals, data relationships, timelines, concept maps, Mermaid, Graphviz, drawio, or polished paper figures generated…. Draw is an agent skill from ZimoLiao/scholaraio. Use when the user wants diagrams, flowcharts, architecture visuals, data relationships, timelines, concept maps, Mermaid, Graphviz, drawio, or polished paper figures generated from structured text or IR.

When should I use Draw?

Draw fits situations like: the user wants diagrams; architecture visuals; data relationships; polished paper figures generated from structured text.

How do I install Draw in Claude Code?

Run `npx skills add ZimoLiao/scholaraio --skill draw -a claude-code`. Or copy the skill folder (.claude/skills/draw in ZimoLiao/scholaraio) into .claude/skills/draw in your project. Claude Code loads it when a task matches its description.

How do I install Draw in Codex?

Run `npx skills add ZimoLiao/scholaraio --skill draw -a codex`. Or copy the skill folder (.claude/skills/draw in ZimoLiao/scholaraio) into .agents/skills/draw in your project. Codex loads it when a task matches its description.

Can I use Draw in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ZimoLiao/scholaraio --skill draw -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/draw, .gemini/skills/draw, .github/skills/draw and .opencode/skills/draw in your project.

What does Draw need to run?

Going by SKILL.md and its folder, Draw needs the command-line tools its instructions call (brew, apt-get and conda). Our summary lists: Python 3.

Does Draw access the network?

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.

Is Draw safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Draw use?

Draw is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Draw use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Draw?

Skills that share tags, products or a category with Draw: draw.io Architecture Diagramming (HoangNguyen0403/agent-skills-standard, 571 stars), Diagram Design (cathrynlavery/diagram-design, 47k stars), Draw.io Diagram Studio (Agents365-ai/drawio-skill, 10k stars) and Code Graph Mermaid Diagrams (trailofbits/skills, 7.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Draw?

ZimoLiao (a GitHub user) maintains it in ZimoLiao/scholaraio, which has 577 GitHub stars. The repository holds 43 skills in this directory. The repository was last updated on September 25, 2026.

Source: ZimoLiao/scholaraio on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.