Add Svg 标志

Add Svg

社区
QIANJINYDX
add-svg

将 SVG 元素添加、收集、设计、审核并整合到可编辑的 diagrams.net/draw.io 科研图中。当用户要求为 draw.io 图表补充 SVG 图标、机制、生物对象、模型组件、通路符号、仪器、图形摘要元素或适合发表的矢量素材时使用。每次执行前都必须先询问用户选择 SVG 来源模式:网络搜索或自行设计 SVG。选择网络模式时,搜索多个相关 SVG 候选项供用户后续选择,记录来源和许可说明;如果某个概念没有合适结果,则改为自行设计 SVG。选择自行设计模式时,使用简单的矢量基本图形,创建简洁、可编辑、具有 Nature 风格的 SVG。适用于 .drawio、SVG、diagrams.net、“科研流程图”“论文示意图”“SVG补图”“图标补充”和“draw.io配图”。

Add to TypingMind

概览

发布者QIANJINYDX
代码仓库research-drawio-skill
技能名称add-svg
星标数
45
复刻数
2
附带文件
10
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 10 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 QIANJINYDX 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Add Svg AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/QIANJINYDX/research-drawio-skill/tree/main/skills/add-svg
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/QIANJINYDX/research-drawio-skill.git /tmp/research-drawio-skill
mkdir -p .claude/skills
cp -r /tmp/research-drawio-skill/skills/add-svg .claude/skills/add-svg
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Add Svg,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Add Svg。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Add Svg 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Add SVG Skill

Add SVG assets to draw.io research figures as evidence-aware visual elements, not decorative stickers. This skill follows the nature-figure and draw-science philosophy: establish the scientific message and visual role first, decide the SVG source explicitly, then integrate only assets that serve the diagram's logic and pass layout/export QA.

Mandatory Source Gate

Before doing any SVG search, drawing, download, file edit, or draw.io insertion, ask exactly one blocking question and stop:

text
SVG 来源选择:网络搜索,还是自行绘制?

Do this on every invocation. Continue only after the user answers. The answer sets source_mode:

  • network / 网络搜索: search the web for multiple SVG candidates.
  • self_design / 自行绘制: design new SVGs from vector primitives.

If the user already describes a preference in the same message, still confirm briefly before execution unless the conversation already contains an explicit answer to this exact source gate for the current invocation.

Routing Protocol

  1. Read manifest.yaml.
  2. Read every file listed under always_load:
    • static/core/contract.md
    • static/core/stance.md
  3. Ask the mandatory source gate and wait for the user's answer.
  4. Load the reference file for the chosen mode:
    • network search: references/network-svg-search.md
    • self design: references/self-design-svg.md
  5. Load references/drawio-svg-integration.md before editing .drawio.
  6. Load references/svg-qa-contract.md before final delivery.

Core Workflow

After the source gate is answered, create a compact SVG contract:

text
Scientific message:
Target draw.io file:
SVG role:
Source mode:
Needed concepts:
Candidate plan:
Integration targets:
Style constraints:
License/provenance notes:
Fallback plan:
QA checks:

Network Mode

Search for multiple SVG candidates for each requested concept. Keep candidates for later user selection rather than silently choosing one. For each candidate, record:

  • concept
  • preview/name
  • source URL
  • direct SVG URL if available
  • license or usage note
  • style fit for Nature-style draw.io figures
  • any required attribution

If no suitable SVG is found for a concept, mark it as self-designed fallback and create a simple original SVG following references/self-design-svg.md.

Self-Design Mode

Create original SVGs from simple vector primitives. Keep them restrained, editable, and compatible with draw.io. Use one neutral family, one signal family, and one accent family. Avoid complex illustration, gradients, shadows, bitmap effects, and decorative detail.

Draw.io Integration Rules

  • Preserve the user's existing .drawio content and layout.
  • Insert SVGs as editable/vector-friendly draw.io image cells when possible.
  • Encode SVG image values as draw.io-safe URL-encoded data:image/svg+xml, URIs. Do not use raw data:image/svg+xml;base64,... inside style=, because the semicolon in svg+xml;base64 breaks mxGraph style parsing.
  • Treat an inserted SVG as the visual glyph for that concept. Do not also draw duplicate draw.io primitive glyphs for the same object unless the user asks for a hybrid editable reconstruction.
  • After SVG insertion, re-balance the layout and remove empty placeholder zones so the figure remains compact rather than leaving the old self-drawn glyph space unused.
  • Keep SVG labels separate from the icon body unless text is a scientific mark.
  • Match the diagram's grid, spacing, color semantics, and connector rules.
  • Run available QA checks and export a draw.io PNG/SVG preview when draw-science/scripts/export_drawio_preview.py is available. Do not treat XML validity as sufficient for SVG insertion; the exported preview must show the SVG assets rendered, nonblank, unclipped, and not overlapping labels.

Related Files

FileOpen when
references/network-svg-search.mdUser chooses network search
references/self-design-svg.mdUser chooses self-designed SVGs or network search fails
references/drawio-svg-integration.mdNeed to insert, encode, or edit SVGs in .drawio
references/svg-qa-contract.mdBefore final delivery or candidate handoff
scripts/svg_data_uri.pyNeed to convert a local SVG into a draw.io data URI

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Add Svg AI 技能有什么作用?

将 SVG 元素添加、收集、设计、审核并整合到可编辑的 diagrams.net/draw.io 科研图中。当用户要求为 draw.io 图表补充 SVG 图标、机制、生物对象、模型组件、通路符号、仪器、图形摘要元素或适合发表的矢量素材时使用。每次执行前都必须先询问用户选择 SVG 来源模式:网络搜索或自行设计 SVG。选择网络模式时,搜索多个相关 SVG 候选项供用户后续选择,记录来源和许可说明;如果某个概念没有合适结果,则改为自行设计 SVG。选择自行设计模式时,使用简单的矢量基本图形,创建简洁、可编辑、具有 Nature 风格的 SVG。适用于 .drawio、SVG、diagrams.net、“科研流程图”“论文示意图”“SVG补图”“图标补充”和“draw.io配图”。

为什么在 TypingMind 中使用 Add Svg?

因为您只需安装一次,就能搭配任何模型使用。Add Svg 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Add Svg?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/QIANJINYDX/research-drawio-skill/tree/main/skills/add-svg。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Add Svg?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Add Svg 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Add Svg 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Add Svg AI 技能免费吗?

QIANJINYDX 已在 GitHub 上发布了该技能。请查看代码仓库了解许可条款。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇