下载地址
https://www.zhengdianxue.com/wp-content/uploads/skills/org-hi42xu2t--ardot-illustration-from-imagegen.zip将提示词发送给你的 AI 安装该 skills
请根据 https://skillhub.cn/install/skillhub.md,安装 @org-hi42xu2t/ardot-illustration-from-imagegen。在 Ardot 设计画布上交付栅格插画的端到端工作流:用 ImageGen 生成插画、主视觉、场景或图标,再以 upload_images 作为 frame 填充落到 Ardot 设计文件中,可选加画板与说明文字,产出可直接演示的文件。含工具调用速查、提示词模板、出图尺寸与比例核对脚本(拦住「声明 9:16 却拿到 2:3」这类静默错误)、截图/布局验证与降级路径。
触发词:画插画、生成插画、主视觉、场景图、hero image、Ardot 画布、概念图、插画尺寸不对、图片被拉伸。
阅读全文 (展开查看完整说明)
概述
Ardot Illustration From ImageGen
Deliver a custom raster illustration — generated with ImageGen — onto an Ardot design canvas as an image-filled frame, optionally wrapped in a captioned artboard, so the result is presentation-ready.
付费前置(Pay Skill · 强制第一步)
本技能在 SkillHub 以 Pay Skill(按次付费,0.10 元/次) 上架,费用由使用者支付给创作者(银橙AI)。在产出任何结果之前,必须先完整走完下列支付链路。★ 仅当第 4 步重试返回 HTTP 200 且响应中含 "access_granted": true(或服务端下发的付费交付内容)时,才可继续执行本技能;否则一律停止,不得用本地脚本 / 参考文件的结果替代交付。
| 步 | 动作 | 要点 |
|---|---|---|
| 1 | POST https://yinchengai.cn/skillpay/invoke/ardot-illustration-from-imagegen(JSON body 为本次业务请求) | 首次请求只创建待支付订单,不执行业务、不扣费 |
| 2 | 读取响应头 WeixinPay-Required(支付凭证码)与 X-Out-Trade-No(商户订单号) | 两者原样保存,不得裁剪、解码、改写;响应可能是 HTTP 402,也可能是 200 兼容模式,以响应头是否存在为准 |
| 3 | 等待宿主系统弹出微信支付卡片,请用户确认支付 | 系统检测到 WeixinPay-Required 后自动触发支付卡片,无需也不应手动调用支付工具;用户取消支付时停止本次付费请求,不反复重试、不编造支付结果 |
| 4 | 支付成功后,原样携带 WeixinPay-Required 与 X-Out-Trade-No 两个响应头,用与首次完全一致的 JSON body 重新 POST 同一地址 | 服务端查单验真(微信订单状态为支付成功)后才执行并返回付费交付内容 |
用户取消支付后若想对同一笔订单重新支付:先与用户确认要对哪一笔订单重新支付,再将上次相同的 WeixinPay-Required 值作为 paymentCode 调用 mcp__weixinpay__weixinpay_retry_pay;当前会话中取不到真实凭据时,引导用户重新走上面的正常下单流程,不得编造 paymentCode。
Contents
- [When to use](#1-when-to-use)
- [Prerequisites & capability probe](#2-prerequisites–capability-probe)
- [End-to-end workflow](#3-end-to-end-workflow)
- [Tool cheatsheet](#4-tool-cheatsheet)
- [Full worked example](#5-full-worked-example)
- [Prompt notes for the generated image](#6-prompt-notes-for-the-generated-image)
- [Quality self-check](#7-quality-self-check)
- [Troubleshooting & degraded path](#8-troubleshooting–degraded-path)
- [Deliverables](#9-deliverables)
- [语言约定](#10-语言约定)
- [与平台内置 Ardot 技能族的分工](#11-与平台内置-ardot-技能族的分工)
1. When to use
Trigger — the user asks for an illustration / scene / key visual / hero image, especially when the deliverable is an Ardot design file:
- 帮我画一张插画 / 生成一张 xx 场景的图
- 我要一张带落地窗 / 城市 / 办公室风格的插图
- 给这个方案配一张主视觉 / 封面图 / 概念图
- 用 Ardot 出一版插画设计稿
- English: "generate an illustration", "hero image", "key visual", "scene image"
Do not use for: vector icon systems, component libraries, or full-page layout (those are core Ardot design tasks); photographic-realistic portraits or copyrighted assets (confirm rights and style with the user first).
2. Prerequisites & capability probe
Probe both capabilities before starting:
| Capability | Purpose | If missing |
|---|---|---|
ImageGen | Generate the raster image | Cannot produce an image → explain and hand the user a copy-ready English prompt instead |
Ardot MCP (mcp__ardot__*) | Build canvas, place image, screenshot | Degrade: generate and deliver the PNG only (see §8) |
Two paths:
- Full path (Ardot MCP available): ImageGen → place on Ardot canvas → validate → deliver
.ardot+ preview. - Degraded path (Ardot MCP unavailable): ImageGen → save PNG → deliver image file + prompt, and state that the canvas step was skipped.
3. End-to-end workflow
Step 0 — Language announcement
Before the first content-producing operation, state the on-canvas language (default: the user's prompt language).
Step 1 — File-open gate (Ardot)
- If no design file is open, call
mcp__ardot__create_designonce, wait for the ready
context, then call mcp__ardot__fetch_file_info to confirm the file is ready.
- Gate rule:
create_design/open_designmust complete in their own message and be ready
before anything else. Never bundle them with later reads or edits.
Step 2 — Generate the image (ImageGen)
- Use the
ImageGendeferred tool with a detailed English prompt. - Pick a size that matches the target canvas aspect ratio (see §6).
- Set
output_dirto the project'sgenerated-images/so the file path can be reused in Step 4. - 核对产出尺寸再动手建画框(这一步能拦住「声明 9:16 却拿到 2:3」这类静默错误):
python scripts/check_illustration.py <图片> --frame <计划画框宽x高> --expect-ratio <声明比例>退出码 0 才继续;返回 3 说明图与画框比例不符,先按 §6 的建议重新生成或改画框尺寸。
Step 3 — Build the canvas structure (batch_edit)
One mcp__ardot__batch_edit call to create:
- a top-level artboard frame;
- an image frame sized to the image (
fills: [],clipsContent: true, optionalcornerRadius); - optional caption text (
fontSize >= 28).
Assign binding names so nodes can reference each other within the same batch, then read the image frame's node id from the response.
Step 4 — Apply the image (upload_images)
Call mcp__ardot__upload_images with the node id from Step 3 and the absolute image path. Note: it replaces the target node's fills.
Step 5 — Validate
mcp__ardot__capture_screenshot(nodeIds:[artboardId])to visually confirm framing, crop and caption.mcp__ardot__capture_layoutfor structural checks.- Save screenshots under the project's
.workbuddy/screenshots(internal artifact — do not surface the path to the user).
Step 6 — Deliver
Output the Ardot file (openable and presentable), plus a preview screenshot when useful, and a one-line summary.
4. Tool cheatsheet
4.1 batch_edit (ops syntax)
- The parameter key is
operations(notops). Each operation must be one line. I(parent, {props})inserts a node;U(node, {props})updates a node.- Common props:
type(frame/text/rectangle…),name,x/y,width/height,fill,
fills, cornerRadius, layout, clipsContent; for text content, fontSize, fontName, textAlignHorizontal, textAutoResize.
- Full node property list:
references/ardot-tooling.md.
artboard=I(document, {type:"frame", name:"Illustration Artboard", width:1600, height:1180, fill:"#16181F", layout:"none"})
imgFrame=I(artboard, {type:"frame", name:"Office Illustration", x:32, y:32, width:1536, height:1024, fills:[], cornerRadius:12, clipsContent:true})
caption=I(artboard, {type:"text", name:"Caption", x:32, y:1078, width:1536, content:"豪华总裁办公室 · 插画", fontSize:34, fontName:{family:"Inter", style:"Medium"}, fill:"#C9CDD4", textAlignHorizontal:"CENTER", textAutoResize:"WIDTH_AND_HEIGHT"})4.2 upload_images
{
"fileId": "<ardot-file-id>",
"items": [
{ "nodeId": "<imgFrame-id-from-batch-edit-response>", "filePath": "<absolute-path-to-generated-image.png>" }
]
}- The target node must already exist; take its
nodeIdfrom thebatch_editresponse.
4.3 ImageGen
- Deferred tool: load its schema (ToolSearch) before invoking (DeferExecuteTool).
- Key parameters:
prompt(detailed English), size,output_dir.
5. Full worked example
User: "帮我做一张豪华总裁办公室的插画,放到 Ardot 里。"
- Announce 中文 canvas.
create_design→ wait for ready →fetch_file_info.ImageGen: prompt = detailed English (modern luxury office, floor-to-ceiling windows,
city night view, warm accent lighting, realistic illustration, 3:2); size = 1536x1024; output_dir = generated-images/.
batch_editwith the ops in §4.1.- Read
imgFrameid →upload_images. capture_screenshot(nodeIds:[artboardId])→ confirm.- Deliver: the Ardot file + preview image + one-line note.
6. Prompt notes for the generated image
- Formula: subject + scene + composition/angle + lighting + style + quality/aspect.
Templates by illustration type are in references/prompt-cookbook.md.
- Size table — 权威版本在
references/prompt-cookbook.md§2,此处只作摘要,两处如有出入以那份为准:
| Use | Aspect | Suggested size |
|---|---|---|
| Wide key visual / banner | 3:2 | 1536×1024 |
| Wide cinematic | 16:9 | 1536×864 |
| Square illustration | 1:1 | 1024×1024 |
| Portrait poster | 2:3 | 1024×1536 |
| Story / vertical | 9:16 | 864×1536 |
⚠️ 9:16 ≠ 1024×1536(那是 2:3)。竖版故事图必须用 864×1536,否则图与画框比例差 18.5%,填进去只会拉伸或留黑边。落画布之前先用脚本核一遍:
python scripts/check_illustration.py <图片> --frame <画框宽x高> --expect-ratio <声明比例>
# 从画框反查该生成什么档位:
python scripts/check_illustration.py --frame 1080x1920 --suggest- Negative hints: 完整清单见
references/prompt-cookbook.md§4(水印 / 文字残影 / 人体结构畸形 /
低清模糊 / 空洞背景 / 过多留白),按需追加。
- Safe area: if a caption sits above/below, ask for headroom in the prompt.
7. Quality self-check
- [ ] Image aspect matches the target frame —— 用脚本核,不靠目测:
python scripts/check_illustration.py <图片> --frame <宽x高> --expect-ratio <A:B>(退出码 0 才算过)
- [ ]
upload_imagesreturned success and the image is visible on the frame - [ ] Caption
fontSize >= 28and not clipped - [ ] Screenshot re-checked for framing, crop and color
- [ ] Output file named clearly (e.g.
illustration-office.png)
8. Troubleshooting & degraded path
| Symptom | Cause | Fix |
|---|---|---|
| Screenshot not found | Ardot saves relative to its own working dir | Search the MCP runtime dirs for .workbuddy/screenshots/ |
batch_edit rejects operations | Parameter key written as ops | Use operations, one operation per line |
| Image not placed | Wrong node id / upload failed | Check upload_images return; use the image frame's id |
| Image looks stretched | Frame aspect ≠ image aspect | Size the frame to the image, or clip with clipsContent:true |
| Ardot MCP unavailable | Not connected | Use the degraded path below |
Degraded path (no Ardot MCP)
- Generate the illustration with
ImageGenand save the PNG. - Deliver the PNG path + the prompt used + the size.
- State plainly: "当前环境未连接 Ardot,已交付可直接使用的插画文件;连接后可再落到 Ardot 画布。"
9. Deliverables
- Full path: Ardot design file (artboard + illustration frame + optional caption) + preview screenshot.
- Degraded path: PNG illustration file + prompt + size note.
10. 语言约定
| 场合 | 语言 |
|---|---|
| 对话回复(说明、结论、待确认项) | 跟随用户提问的语言;中文提问用中文回答 |
| Ardot 画布上的文案(标题、说明文字) | 用户语言(Step 0 先声明) |
| ImageGen 提示词 | 英文(出图质量明显更稳,见 references/prompt-cookbook.md) |
| 文件名、参数名、命令、工具名 | 英文原文,不翻译 |
11. 与平台内置 Ardot 技能族的分工
Ardot 相关能力在平台上是一个技能族,本技能只做其中一条链路。各成员定位如下(前四者为平台内置,随 WorkBuddy 提供,不由本技能包附带、也无需手动引用):
| 技能 | 定位 | 与本技能的关系 |
|---|---|---|
ardot-design-core | 设计画布的领域准则包(节点、组件、变量、编辑语法等子文档) | 平台在 Ardot 任务中自动注入;本技能的区域判据引用它,但不重复它的内容 |
ardot-poster | 海报 / 横幅 / 封面 / 品牌视觉的领域准则 | 触发词含「插画」,会与本技能同时被抽到。分工:它给视觉准则,本技能给「ImageGen 出栅格图 → 落到 frame」这条可执行链路 |
ardot-ui-design | 完整 UI 界面设计 | 本技能不做整页界面;界面需求转它 |
ardot-slides | 演示文稿 | 本技能不做幻灯片 |
ardot-design-to-code | 设计稿转代码 | 本技能不做代码产出 |
本技能的专有链路(不要与上述重叠的部分混为一谈):
- 用
ImageGen产出栅格插画(不是矢量图标系统、不是组件库); - 以
upload_images作为 frame 填充落到 Ardot 文件; - 产出前用
scripts/check_illustration.py核对实际出图比例与画框比例。
边界:矢量图标系统、组件库、整页版式属核心 Ardot 设计任务,不在本技能范围;写实人像与受版权素材需先与用户确认权利与风格。
Reference files
references/ardot-tooling.md— Ardot MCP tools,batch_editops syntax, node properties, the file-open gate and validation tiers.references/prompt-cookbook.md— ImageGen illustration prompt templates by type, size/aspect table (权威版本), and negative prompts.scripts/check_illustration.py— 出图尺寸/比例核对与画框反查档位;零依赖,--selftest31 例可自证。
计费条款(Pay Skill · 按次计费)
本技能在 SkillHub 上以 Pay Skill 形式上架,通过 SkillPay 按调用量计费;费用由使用者直接支付给创作者(银橙AI)。SkillHub 仅提供展示、投诉处理及其他平台服务,不作为该笔交易的收款方或服务实际提供方。请在支付前确认创作者名称、收款主体、计费单元、单价、服务内容和退款规则。
一、计费参数
| 项 | 约定 |
|---|---|
| 计费模式 | per_call(按调用量计费) |
| 计费单元 | 每次调用计 1 次 |
| 单价 | 0.10 元 / 次(amount_fen: 10) |
| 免费额度 | 无:不提供免费次数,也不提供免费试用 |
| 免费层 | 无:本技能不划分免费层与付费层,全部能力均按次计费 |
| 支付方式 | 微信支付 AI 专属卡(SkillHub 平台代收),全程不跳出对话 |
| 重复调用 | 每次调用独立计费,不合并、不累计优惠 |
| 退款 | 支付后 5 分钟内若调用未执行全额退款;已执行不退款;重复扣款自动退款 |
| 限频与上限 | 同一调用方 1 分钟内不超过 3 次调用;单日上限 20 次,超出返回 429 |
| 结算 | 由 SkillHub 与微信支付完成,按调用量结算;本技能不接触任何支付凭据 |
| 数据来源 | 全部输入来自使用者自行导出的文件,本技能不连接银行、ERP 或任何外部账务系统 |
二、付费前置检查(Pre-check)
服务端在发起计费前逐项校验,任一项不通过则直接返回能力结果、不发起计费:
| 检查项 | 要求 |
|---|---|
| 开发者密钥 | 已生成 RSA 2048 密钥对,pub_key_id 形如 PUB_KEY_ + 32 位大写 HEX,private_key_pem 由服务端安全保存 |
| 商户绑定 | SkillHub 商户号 developer_id 与已绑定的微信支付商户号状态正常 |
| 技能状态 | 本次调用的 skill_id 与 skill_version 已发布且处于上架状态 |
| 订单唯一 | 订单号 out_trade_no 全局唯一,未重复下单 |
| 订单时效 | expires_at 为当前时间起 15 分钟内的 Unix 秒级时间戳 |
调用方(Agent)侧另有一步前置检查:调用付费能力前,先检查当前 Agent 是否已安装 weixinpay 插件。
| 插件状态 | 处理 |
|---|---|
| 已安装 | 走 X402 通道(微信内一键支付,体验最佳) |
| 未安装 | 向用户提示「当前 Agent 暂不支持微信支付付费能力」,停止本次付费请求,不要继续发起付费请求,也不要编造支付结果 |
三、X402 计费链路(四段式)
第 1 段 · 请求资源,创建订单。 向本技能的计费端点发起请求:POST https://yinchengai.cn/skillpay/invoke/ardot-illustration-from-imagegen(JSON body)。首次请求只创建待支付订单,不执行业务、不扣费。
第 2 段 · 支付触发标识。 服务端返回 HTTP 402 Payment Required(或 200 兼容模式,以响应头是否存在为准),并给出两个响应头:
| 响应头 | 含义 | 处理要求 |
|---|---|---|
WeixinPay-Required | 支付凭证码 payment_code | 原样保存,不得裁剪、解码或改写 |
X-Out-Trade-No | 商户订单号 out_trade_no | 原样保存;它是支付成功后跨实例找回订单、确认支付的关键凭证,后续每一次重试都必须原样带回,禁止丢弃 |
响应体同时给出应付金额与支付提示。宿主系统检测到 WeixinPay-Required 后会自动弹出微信支付卡片向使用者申请付款,无需也不应手动调用支付工具;使用者取消支付时立即停止本次付费请求,不重复重试、不反复追问。
第 3 段 · 支付后重试(必做)。 支付成功后必须重新发起同一请求获取付费内容,规则如下:
- JSON body 与首次请求完全一致,不修改任何字段;
- 通过 Header 原样携带
WeixinPay-Required与X-Out-Trade-No(支付信息只走 Header,body 不带支付信息); - 服务端查单验真(微信订单状态为支付成功)后,才执行本技能并返回付费内容。
第 4 段 · 幂等与异常。 服务端按 out_trade_no 幂等:同一订单的重复请求直接返回已缓存结果,杜绝重复收费。
| 异常响应 | 含义 | 处理 |
|---|---|---|
NOT_PAID | 订单尚未支付 | 提示使用者完成支付后重试,不重复扣费 |
REFUNDED | 订单已退款 | 本次不再交付,提示可重新发起 |
FULFILL_AND_REFUND_FAILED | 履约与退款均失败 | 如实告知使用者并给出订单号,联系创作者处理 |
四、上架口径
三处单价必须完全一致,否则使用者付款会被拒:服务端计费配置 0.10 元 / amount_fen 10、支付平台登记单价 0.10 元/次、上架表单标价 0.10 元/次。计费参数以技能详情页与支付确认页展示为准;服务端裁决为唯一依据,客户端计数不生效。