4drawio logo

4drawio

CommunityPopular
jihe520
4drawio

数学建模非数据型图示绘制阶段。根据 ANALYSIS_MODELING_REPORT.md、RESULTS_REPORT.md 和已有 figures/ 生成技术路线图、子问题求解流程图、模型结构图、数据处理流程图等 DrawIO 图,并导出论文可引用 PDF。

Overview

Publisherjihe520
RepositoryMathModelAgent
Skill name4drawio
Stars
5.6K
Forks
423
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by jihe520 on GitHub. Read the source before you install it.

Installation

Install the 4drawio AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jihe520/MathModelAgent.git /tmp/MathModelAgent
mkdir -p .claude/skills
cp -r /tmp/MathModelAgent/skills/4drawio .claude/skills/4drawio
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable 4drawio in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads 4drawio on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so 4drawio is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

DrawIO 非数据图示绘制

本 skill 承接 3coding-visual。它只负责论文中的非数据型图示,例如技术路线图、求解流程图、模型结构图、数据处理流程图、变量关系图、指标体系图等。

数学建模规范参考

如需领域判断,读取 ../_references/math_modeling_norms.md 中的“图表与可视化”和“非数据图工具选择”小节。该文件只作为规范知识库,不要求为了凑数量生成额外图示。

阶段边界

  • 本阶段负责:DrawIO 源文件、非数据图 PDF、图示生成记录。
  • 本阶段不负责:折线图、柱状图、散点图、热力图、箱线图、雷达图等数据图。这些由 3coding-visual 生成。
  • 本阶段不重跑模型、不修改 code/,不改写 reports/RESULTS_REPORT.md 的数值结论。

必须产出

在当前工作目录创建或更新:

text
figures/
  fig_roadmap.drawio
  fig_roadmap.pdf
  fig_flow_q1.drawio
  fig_flow_q1.pdf
  ...
reports/DRAWIO_REPORT.md

如果某类图不需要生成,必须在 reports/DRAWIO_REPORT.md 中说明原因。竞赛论文通常至少需要一张 fig_roadmap 技术路线图。

读取这些文件的目的不是提取数据作图,而是理解论文方法、章节结构、子问题关系和已有图表,避免重复。

工作流程

Step 1: 盘点已有图表和需求

先读取以下文件(存在则读取):reports/ANALYSIS_MODELING_REPORT.mdreports/RESULTS_REPORT.mdfigures/ 目录列表。

然后从前序文档提取非数据图需求,输出一个清单:

text
DRAWIO PLAN CHECKLIST:
[ ] fig_roadmap      技术路线图,放在问题重述/绪论
[ ] fig_flow_q1      问题一求解流程图
[ ] fig_flow_q2      问题二求解流程图
[ ] fig_flow_q3      问题三求解流程图
[ ] fig_pipeline     数据处理流程图
[ ] fig_model        模型结构/变量关系图

清单不是固定模板,要根据题目实际删减或增补。不要为了凑图生成无意义图示。

Step 2: 判定图类型

常见图示选择:

图类型文件名建议适用场景
技术路线图fig_roadmap展示整体解题路线、章节逻辑、方法串联
子问题求解流程图fig_flow_q1, fig_flow_q2展示单个子问题的输入、判断、算法、输出
数据处理流程图fig_pipeline展示数据清洗、特征构造、建模输入
模型结构图fig_model展示模块关系、变量关系、模型层次
指标体系图fig_index_system展示目标层、准则层、指标层
决策树/规则图fig_decision_tree展示分类规则、设备选择、策略分支

不要用 DrawIO 画这些图:

  • 结果对比柱状图
  • 预测误差曲线
  • 灵敏度曲线
  • 相关性热力图
  • 分布图和箱线图

Step 3: 生成 DrawIO 源文件

每张图一个 .drawio 文件,放在 figures/

DrawIO 内容要求:

  • 文字语言与论文语言一致。
  • 节点文字短,必要时双行,不堆长句。
  • 同类节点样式统一。
  • 箭头方向清晰,避免交叉。
  • 图中不写大段解释,解释留给论文正文。
  • 不使用装饰性阴影和过度渐变。

生成大 XML 时,分段写入,避免截断。示例:

bash
mkdir -p figures
cat << 'XMLEOF' > figures/fig_roadmap.drawio
<mxfile>
  <diagram name="Page-1">
    <mxGraphModel>
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <!-- nodes and edges -->
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
XMLEOF

Step 4: 导出 PDF

优先用可用的 DrawIO 命令导出 PDF:

bash
DRAWIO_BIN="$(command -v drawio 2>/dev/null || command -v draw.io 2>/dev/null || command -v draw.io.exe 2>/dev/null || true)"
if [ -n "$DRAWIO_BIN" ]; then
  "$DRAWIO_BIN" --export --format pdf --crop --output figures/fig_roadmap.pdf figures/fig_roadmap.drawio
else
  echo "DrawIO command not found; keep .drawio source and record export failure."
fi

如果无法导出 PDF,保留 .drawio,在 reports/DRAWIO_REPORT.md 记录失败原因和建议导出命令。

Step 5: 自检和修复

每张图必须检查:

  • .drawio 文件非空。
  • 若导出成功,.pdf 文件非空。
  • 节点没有明显重叠。
  • 箭头不穿过核心节点。
  • 字号、颜色、边框风格一致。
  • 文件名和图意一致。
  • 没有与 3coding-visual 的数据图重复。

发现问题要修 .drawio 并重新导出,不要只在报告里解释。

Step 6: 写生成记录

创建 reports/DRAWIO_REPORT.md,至少包含:

markdown
# DrawIO 图示生成报告

## 图示清单
| 文件 | 类型 | 来源依据 | 用途 | 状态 |
| --- | --- | --- | --- | --- |

## 未生成图示及原因

## 导出与自检记录

## 给论文阶段的嵌入建议

嵌入建议只说明每张图适合放入哪个章节和建议 caption,不生成 *_typst_includes.typ。最终的图表插入代码(Typst 的 #figure(image(...), caption: [...]) 或 LaTeX 的 \begin{figure}...\end{figure})由 5writing 根据论文结构和所选引擎决定。

质量要求

  • 图示服务论文论证,不为装饰而画。
  • 每张图必须能对应到reports/ANALYSIS_MODELING_REPORT.md 中的真实方法。
  • 数据型图表不得在本阶段重复生成。
  • 论文阶段引用的非数据图都应有 .drawio 源文件和 PDF,或者在 reports/DRAWIO_REPORT.md 说明导出失败。

Frequently asked questions

What does the 4drawio AI skill do?

数学建模非数据型图示绘制阶段。根据 ANALYSIS_MODELING_REPORT.md、RESULTS_REPORT.md 和已有 figures/ 生成技术路线图、子问题求解流程图、模型结构图、数据处理流程图等 DrawIO 图,并导出论文可引用 PDF。

Why use 4drawio on TypingMind?

Because you install it once and use it with any model. 4drawio is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install 4drawio in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jihe520/MathModelAgent/tree/main/skills/4drawio. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use 4drawio?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with 4drawio?

As many as you like. As long as a model supports skills, you can use 4drawio with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the 4drawio AI skill free?

It is published on GitHub by jihe520. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇