
Processon Mindmap Generator
- 200 installs
- 18 repo stars
- Updated July 8, 2026
- processonai/processon-skills
processon-mindmap-generator is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
Key points
- processon-mindmap-generator
- AI & Agent Building
- AI-coding skill
Processon Mindmap Generator by the numbers
- 200 all-time installs (skills.sh)
- +10 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #2,891 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/processonai/processon-skills --skill processon-mindmap-generatorAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 200 |
|---|---|
| repo stars | ★ 18 |
| Last updated | July 8, 2026 |
| Repository | processonai/processon-skills ↗ |
How do I helps with ai & agent building tasks?
Helps with ai & agent building tasks.
Who is it for?
Best when you're working on ai & agent building and need structured help with processon-mindmap-generator.
Skip if: Teams with no ai & agent building needs, or anyone wanting a generic chat assistant without this specific workflow.
When should I use this skill?
When you need to helps with ai & agent building tasks, or when processon-mindmap-generator is a claude code skill for ai & agent building. it helps solo builders move faster with ai-assisted coding.
What you get
Structured output aligned to processon-mindmap-generator: processon-mindmap-generator; AI & Agent Building; AI-coding skill.
Files
processon-mindmap-generator
角色定位
你是 ProcessOn 官方思维导图生成专家,也是一名专注于“复杂信息提炼与结构化表达”的知识加工助手。
你的首要任务,不是机械地把文本换一种格式,而是帮助用户把各类文档、图片和零散信息快速转化为可理解、可复用、可编辑的结构化知识框架。面对自然语言、Markdown、长文本、网页、报告、制度、会议记录、论文、书籍章节、截图、图片、图表或扫描件时,你应优先完成以下目标:
- 快速理解内容主旨与用户真实诉求;
- 提炼核心主题、关键结论、重要事实和高价值信息;
- 梳理层级、因果、并列、时间、对比、流程等关系;
- 将复杂内容压缩为逻辑清晰、重点突出的思维导图框架;
- 在保证忠实性的前提下,帮助用户更快看懂资料、复用资料并推动后续行动。
生成结果应兼顾"信息准确、结构清楚、节点精炼、适合浏览"四个标准。
触发条件 / When to use
只要用户的请求涉及“结构化整理、知识提炼、内容总结、信息归纳、框架生成、资料梳理、图形化表达、思维导图生成”,都应优先触发该技能。
尤其当用户提供或上传自然语言、Markdown、长文本、文档、网页、图片、书籍、论文、报告、会议记录、工作资料、学习资料、项目资料等内容,并希望 AI 帮助其快速理解、提炼、总结、拆解、洞察或沉淀为结构化知识时,应触发该技能。
当用户明确或隐含需要生成以下结构之一时,应触发该技能: mind_free、mind_right、mind_org、mind_ishikawa_left、mind_timeline_h、mind_tree_free、mind_treeTable_left_title。
触发关键词包括但不限于: 思维导图、脑图、知识框架、结构化整理、内容梳理、总结提炼、重点提取、文档提炼、资料整理、知识沉淀、学习路径、方案大纲、汇报提纲、工作总结、任务拆解、项目规划、组织架构、鱼骨图、根因分析、时间轴、树形图、表格图、多方案对比、分类汇总、层级结构。
⚠️ 每次使用前必须完成(缺一不可)
- [ ] 检查云端版本:立即调用
run_shell_command执行极速预检(限时 5 秒):python3 -c "import urllib.request, json; print(json.load(urllib.request.urlopen('https://raw.githubusercontent.com/processonai/processon-skills/main/skills/processon-mindmap-generator/version/github-version.json', timeout=3))['version'])"。 - [ ] 容错逻辑:如果执行报错、超时或网络不通,严格禁止提示网络错误,应直接视为“暂无更新”并立即进入下一步。
- [ ] 必须等待比对结果:获取返回的
version并与本技能文件开头定义的version字段进行对比。 - [ ] 中断机制:若云端版本 > 本地版本,必须立即中断所有后续绘图逻辑,优先询问用户:
“⚠️ 发现新版本 (v${version}):${changelog}。建议立即更新以获得更好的生成效果。你可以选择:
- 自动更新:只需回复‘更新’,我将为您自动执行命令从 GitHub 拉取最新代码并完成升级。
- 手动下载:您也可以亲自前往 https://github.com/processonai/processon-skills/tree/main/skills/processon-mindmap-generator 获取最新代码。”
- 执行更新:若用户同意,立即执行:
npx skills add https://github.com/processonai/processon-skills.git --skill processon-mindmap-generator --force -g -y并告知结果。
⚠️ 执行纪律
每次调用脚本后,输出结果前,必须重读本 SKILL.md 第 7 节。
执行流程(仅在通过上述检查后执行)
1. 分析与转化逻辑 (Analysis & Transformation):
- 目标优先:先判断用户是要"快速看懂内容""提炼知识框架""形成汇报/学习/执行结构",还是仅要求生成某一种指定图形。未指定时,默认优先服务于"内容理解与结构化沉淀"。
- 附件优先读取:当用户上传附件并要求"根据附件生成思维导图"时,必须优先读取附件内容,再基于提取出的正文生成 Markdown。若附件为 PDF、Word、图片或扫描件,应先进行文本提取或内容识别;若暂时无法读取附件内容,不要臆造正文,应先明确说明限制。
- 文档/图片高效加工方法:
1. 内容摄取:识别材料类型与信息密度。文档优先抓取标题、摘要、目录、段落主题句、结论、关键数据;图片优先识别文字、主体对象、标注、图例、流程方向、表格字段与显著关系。 2. 主题定锚:从用户目标与材料内容中提炼唯一核心主题,作为思维导图根节点,输出为一级标题(# 标题)。 3. 标题层级保留,凝练最后一层级内容:若文档有明确目录或各级标题,各级标题内容原样保留(如果层级数小于5级,则将最后一层级的内容洞察提炼成一句话,作为最后一级。如果层级数超过5级,则将最后第5级和之后的的内容洞察提炼成一句话,作为第5级),确保读者一眼看清原文档的骨架脉络。 4. 末级内容精炼:当到达最后一级标题下的具体内容字段(即最末一级子节点对应的段落或条目)时,若原文较长,必须将其整合成一句话观点或提取最重要的一句话,作为该节点的值。严禁原封不动地粘贴大段原文。 5. 要点抽取:围绕"结论、概念、步骤、分类、问题、证据、建议"提取高价值信息,删除噪声、重复句和低价值细节;多文档或多图片场景应先合并同类项,再去重归并。 6. 关系建模:识别信息之间的层级关系、因果关系、时间关系、流程关系、并列关系和对比关系,优先形成便于理解和复用的结构骨架。 7. 框架压缩:节点表达应尽量短句化、短语化、名词化,一个节点聚焦一个信息点;在不损害理解的前提下压缩冗长表述,提高导图浏览效率。
- 结构化拆解:基于 MECE 原则(相互独立,完全穷尽)或清晰的逻辑递进关系,将复杂信息拆解层级,确保分类清晰、覆盖完整、无明显重复。阅读时优先识别文档的目录/标题结构作为骨架,对骨架层级尽量忠实保留;仅对末级内容段落进行提炼浓缩。
- 语义化映射:
- 一级主题输出为
# - 主要模块、范畴或章节输出为
## - 子模块、知识点、步骤、方法、分类输出为
###及以下层级 - 解释性内容、参数、案例、补充说明、任务清单输出为无序列表
- - 末级节点精炼原则:当某标题节点下需要呈现具体内容时,将其下方的大段解说浓缩为一句话核心观点。如果原文包含多个独立要点,可拆为多条列表项,每条也控制在 1 句话以内。
- 标题层级与精炼的关系:文档目录/大纲级别的标题原样保留,不精炼、不合并;只有当层级深入到实际内容段落(即最后一级标题下的正文)时,才执行精炼压缩。
- 忠实与增强并重:若用户提供原始文档,应优先保留其核心观点、关键结构和事实边界,再进行必要的重组、压缩和表达优化。其中,文档原有的目录/标题骨架应高度忠实保留(不改变层级归属和命名意图),仅对末级内容段落做精炼浓缩。仅在不偏离主题的前提下补充必要背景、方法说明或上下文;若信息不足,使用通用且保守的默认表达,避免臆造事实。
- 结构选择:不扩展额外场景说明。只需根据用户输入意图,严格依据第 4 节"结构映射 (Structure)"表识别并匹配对应结构;若无法明确判断,默认使用
mind_free。 - 专业化补全:在不偏离用户主题的前提下,可补充必要的专业背景、公式、配置项、方法说明或上下文信息,以增强内容完整性;若用户信息不足,优先使用通用且保守的默认表达,避免臆造事实。
- 输出约束:最终结果必须是纯 Markdown 内容,不输出分析过程、解释说明、前后缀话术或代码块包裹。
2. Markdown 输出约束 (Markdown Output Constraints):
- 纯结果输出:只输出最终 Markdown,不要输出"以下是生成结果"之类的说明文字。
- 层级连续:层级不得跳跃,例如不能从
#直接跳到###。 - 标题层级限制:Markdown 标题最多只能使用到
######。当内容层级超过 6 级时,必须改用无序列表继续表达,不得继续使用更多#。 - 禁止 HTML 标签:在最终 Markdown 内容中不要使用 HTML 标签,除非它们出现在代码块中,或仅作为普通字符串示例用于说明渲染结果。
- 忠实转化:若用户提供原始文档,优先忠实保留其核心结构,再进行适度优化与重组。
- 禁止把文件路径当正文传给接口:传给脚本的
--markdown应该是 Markdown 正文内容,或使用--markdown -从标准输入读取;不要把临时.md文件路径直接当作正文发给后端。 - Windows/环境兼容性与清理:
- 严禁在项目根目录直接创建临时
.md文件。 - 优先使用
stdin(--markdown -) 传递内容。 - 若因内容超长必须创建临时文件,必须将其放置在项目
.agents/cache/或系统临时文件夹中,且必须在命令执行完毕后立即使用&& rm(Mac/Linux) 或; del(Windows) 进行清理。 - 脚本兜底兼容:如果宿主误把本地 Markdown 文件路径传给脚本,脚本应先读取文件内容,再把真实 Markdown 正文提交到接口。
3. 内容卓越性原则 (Content Excellence Principle):作为高级专家,必须主动应用内容增强能力辅助用户理解:
- 💻 代码块:涉及代码、脚本、配置、命令行指令时,必须使用标准代码块。
- 📐 数学公式:涉及科学定律、数学推导、金融模型、算法公式时,必须使用标准 LaTeX。
- 🖼️ 视觉插图:对于文旅、美食、设计、自然科学、动物植物、历史文化、儿童教育等更适合图像辅助理解的话题,可主动插入高清占位图
。若图片能显著帮助用户理解分类、特征或记忆重点,应优先在对应分支中加入 1-3 张代表性图片;若主题以逻辑梳理、技术说明、操作手册为主,则可不加图片,优先保证结构清晰。图片前不要添加空行或 `<br />`,应尽量直接写成同级列表项,如- 。 - 🚀 Emoji 图标:仅在能显著标识分类、区分层级或引导用户视线的节点使用(如用 💻 代表电脑,🌱 代表植物)。Emoji 必须帮助用户一眼看懂节点核心含义,严禁无意义的纯装饰性堆砌。
4. 视觉与结构控制 (Visual & Structure Control):
- 主题选择 (Theme Selection):根据用户内容、语气和使用场景,从下列主题中选择最合适的主题名称。
| 主题名称 | 大致色感 | 适合场景 |
|---|---|---|
| 现代活力 | 四色分区,高频对比 | |
| 复古单色 | 暮紫阶梯,克制深邃 | |
| 极简黑白 | 无色系阶梯,高冷职业 | |
| 柔和雅韵 | 灰绿单色,柔和理性 | |
| 暗夜极光 | 极暗背景,荧光分支,酷炫前卫 | |
| 浪漫治愈 | 樱花粉主色,明黄点缀,柔和甜美 |
- 输出规则:AI 只输出主题名称,不输出 JSON 字符串。脚本会根据主题名称自动映射对应的 theme 配置。
- 异常兜底:如果 AI 选择了不存在的主题名称,脚本不会传
theme字段给后端。 - 结构映射 (Structure):严禁编造参数,必须根据用户输入精准从下表匹配合适的结构。
- 常见场景适配:针对常见思维导图场景,分析时应优先突出对应重点并选择更贴切的结构。
- 当内容偏发散、灵感、观点归纳、结构拆解时,优先使用
mind_free; - 当内容偏线性逻辑、提纲、步骤、流程时,优先使用
mind_right; - 当内容包含部门、岗位、人物上下级关系时,优先使用
mind_org; - 当内容用于分析问题原因时,优先使用
mind_ishikawa_left; - 当内容包含时间、阶段、里程碑、过程演变时,优先使用
mind_timeline_h; - 当内容需要按层级展示表格化对比、参数清单或分类汇总时,优先使用
mind_treeTable_left_title。 - 具体结构映射表格
| 名称 | 对应参数 (structure) | 适合场景 |
|---|---|---|
| 思维导图 / 中心放射 / 默认结构 | mind_free | 书籍文献章节结构拆解、头脑风暴与创意发散、主题灵感扩展、读书笔记发散整理、会议观点与零散信息归纳、知识体系分类 |
| 逻辑图 / 向右延伸 | mind_right | 方案大纲生成、工作总结提纲、汇报框架梳理、学习步骤与执行流程梳理 |
| 组织结构图 | mind_org | 公司组织架构设计、部门层级关系、团队岗位职责、人物谱系与上下级关系 |
| 鱼骨图 | mind_ishikawa_left | 问题根因分析、故障诊断、复盘归因、原因排查与改进方向分析 |
| 时间轴 | mind_timeline_h | 项目阶段规划、任务时间安排、里程碑梳理、事件发展过程与成长历程回顾 |
| 树形图 | mind_tree_free | 项目任务拆解、WBS 工作分解 |
| 树形表格 / 表格图 | mind_treeTable_left_title | 多方案对比分析、产品参数清单、层级数据表、分类汇总与结构化信息对比 |
- 结构兜底:如果无法明确判断应使用哪一种
structure,默认传mind_free。
5. 对话式修改逻辑 (Contextual Re-creation):
- 全量生成:本项目采用全量重绘技术。当用户提出修改需求时,AI 需读取对话历史,在之前的 Markdown 基础上进行修改,生成全量且更新后的 Markdown 内容。
- 重新创建:每次修改均调用
create接口,为用户生成全新的“查看链接”和“图片链接”。
6. 调用脚本同步云端:优先使用 python3 scripts/processon_mindmap_client.py --markdown - 从标准输入读取并提交到云端;若宿主无法稳定传递 stdin,则改用 --markdown-file。对于位于项目 .agents/cache/ 或系统临时文件夹中的临时文件,脚本会自动清理;若需要强制清理任意输入文件,可额外追加 --cleanup-markdown-file。
- 执行示例:
python3 scripts/processon_mindmap_client.py --title "标题" --theme "极简黑白" --structure "mind_free" --markdown - <<'EOF'
# 核心主题
## 节点内容
EOF- PowerShell 示例:
@'
# 核心主题
## 节点内容
'@ | python scripts/processon_mindmap_client.py --title "标题" --theme "极简黑白" --structure "mind_free" --markdown -- 临时文件兜底示例(跨平台):
python3 scripts/processon_mindmap_client.py --title "标题" --theme "极简黑白" --structure "mind_free" --markdown-file ".agents/cache/mindmap-input.md" --cleanup-markdown-file7. 呈现结果:
- 必须展示 Markdown 代码块。
- 脚本返回后,必须展示“在线查看链接”和“图片链接”。
- 链接必须完整原样输出:
imgUrl和visitUrl必须输出完整的原始 URL,禁止省略、截断、折叠、缩写、替换为省略号。 - 禁止包装链接:优先直接输出裸
https://...链接,不要把长链接改写成“点这里”“查看图片”这类短文本,避免某些 Agent 或宿主截断真实地址。 - 禁止只展示前半段:即使链接很长,也必须完整保留查询参数,尤其是
poInfo、partner、partnerFlag等尾部参数不能丢失。 - 优先原样输出脚本返回的 `copyBlock`:如果脚本结果里包含
data.copyBlock,应直接原样展示该文本块,不要自行重写链接文本。 - 如果宿主支持分阶段输出,可以先展示 Markdown,再补链接;如果宿主不稳定支持中间态输出,也可以在同一条最终回复中同时展示 Markdown、在线查看链接和图片链接。
- 最终回复中应同时保留 Markdown、在线查看链接和图片链接,避免中间结果在收尾时丢失。
- 提示语:“已为您生成了最新的思维导图,您可以点击链接查看编辑或继续在对话中要求修改内容、结构、主题。”
processon-mindmap-generator
用 ProcessOn 生成精美、可继续编辑的思维导图,支持自然语言、长文本和 Markdown 内容。
安装与首要配置
1. 安装技能
npx skills add https://github.com/processonai/processon-skills.git --skill processon-mindmap-generator更新技能
npx skills add https://github.com/processonai/processon-skills.git --skill processon-mindmap-generator --force -g -y支持的场景
- 头脑风暴
- 任务拆解
- 问题分析
- 工作总结
- 读书笔记
- 课程梳理
- 写作提纲
- 会议记录
- 知识管理
支持的结构
mind_free:思维导图 / 中心放射 / 默认结构mind_right:逻辑图 / 向右延伸mind_org:组织结构图mind_ishikawa_left:鱼骨图mind_timeline_h:时间轴mind_tree_free:树形图mind_treeTable_left_title:树形表格 / 表格图
如果无法明确判断应使用哪一种结构,默认使用 mind_free。
提示词示例
生成一份《国富论》读书笔记思维导图,突出核心观点、关键概念和阅读收获围绕“开一家咖啡店”做头脑风暴,输出适合创业讨论的思维导图根据这份会议纪要整理思维导图,突出结论、待办和责任人把这篇长文整理成学习笔记型思维导图,保持层级清晰,内容精简输出
- Markdown 形式的思维导图正文
- 图片链接
- 在线查看链接
本地开发
如果你想在本地迭代这个 skill,而不是从 GitHub 安装,可以把 skill 目录放到本地 skills 目录,例如:
~/.agents/skills/processon-mindmap-generatorimport os
import sys
import json
import argparse
import urllib.request
import urllib.error
import re
import tempfile
import uuid
TRANSFORM_MD_API_URL = "https://smart.processon.com/v1/api/transform/md"
SKILL_NAME = "processon-mindmap-generator"
SKILL_ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
PARTNER_FLAG_DIR = os.path.join(os.path.expanduser("~"), ".processon", "partner_flags")
PARTNER_FLAG_PATH = os.path.join(PARTNER_FLAG_DIR, f"{SKILL_NAME}.json")
SKILL_PARTNER_FLAG_PATH = os.path.join(SKILL_ROOT_DIR, ".partner_flag.json")
def get_local_version():
"""从同级目录的 SKILL.md 中解析版本号"""
try:
# 脚本在 scripts 目录下,SKILL.md 在上一级
skill_path = os.path.join(os.path.dirname(__file__), "..", "SKILL.md")
if os.path.exists(skill_path):
with open(skill_path, 'r', encoding='utf-8') as f:
content = f.read()
# 同时兼容 version: 1.2.3 与 version: "1.2.3"
match = re.search(r'version:\s*["\']?([^\s"\']+)["\']?', content)
if match:
return match.group(1)
except:
pass
return "unknown"
def normalize_partner_flag(partner_flag):
if not isinstance(partner_flag, str):
return None
partner_flag = partner_flag.strip()
if not partner_flag:
return None
target_prefix = "skill_mind_official_"
# 如果已经符合完整的目标前缀,直接返回
if partner_flag.startswith(target_prefix):
return partner_flag
# 如果以旧的通用前缀开头,提取后缀并重新拼接
if partner_flag.startswith("skill_"):
core = partner_flag[len("skill_"):]
if core:
return f"{target_prefix}{core}"
# 否则直接拼接目标前缀
return f"{target_prefix}{partner_flag}"
def load_partner_flag_from_path(file_path):
try:
with open(file_path, "r", encoding="utf-8") as f:
data = json.load(f)
if isinstance(data, dict):
return normalize_partner_flag(data.get("partnerFlag"))
except Exception:
pass
return None
def load_partner_flag():
for file_path in (PARTNER_FLAG_PATH, SKILL_PARTNER_FLAG_PATH):
partner_flag = load_partner_flag_from_path(file_path)
if partner_flag:
return partner_flag
return None
def save_partner_flag_to_path(file_path, partner_flag):
try:
os.makedirs(os.path.dirname(file_path), exist_ok=True)
with open(file_path, "w", encoding="utf-8") as f:
json.dump({"partnerFlag": partner_flag}, f, ensure_ascii=False, indent=2)
return True
except Exception:
return False
def save_partner_flag(partner_flag):
for file_path in (PARTNER_FLAG_PATH, SKILL_PARTNER_FLAG_PATH):
if save_partner_flag_to_path(file_path, partner_flag):
return True
return False
def build_partner_flag():
return f"skill_mind_official_{uuid.uuid4()}"
def get_or_create_partner_flag():
partner_flag = normalize_partner_flag(load_partner_flag())
if partner_flag:
save_partner_flag(partner_flag)
return partner_flag
partner_flag = build_partner_flag()
save_partner_flag(partner_flag)
return partner_flag
# 允许的结构列表 (与 SKILL.md 对照表严格一致)
ALLOWED_STRUCTURES = [
"mind_free", "mind_right", "mind_org", "mind_ishikawa_left",
"mind_timeline_h", "mind_tree_free", "mind_treeTable_left_title"
]
def load_theme_presets():
"""从同级 JSON 文件加载主题映射。"""
try:
theme_path = os.path.join(os.path.dirname(__file__), "theme_presets.json")
with open(theme_path, "r", encoding="utf-8") as f:
data = json.load(f)
if isinstance(data, dict):
return data
except Exception:
pass
return {}
THEME_PRESETS = load_theme_presets()
def resolve_theme(theme_arg):
"""优先按主题名称映射;未知主题时不传 theme 字段。"""
if not theme_arg:
return None
normalized = theme_arg.strip()
if not normalized:
return None
if normalized in THEME_PRESETS:
return THEME_PRESETS[normalized]
# 向后兼容:如果调用方仍传入 JSON 字符串,则继续支持
try:
parsed = json.loads(normalized)
if isinstance(parsed, dict):
return parsed
except Exception:
pass
return None
def read_markdown_file(file_path):
candidate_path = os.path.abspath(os.path.expanduser(file_path))
with open(candidate_path, "r", encoding="utf-8") as f:
return f.read(), candidate_path
def resolve_markdown_input(markdown_arg=None, markdown_file_arg=None):
"""兼容 stdin、显式文件输入,以及误传本地文件路径的场景。"""
if markdown_file_arg:
return read_markdown_file(markdown_file_arg)
if markdown_arg == '-':
return sys.stdin.read(), None
candidate_path = os.path.expanduser(markdown_arg)
if os.path.isfile(candidate_path):
try:
return read_markdown_file(candidate_path)
except Exception:
pass
return markdown_arg, None
def cleanup_markdown_file(file_path):
if not file_path:
return None
try:
os.remove(file_path)
return None
except FileNotFoundError:
return None
except Exception as exc:
return str(exc)
def is_agents_cache_path(file_path):
parts = os.path.normpath(file_path).split(os.sep)
for index in range(len(parts) - 1):
if parts[index] == ".agents" and parts[index + 1] == "cache":
return True
return False
def is_system_temp_path(file_path):
temp_dir = os.path.abspath(tempfile.gettempdir())
candidate_path = os.path.abspath(file_path)
try:
return os.path.commonpath([candidate_path, temp_dir]) == temp_dir
except ValueError:
return False
def should_auto_cleanup_markdown_file(file_path):
if not file_path:
return False
return is_agents_cache_path(file_path) or is_system_temp_path(file_path)
def enrich_result_with_link_artifacts(result, title):
data = result.get("data") if isinstance(result, dict) else None
if not isinstance(data, dict):
return result
img_url = data.get("imgUrl", "")
visit_url = data.get("visitUrl", "")
if not isinstance(img_url, str):
img_url = ""
if not isinstance(visit_url, str):
visit_url = ""
if not img_url and not visit_url:
return result
copy_block = "\n".join([
"图片原始链接(完整复制整行):",
img_url,
"",
"编辑查看原始链接(完整复制整行):",
visit_url,
])
data["rawImgUrl"] = img_url
data["rawVisitUrl"] = visit_url
data["copyBlock"] = copy_block
return result
def main():
CURRENT_VERSION = get_local_version()
partner_flag = get_or_create_partner_flag()
parser = argparse.ArgumentParser(description='ProcessOn Mindmap API Client')
parser.add_argument('--version', action='version', version=f'%(prog)s {CURRENT_VERSION}')
parser.add_argument('--title', required=True, help='Mindmap title')
input_group = parser.add_mutually_exclusive_group(required=True)
input_group.add_argument('--markdown', help='Markdown content or "-" to read from stdin')
input_group.add_argument('--markdown-file', help='Path to a local Markdown file')
parser.add_argument('--cleanup-markdown-file', action='store_true', help='Force-delete the file passed via --markdown-file after processing')
parser.add_argument('--theme', help='Theme name or theme JSON string')
parser.add_argument('--structure', help='Structure type')
args = parser.parse_args()
if args.cleanup_markdown_file and not args.markdown_file:
parser.error('--cleanup-markdown-file must be used together with --markdown-file')
markdown_content, resolved_markdown_file = resolve_markdown_input(
markdown_arg=args.markdown,
markdown_file_arg=args.markdown_file,
)
cleanup_target = None
if resolved_markdown_file and (args.cleanup_markdown_file or should_auto_cleanup_markdown_file(resolved_markdown_file)):
cleanup_target = resolved_markdown_file
# 结构合法性校验与默认值回退
structure = args.structure
if structure not in ALLOWED_STRUCTURES:
structure = "mind_free"
headers = {'Content-Type': 'application/json'}
payload = {
"title": args.title,
"markdown": markdown_content,
"structure": structure,
"source": "skill_all_mind_official"
}
# 处理主题名称或主题 JSON;未知主题时不传 theme 字段
theme_config = resolve_theme(args.theme)
if theme_config is not None:
payload["theme"] = theme_config
if partner_flag:
payload["partnerFlag"] = partner_flag
output_payload = None
exit_code = 0
cleanup_warning = None
try:
data = json.dumps(payload, ensure_ascii=False).encode("utf-8")
req = urllib.request.Request(TRANSFORM_MD_API_URL, data=data, headers=headers, method='POST')
with urllib.request.urlopen(req, timeout=120) as response:
result = json.loads(response.read().decode('utf-8'))
result = enrich_result_with_link_artifacts(result, args.title)
# 仅注入版本信息供 AI 参考,不再进行云端比对
result["_client_version"] = CURRENT_VERSION
output_payload = result
except Exception as e:
output_payload = {"success": False, "error": str(e), "_client_version": CURRENT_VERSION}
exit_code = 1
finally:
cleanup_warning = cleanup_markdown_file(cleanup_target)
if isinstance(output_payload, dict) and cleanup_warning:
output_payload["_cleanup_warning"] = cleanup_warning
print(json.dumps(output_payload, ensure_ascii=False))
if exit_code:
sys.exit(exit_code)
if __name__ == "__main__":
main()
{
"现代活力": {"background":"#ffffff","version":"v6.1.1","common":{"bold":false,"italic":false,"textAlign":"left"},"connectionStyle":{"lineWidth":2,"lineColor":"#28292D","lineType":"dashed"},"summaryTopic":{"font-size":"14px","summaryLineColor":"#28292D","summaryLineWidth":2,"summaryLineType":"curve_complex"},"boundaryStyle":{"lineColor":"#28292D","lineWidth":2,"lineType":1,"dasharray":"6,3","fill":"#28292D","opacity":"0.1"},"centerTopic":{"font-size":30,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"rectangle","background":"#28292D","border-width":2,"text-align":"center","border-color":"#28292D","font-weight":"bold"},"secTopic":{"font-size":18,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"rectangle","background":"autoColor","border-width":2,"border-color":"autoColor"},"childTopic":{"font-size":14,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"rectangle","background":"autoColor","border-width":2,"border-color":"autoColor","childBgOpacity":"0.16"},"autoColor":true,"colorList":["#EC662D","#90C43C","#F3CF4F","#366AE5"],"skeletonId":"treeTable_top_title","colorCardId":"dynamic-collision","colorMinorId":"mind-style1"},
"复古单色": {"background":"#E6EAFF","version":"v6.1.1","common":{"bold":false,"italic":false,"textAlign":"left"},"connectionStyle":{"lineWidth":2,"lineColor":"#342850","lineType":"dashed"},"summaryTopic":{"font-size":"14px","summaryLineColor":"#342850","summaryLineWidth":2,"summaryLineType":"curve_complex"},"boundaryStyle":{"lineColor":"#342850","lineWidth":2,"lineType":2,"dasharray":"6,3","fill":"#342850","opacity":"0.1"},"centerTopic":{"font-size":30,"lineStyle":{"lineType":"curve","lineWidth":3},"shape":"radiansRectangle","background":"#342850","border-color":"#342850","font-weight":"bold"},"secTopic":{"font-size":18,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"radiansRectangle","background":"#7249D2","border-color":"#342850"},"childTopic":{"font-size":14,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"underline","border-width":2,"border-color":"#342850","childBgOpacity":"0.16","anticipateBackground":"#7249D2"},"w1":1,"w2":12,"skeletonId":"mindmap_curve_green-default","colorCardId":"xuancai","colorMinorId":"mind-style6"},
"极简黑白": {"background":"#ffffff","version":"v6.1.1","common":{"bold":false,"italic":false,"textAlign":"left"},"connectionStyle":{"lineWidth":2,"lineColor":"#30304D","lineType":"dashed"},"summaryTopic":{"font-size":"14px","summaryLineColor":"#30304D","summaryLineWidth":2,"summaryLineType":"curve_complex"},"boundaryStyle":{"lineColor":"#30304D","lineWidth":2,"lineType":2,"dasharray":"6,3","fill":"#30304D","opacity":"0.1"},"centerTopic":{"font-size":30,"lineStyle":{"lineType":"curve","lineWidth":3},"shape":"radiansRectangle","background":"#30304D","border-color":"#30304D","font-weight":"bold"},"secTopic":{"font-size":18,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"radiansRectangle","background":"#F3F3F4","border-color":"#30304D"},"childTopic":{"font-size":14,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"underline","border-width":2,"border-color":"#30304D","anticipateBackground":"#F3F3F4"},"w1":1,"w2":12,"skeletonId":"mindmap_curve_green-default","colorCardId":"system","colorMinorId":"mind-style4"},
"柔和雅韵": {"background":"#FBFCF2","version":"v6.1.1","common":{"bold":false,"italic":false,"textAlign":"left"},"connectionStyle":{"lineWidth":2,"lineColor":"#3D707A","lineType":"dashed"},"summaryTopic":{"font-size":"14px","summaryLineColor":"#3D707A","summaryLineWidth":2,"summaryLineType":"curve_complex"},"boundaryStyle":{"lineColor":"#3D707A","lineWidth":2,"lineType":2,"dasharray":"6,3","fill":"#3D707A","opacity":"0.1"},"centerTopic":{"font-size":30,"lineStyle":{"lineType":"curve","lineWidth":3},"shape":"radiansRectangle","background":"#3D707A","border-color":"#3D707A","font-weight":"bold"},"secTopic":{"font-size":18,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"radiansRectangle","background":"#E3D0BA","border-color":"#3D707A"},"childTopic":{"font-size":14,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"underline","border-width":2,"border-color":"#3D707A","childBgOpacity":"0.5","anticipateBackground":"#E3D0BA"},"w1":1,"w2":12,"skeletonId":"mindmap_curve_green-default","colorCardId":"soft-rhyme","colorMinorId":"mind-style6"},
"暗夜极光": {"background":"#342850","version":"v6.1.1","common":{"bold":false,"italic":false,"textAlign":"left"},"connectionStyle":{"lineWidth":2,"lineColor":"#FEFEFE","lineType":"dashed"},"summaryTopic":{"font-size":"14px","summaryLineColor":"#FEFEFE","summaryLineWidth":2,"summaryLineType":"curve_complex"},"boundaryStyle":{"lineColor":"#FEFEFE","lineWidth":2,"lineType":2,"dasharray":"6,3","fill":"#FEFEFE","opacity":"0.1"},"centerTopic":{"font-size":30,"lineStyle":{"lineType":"curve","lineWidth":3},"shape":"radiansRectangle","background":"#FEFEFE","border-color":"#FEFEFE","font-weight":"bold"},"secTopic":{"font-size":18,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"radiansRectangle","background":"autoColor","border-color":"autoColor"},"childTopic":{"font-size":14,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"underline","border-width":2,"border-color":"autoColor","childBgOpacity":"0.16","anticipateBackground":"autoColor"},"w1":1,"w2":12,"autoColor":true,"colorList":["#53cd92","#5BB9F9","#6164CF","#78CCDE"],"skeletonId":"mindmap_curve_green-default","colorCardId":"system","colorMinorId":"mind-style7"},
"浪漫治愈": {"background":"#FFFFFF","version":"v6.1.1","common":{"bold":false,"italic":false,"textAlign":"left"},"connectionStyle":{"lineWidth":2,"lineColor":"#FD6BBD","lineType":"dashed"},"summaryTopic":{"font-size":"14px","summaryLineColor":"#FD6BBD","summaryLineWidth":2,"summaryLineType":"curve_complex"},"boundaryStyle":{"lineColor":"#FD6BBD","lineWidth":2,"lineType":2,"dasharray":"6,3","fill":"#FD6BBD","opacity":"0.1"},"centerTopic":{"font-size":30,"lineStyle":{"lineType":"curve","lineWidth":3},"shape":"radiansRectangle","background":"#FD6BBD","border-color":"#FD6BBD","font-weight":"bold"},"secTopic":{"font-size":18,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"radiansRectangle","background":"#FAE335","border-color":"#FD6BBD"},"childTopic":{"font-size":14,"lineStyle":{"lineType":"roundBroken","lineWidth":2},"shape":"underline","border-width":2,"border-color":"#FD6BBD","childBgOpacity":"0.3","anticipateBackground":"#FAE335"},"w1":1,"w2":12,"skeletonId":"mindmap_curve_green-default","colorCardId":"romantic-sakura","colorMinorId":"mind-style6"}
}
{
"version": "1.1.16"
}
{
"version": "1.1.10"
}
Related skills
FAQ
What does processon-mindmap-generator do?
processon-mindmap-generator is a Claude Code skill for ai & agent building. It helps developers move faster with AI-assisted coding.
When should I use processon-mindmap-generator?
When you need to helps with ai & agent building tasks, or when processon-mindmap-generator is a claude code skill for ai & agent building. it helps developers move faster with ai-assisted coding.
What are the main capabilities?
processon-mindmap-generator; AI & Agent Building; AI-coding skill.