ARTICLE · INTELLIGENCE

战地情报 · 详情页

来自尧图项目组的一线实战观察与深度解析

GPT-Image2-Skill 数据可视化提示词画廊实战:5 个图表类 Prompt 逐条拆解与 CLI 复现指南

GPT-Image2-Skill 数据可视化提示词画廊实战:5 个图表类 Prompt 逐条拆解与 CLI 复现指南 AI 技能媒体生成AI 应用【免费下载链接】GPT-Image2-SkillGPT Image 2/2.5 prompt gallery, image prompt library, agentic skill, and CLI for OpenAI image generation/editing项目地址https://gitcode.com/gh_mirrors/gp/GPT-Image2-Skill点击查看免费下载导读本文聚焦 GPT-Image2-Skill 仓库中 gallery-data-visualization.md 这一分类画廊文件完整拆解其中收录的 5 条数据可视化Data Visualization精选提示词No. 108–112小型倍数气候网格、科研协作网络图、能量流弦图、预算矩形树图与农业产量分级统计图。文章不仅逐条保留提示词原文还会结合 craft.md 中的数据可视化 mini-schema、cli.py 的尺寸快捷键与参数校验逻辑以及 test_cli.py 的离线契约测试说明如何将画廊提示词直接交给gpt-imageCLI 落地为真实图片。读完本文你将掌握数据可视化类提示词的结构化写作范式、5 条精选案例的可复用模板以及从提示词到命令行生成的全流程操作。一、画廊定位数据可视化分类在 Reference Gallery 中的角色GPT-Image2-Skill 仓库内置了一个按类别拆分的 Reference Gallery参考画廊。入口索引 gallery.md 明确规定不要默认加载全部类别文件而是先根据请求匹配最接近的分类再只读取对应一个gallery-*.md文件跨类别混合需求最多读取 2–3 个相邻文件。每个分类文件包含该切片的具体提示词、直接图片预览、图片路径、元数据与来源标注。gallery-data-visualization.md 正是其中的 Data Visualization分类文件编号区间No. 108–112条目数量5 条元数据统一标注为Curated仓库创建、整理或实质性改写的条目区别于外部来源条目使用的Author Source标注文件开头明确提示Load this file only when the request matches this category. For cross-cutting writing rules, pair it withcraft.md.——即只有请求匹配数据可视化类别时才加载本文件跨领域的通用写作规则需要配合 craft.md 一起使用。换句话说这 5 条提示词不是孤立的文案而是仓库gallery-first工作流Image 2 模型路径下先查画廊、再按需补充 craft 规则中的一份可直接引用的分类资产。二、先掌握通用范式craft.md 中的数据可视化 mini-schema在逐条阅读案例之前先理解支撑这 5 条提示词的设计范式。craft.md 第 5 节Research/data figures need diagram grammar给出了数据可视化提示词的 mini-schema覆盖 No. 107–111 区域可提炼为五步先命名图表族chart familysmall-multiples grid、network graph、chord diagram、treemap、geographic choropleth——先定图表类型再谈细节指定画布与结构4×3网格、节点分组、缎带分组、嵌套矩形、地图分区给出精确标签面板名、图例值、单位、坐标轴标签必须逐字写清说明视觉编码visual encoding折线 温度、柱条 降水量、缎带厚度 ∝ 流量、颜色 类别/区域/数值要求一致性与编辑风格重复面板之间保持一致的坐标轴与对齐白底、充足边距、克制配色、publication-grade级标签。再叠加 craft.md 的通用铁律所有画面内文字都要放进引号…第 1 节、画布与布局放在主体之前第 2 节、负向约束要短而准第 14 节。下面 5 条案例正是这套范式的完整落地读它们时应反过来对照每条提示词分别覆盖了 mini-schema 的哪一步。三、No. 108 · 小型倍数气候网格Small Multiples Climate Grid元数据图片docs/data-visualization/small-multiples-climate-grid.png元数据Data Visualization ·wide·2048x1152· Curatedwide正是 CLI 中的尺寸快捷键之一见 cli.py 的SIZE_SHORTCUTSwide展开为2048x1152。也就是说这条提示词的画布取向在 CLI 侧已有对应参数不需要在提示词里写像素值。完整提示词Produce a clean editorial data visualization poster showing a 4x3 small-multiples grid of monthly climate charts for 12 fictional cities. Use a white background, generous margins, and a restrained palette of navy, rust, sky blue, olive, and charcoal. Each mini-panel should contain a temperature line and precipitation bars with consistent axes and ultra-legible labels. Include a title block with the in-image text Annual Climate Profiles and subtitle 12 Cities, 2025. Label panels Northport, Solmere, Aster Bay, Ridgefall, Halcyon, Verdin, Glass Harbor, Red Mesa, Moonfield, Lake Arden, Cinder Point, and Juniper. Use month labels J F M A M J J A S O N D and axis labels Temp °C and Rain mm. Add numeric legend values 0, 10, 20, 30, and 100. Keep the composition highly structured, scientifically clear, and visually elegant, with crisp typography, aligned scales, and publication-grade chart rendering.结构拆解这条提示词是小型倍数small multiples的教科书级写法先定图表族与画布结构4x3 small-multiples grid … for 12 fictional cities——4×3 网格与 12 个城市一一对应结构性信息最先给出视觉编码temperature line and precipitation bars温度用折线、降水用柱条是典型的双通道编码一致性约束consistent axes and ultra-legible labels、aligned scales——小倍数图的核心价值就在于跨面板的可比性提示词对此反复强调精确文本标题块Annual Climate Profiles、副标题12 Cities, 2025、12 个面板名、月份缩写J F M A M J J A S O N D、坐标轴Temp °C与Rain mm、图例数值0…100全部逐字写入引号没有任何留给模型自由发挥的文字风格收束editorial data visualization、white background、restrained palette、publication-grade——把风格锚定在编辑型数据新闻而非通用信息图。四、No. 109 · 科研协作网络图Network Graph Collaboration Map元数据图片docs/data-visualization/network-graph-collaboration-map.png元数据Data Visualization ·landscape·1536x1024· Curatedlandscape快捷键在 CLI 中展开为1536x1024cli.py。完整提示词Generate a sophisticated network graph visualization on a dark charcoal canvas showing collaborations across a fictional research consortium called ORBIT GRID. Use glowing node colors in teal, amber, coral, pale blue, and white, with fine connecting lines and clean labels. The composition should be balanced, readable, and intentionally designed rather than random. Include a title in crisp text reading ORBIT GRID Collaboration Network and a legend with Institute, Lab, Project, and Advisory. Show approximately 36 nodes, with larger hubs labeled Helix Center, Nova Lab, Aster Institute, Cinder Bio, and Polar Systems. Add edge labels sparingly, such as shared data, joint grant, and coauthor. Include a right-side stats card reading Nodes 36, Edges 92, and Density 0.146. Emphasize clean hierarchy, accurate node-label placement, anti-overlap spacing, subtle depth, and crisp typography suited for a polished technical visualization generated by gpt-image-2.结构拆解网络图类提示词的关键在于对抗随机感模型默认容易画成一团乱麻所以提示词用大量约束去限定画布基调dark charcoal canvas 一组发光节点色teal、amber、coral、pale blue、white颜色与底色的对比关系明确明确要求有设计而非随机balanced, readable, and intentionally designed rather than random——这是针对模型默认行为的直接纠偏节点规模与枢纽标注约 36 个节点其中 5 个大型枢纽给出具体名字Helix Center、Nova Lab等避免节点标签随机生成边标签克制使用sparingly, such as shared data, joint grant, and coauthor——连边的语义标签只给 3 个示例词统计卡片右侧Nodes 36、Edges 92、Density 0.146是虚构但自洽的网络统计量为画面提供数据可信度布局质量词anti-overlap spacing、subtle depth、crisp typography——针对网络图最容易翻车的地方标签重叠、层次扁平逐一设防。五、No. 110 · 能量流弦图Chord Diagram of Energy Flows元数据图片docs/data-visualization/chord-diagram-energy-flows.png元数据Data Visualization ·square·1024x1024· Curatedsquare在 CLI 中展开为1024x1024是 cli.py 中默认的方形画布快捷键。完整提示词Create a publication-quality chord diagram visualizing fictional regional energy flows in 2025. Use a bright ivory background with a centered circular composition and a harmonious palette of cobalt, teal, ochre, coral, plum, and graphite. The diagram should feel mathematically precise, with clean arcs, semi-transparent ribbons, and highly legible labels. Add a title block with the in-image text Regional Energy Exchange and subtitle TWh, 2025. Label outer segments North, South, East, West, Coastal, and Grid Reserve. Include a small legend reading Hydro, Solar, Wind, and Storage. Place tiny numeric ticks around the ring at 0, 50, 100, and 150. Use ribbon thickness to imply volume, but keep the composition readable and elegant. Prioritize crisp labels, clear hierarchy, accurate geometry, balanced white space, and a refined>Design a modern treemap infographic showing a fictional company budget allocation for LUMEN BIO in fiscal year 2026. Use a light neutral background and a controlled palette of forest green, desaturated blue, amber, terracotta, lavender-gray, and charcoal outlines. The composition should be a clean rectangular treemap with strong visual grouping and crisp typography. Include a header with the in-image text LUMEN BIO Budget Allocation and FY 2026. Major blocks should be labeled RD 38%, Manufacturing 22%, Clinical 14%, Operations 10%, Marketing 7%, IT 5%, and Legal 4%. Within some blocks, add smaller labels like Prototypes, Reagents, QA, Cloud, and Field Trials. Include a compact side legend reading Total Budget $84.0M. Ensure the chart has precise edges, balanced annotation density, clean hierarchy, and sharp text rendering suitable for a technical gallery prompt.结构拆解矩形树图treemap的本质是嵌套矩形的面积编码提示词的写作重点因此放在分层标签上层级化标签体系一级块标签给出精确百分比RD 38%、Manufacturing 22%、Clinical 14%、Operations 10%、Marketing 7%、IT 5%、Legal 4%合计恰好 100%虚构数据自洽二级块标签如Prototypes、Reagents、QA、Cloud、Field Trials作为细分项视觉分组strong visual groupingcharcoal outlines——用描边强化矩形之间的嵌套关系侧边图例Total Budget $84.0M给出总预算锚点让百分比有量纲可依版式质量precise edges、balanced annotation density、sharp text rendering——矩形树图最容易出现的注释密度失衡被显式点名约束。七、No. 112 · 农业产量分级统计图Geographic Choropleth Yield Map元数据图片docs/data-visualization/geographic-choropleth-harvest-yield.png元数据Data Visualization ·wide·2048x1152· Curated完整提示词Produce a polished geographic choropleth map infographic of a fictional agricultural region called the Solterra Basin, showing harvest yield by district. Use a minimalist cartographic style on an off-white background with muted terrain hints and a sequential palette from pale sand to deep green. The map should include 14 clearly separated districts with clean borders, crisp labels, and a right-side legend. Include in-image text: Solterra Basin Harvest Yield, 2025, and legend title tons / hectare. Label districts with names such as North Vale, Riverbend, Copper Plain, East Orchard, and Cinder Ridge. Include legend values 1.2, 2.4, 3.6, 4.8, and 6.0. Add a compact annotation box reading Highest yield: East Orchard 5.8 and Lowest yield: Dry Steppe 1.4. Prioritize clean typography, accurate map-like geometry, balanced composition, subtle cartographic detail, and publication-grade infographic clarity.结构拆解分级统计图choropleth map是五条中唯一的地图类案例提示词围绕制图学可信度展开制图风格锚定minimalist cartographic style、muted terrain hints、subtle cartographic detail——强调像一张专业地图而非插画式示意图顺序配色sequential palettepale sand to deep green——从浅到深表达数值递增符合分级统计图的语义惯例分区与边界14 个清晰分离的区、干净边界、右侧图例并给图例标题tons / hectare单位随数值给出数值体系图例刻度1.2/2.4/3.6/4.8/6.0等距递增注释框给出极值Highest yield: East Orchard 5.8与Lowest yield: Dry Steppe 1.4让地图有分析结论而不仅是色块地图几何accurate map-like geometry——对虚构区域的形状提出合理性要求。八、实战落地用 gpt-image CLI 复现这 5 条提示词画廊提示词本身是提示词资产真正让它们变成图片的是仓库打包的gpt-imageCLI。以下按 SKILL.md 与 cli.py 的约定说明完整调用链。8.1 前置条件与模型选择运行环境Python 3.11并具备gpt-image、uv或uvx三者之一见 SKILL.md 头部兼容性说明凭证CLI 按进程环境变量 →./.env→~/.env的顺序读取OPENAI_API_KEY且不覆盖已存在的环境变量cli.py 的_load_env_chain实现未设置密钥时直接以退出码 2 报错退出模型选择CLI 默认模型是gpt-image-2cli.py 的DEFAULT_MODEL但 SKILL.md 要求 Agent必须显式传递解析后的--model可选值见 models.md选择API 模型 ID典型用途Flaregpt-image-2.5-flare快速常规生成Sunburstgpt-image-2.5-sunburst精细编辑与细节敏感任务Image 2gpt-image-2既有工作流与兼容性需求注意不存在裸gpt-image-2.5API 别名test_cli.py 中的test_default_preserved_and_models_not_rewritten还验证了模型 ID 不会被解析过程改写。8.2 尺寸、质量与画布对应关系五条画廊元数据中的wide/landscape/square并非装饰它们与 CLI 的尺寸快捷键一一对应cli.py快捷键展开尺寸本文对应案例square1024x1024No. 110 弦图landscape1536x1024No. 109 网络图、No. 111 矩形树图wide2048x1152No. 108 气候网格、No. 112 分级统计图除快捷键外--size也接受WIDTHxHEIGHT字面量但必须满足 models.md 与 cli.py 的校验两边均为 16 的倍数、最长边 ≤3840、宽高比 ≤3:1、总像素介于 655,360 与 8,294,400 之间。test_size_constraintstest_cli.py对合法与非法尺寸都做了离线断言。--quality默认highcli.py这正是 README 中这组画廊图片标注的生成质量2.5 模型额外支持xhigh/max但 SKILL.md 建议按成本与任务权衡预算敏感场景不要自动拉高。8.3 生成命令模板以 No. 108wide 画布为例复制画廊提示词后即可直接执行gpt-image --model gpt-image-2.5-flare \ -p Produce a clean editorial data visualization poster showing a 4x3 small-multiples grid of monthly climate charts for 12 fictional cities. ... \ --size wide --quality high -f climate-grid.png其余案例只需替换-p的提示词并调整--size# No. 109 / No. 111landscape 画布 gpt-image --model gpt-image-2.5-flare -p Network Graph / Treemap 提示词 --size landscape --quality high -f out.png # No. 110square 画布 gpt-image --model gpt-image-2.5-flare -p Chord Diagram 提示词 --size square --quality high -f out.png # No. 112wide 画布 gpt-image --model gpt-image-2.5-flare -p Choropleth 提示词 --size wide --quality high -f out.png-f省略时CLI 会自动生成YYYY-MM-DD-HH-MM-SS-slug.ext文件名若当前目录存在fig/子目录则写入其中cli.py 的default_output_path。8.4 底层调用链与端点路由无-i参数 →client.images.generate(...)→POST /v1/images/generations带一个或多个-i→client.images.edit(...)→POST /v1/images/edits多参考编辑-i-m→ edits 端点的掩码局部重绘inpaint。该路由逻辑实现在 cli.pycall_edit(client, args) if args.image else call_generate(client, args)端点路径由 test_cli.py 的test_main_output_and_endpoint_routing离线断言。客户端以max_retries0构建避免对可能计费的生成请求做隐藏重试API 错误以退出码 1 原样回显到 stderr参数错误或密钥缺失以退出码 2 终止。8.5 启动器解析链generate.py仓库同时提供了 scripts/generate.py 作为技能启动器其解析顺序为仓库/插件完整布局导入src/gpt_image_cli/cli.py已安装的gpt_image_cli包直接导入环境中存在gpt-image可执行文件委派给它最终兜底uvx/uv tool run --from 仓库临时安装运行。因此无论是直接调用gpt-image还是通过uv run $SKILL_DIR/scripts/generate.py最终都会落到同一个 CLI 实现——画廊提示词在两种入口下行为一致。九、进阶从画廊提示词反推你自己的数据可视化 Prompt这 5 条案例的价值在于它们是可以迁移的结构模板。提炼其共同骨架即可为任意虚构数据集编写同质量提示词第一句 图表族 画布 主题chart family visualization of fictional subject如a treemap infographic showing … budget allocation第二段 背景与配色底色white / ivory / dark charcoal / off-white 明确的克制配色清单禁止模糊形容词第三段 结构细节网格行列数、节点数、分区数、缎带透明度、嵌套层级——全部量化第四段 精确文本块标题、副标题、单位、图例值、面板名逐字放入引号单位°C、mm、TWh、tons / hectare、%尽量带上第五段 编码语义与一致性ribbon thickness to imply volume、consistent axes、aligned scales收尾 风格边界与质量词editorial/data-journalism/cartographic/publication-grade必要时加一条短而准的 avoid 行如rather than generic infographic styling。关于精确文本必须用引号这一点craft.md 第 1 节有完整的规则说明所有显示文字包裹…、用户提供的中文保持逐字原样、密集文本需包含标题/副标题/图例/数字/坐标轴等全部层级并可用crisp、legible等词强化可读性。十、验证与自检清单生成数据可视化图片后建议按下述清单核对models.md 也强调成功响应不等于文字、图形正确文本正确性标题、副标题、面板名、图例数值是否与提示词逐字一致有无乱码或错拼几何正确性网格对齐、节点不重叠、缎带弧线、矩形边缘、地图分区边界是否清晰编码一致性重复面板坐标轴是否一致颜色是否严格对应语义面积/流量/数值风格边界是否落回generic infographic而非目标editorial / cartographic风格。仓库的离线测试PYTHONPATHsrc python -m unittest discover -s tests -v见 models.md 与 test_cli.py可以在不发请求的前提下验证 CLI 的参数契约真正的图片质量仍需人工查看输出文件。若你使用支持技能skill的 Agent 运行时也可直接以自然语言引用画廊条目如生成画廊里 No. 108 的气候网格图由 Agent 按 SKILL.md 的操作循环完成分类、选模、调 CLI 的完整流程——本文所拆解的 5 条提示词正是该流程中数据可视化分类的即用弹药。赞分享AI 技能媒体生成AI 应用【免费下载链接】GPT-Image2-SkillGPT Image 2/2.5 prompt gallery, image prompt library, agentic skill, and CLI for OpenAI image generation/editing项目地址https://gitcode.com/gh_mirrors/gp/GPT-Image2-Skill点击查看免费下载相关推荐GPT-Image2-Skill 实战指南GPT Image 2/2.5 提示词画廊、双 Agent Skill 与 CLI 全解析GPT Image2 Skill 实战指南GPT Image 2/2.5 提示词画廊、双 Agent Skill 与 CLI 全解析 本指南以 GPT ImaAI 技能媒体生成AI 应用GPT-Image2 工业级提示词引擎awesome-gpt-image-2 的 Prompt-as-Code 架构、案例画廊与 Agent Skill 实战指南GPT Image2 工业级提示词引擎awesome gpt image 2 的 Prompt as Code 架构、案例画廊与 Agent Skill 实战人工智能提示工程媒体生成AI 应用AI 技能GPT-Image2-Skill 实战指南GPT Image 2/2.5 提示词图库、双 Agent Skill 与 CLI 全解析GPT Image2 Skill 实战指南GPT Image 2/2.5 提示词图库、双 Agent Skill 与 CLI 全解析 本篇指南围绕开源仓库 GAI 技能媒体生成AI 应用上一篇手机号逆向查询QQ号终极指南30秒快速查询完整教程下一篇CheatSheets.zip 速查表语法变体完全指南用 Markdown 编写与贡献开发者速查手册创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
RELATED READING

延伸阅读

更多一线实战笔记与深度复盘,助您持续精进