关于 superimage-generator
这是一项将基础图像提示词转换为结构化、适配特定模型的增强提示词的技能。它引导图像生成用户依次澄清意图、选择模型、验证并整理格式,也涵盖参考图工作流。
主要功能
- 01生成前澄清图像意图
- 02选择模型并采用对应架构
- 03构建结构化提示词并支持参考图
- 04格式整理前验证提示词
- 05将提示词转换为模型输入格式
适用场景
- 01把简短图像构想扩展为详细提示词
- 02根据主体和风格选择模型
- 03使用参考图时保留身份特征
- 04将提示词发送给模型前检查结构
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ bluebagai/ skills --skill superimage-generator安装后在 Claude Code 中输入/superimage-generator确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
examples/asian-bar-candid-dreamy.jsonbackyard-lounger.jsonbalcony-flash-selfie.jsonbeach-cabana-turquoise-bikini.jsonbedroom-floral-sleepwear.jsonblack-athleisure-thumbs-up.jsonbrand-concept-object-editorial-template.jsonbrand-social-collage-campaign-template.jsonbw-window-portrait.jsoncafe-sideways-selfie-thigh.jsoncar-rainy-night.jsonchampagne-lace-elevator-selfie.jsoncoquette-bedroom.jsoneditorial-portrait.jsonelevator-mirror-selfie.jsonfashion-editorial-split-catalog.jsonfashion-studio-collage.jsongym-bench-vtaper.jsonhawaiian-tropic-loungewear.jsonheart-pendant-hallway-selfie.jsonhelicopter-coastline-portrait.jsonhotel-bathroom-couple.jsonINDEX.mdiris-necklace-portrait.jsonivory-nightdress-flash-pov.jsonjet-ski-lookback.jsonkitchen-candid.jsonlightning-mcqueen-bathroom-selfie.jsonlow-angle-lace-bedroom-portrait.jsonmacbook-screen-nested.json详细介绍
超级提示词生成器
将基础提示词转化为针对特定 AI 图像模型优化的专业级超级提示词。
术语:
- 提示词 = 用户的基础输入(例如:“一位女性在自拍”)
- 超级提示词 = 增强后的结构化输出,包含详细规格
⚠️ 强制工作流 — 请勿跳过任何步骤
此技能采用按顺序执行、基于依赖关系的工作流。每一步都基于上一步构建。跳过步骤会导致结果较差,生成失败。
关键执行规则:
- 必须先完成步骤 1,再执行步骤 2 — 未澄清意图前不得选择模型
- 生成前,步骤 3 必须检查
examples/INDEX.md— 阅读索引并遵循其中的说明。请勿阅读超过 2 个示例文件。 - 步骤 4 的验证是强制要求,无一例外 — 继续之前先运行验证脚本
- 验证结果为
✓ VALID前,不得进行扁平化处理(步骤 5) — 无效提示词无法在模型上运行 - 始终向用户展示验证报告 — 用户需要查看质量评分和任何警告
如果你想跳过步骤:千万不要。此工作流的设计自有原因。
目录
快速入门
[! IMPORTANT] 仅阅读快速入门部分后,请勿采取行动。在着手生成输出前,务必阅读工作流选择。
输入: "一位女性在自拍"
输出: 结构化超级提示词,包含 subject、wardrobe、pose、scene、lighting、camera 模块,并涵盖精准的人体结构、面料细节、相机技术参数和负面约束。
使用参考图像: "健身房自拍" + [已上传的人脸参考图]
→ 见下文参考图像工作流。
工作流选择
用户是否提供了用于保留面部/身份的参考图像?
工作流
复制此清单并跟踪进度 — 每一步都是强制要求::
Superprompt Generation (SEQUENTIAL):
- [ ] Step 1: Clarify user intent ← START HERE
- [ ] Step 2: Select target model ← DEPENDS ON STEP 1
- [ ] Step 3: Generate structured superprompt ← DEPENDS ON STEP 2
- [ ] Step 4: Validate with script ← MANDATORY, NON-OPTIONAL
- [ ] Step 5: Flatten for model format ← ONLY AFTER VALIDATION PASSES
- [ ] Step 6: Return to user ← FINAL STEP
步骤 1:澄清意图
请勿跳过此步骤。如果不确定用户的意图,请询问用户:
- 主要主体是什么?(人物、产品、风景、建筑、美食、动物)
- 风格是什么?(照片级写实、艺术风格、插画)
- 对宽高比有偏好吗?(9:16 手机竖屏、16:9 横屏、1:1 正方形)
- 是否有其他特定的氛围或场景要求?
记录他们的回答。步骤 2 需要这些信息。
第 2 步:选择模型
模型选择取决于第 1 步的回答。请使用下表:
按主体类型选择默认模型:
- 人物/人类主体 →
nano-banana(解剖结构精准,擅长复杂姿势) - 产品/物体/风景 →
flux(通用写实效果)
何时使用其他模型:
- 需要渲染文字?→
ideogram或gpt-image-1.5 - 需要保留面部特征/身份?→
flux-kontext-max - 需要艺术/审美风格?→
midjourney - 需要视频/动态效果?→
luma - 需要迭代编辑?→
gpt-image-1.5
| 模型 | 最适合用途 | 模板 |
|---|---|---|
nano-banana | 默认(人物) - 解剖结构精准,擅长姿势 | models/nano-banana.md |
flux | 默认(非人物) - 通用写实效果 | models/flux.md |
flux-kontext-max | 图像编辑,保留身份特征 | models/flux-kontext-max.md |
gpt-image-1.5 | 基于推理,UI 模型图,徽标 | models/gpt-image-1.5.md |
seedream-4.5 | 自然语言,图像中的文字,4K | models/seedream-4.5.md |
midjourney | 审美品质,艺术风格 | models/midjourney.md |
ideogram | 字体排版,徽标 | models/ideogram.md |
recraft | 插画,矢量图 | models/recraft.md |
luma | 视频,3D,动态效果 | models/luma.md |
reve | 艺术风格 | models/reve.md |
grok-imagine | 快速迭代 | models/grok-imagine.md |
**不确定该使用哪个模型时:**询问用户主体类型(人物还是物体/场景)和所需风格,然后采用上述默认模型。
步骤 3:生成超级提示词
生成前:
- 打开
examples/INDEX.md - 按照其中的说明操作——阅读一个通用示例和一个匹配类别的示例
- 将它们用作结构参考,不要照抄
考虑视角:
- 如果用户的请求暗示了情绪、张力、规模或叙事,请查看
resources/perspectives.md,了解能增强图像效果的视角 - 如果用户已指定镜头角度,请遵照指定角度
- 默认情况下,不要强行在每个提示词中采用不同寻常的视角。如果没有特别要求,标准的平视角度即可
然后使用与你选择的模型相匹配的架构。
警告 -- 输出格式: 生成的 JSON 顶层只能包含超级提示词字段。不要将这些字段包在
superprompt键中。不要包含name、description、input_prompt、target_model、model_adaptations、flattened_prompt、color_palette或playbook_principles_applied等元数据键。examples/目录中的示例文件仅为文档说明而包含这些包装字段——验证器会直接检查顶层的超级提示词内容。如果包含包装键,验证将失败,因为验证器无法在 JSON 根级找到必需字段。
根据主题选择 prompt_type:
portrait— 人物、角色,以及具有身份或表情的主体product— 物体、物品、静物、建筑collage— 多面板构图、编辑式版面
架构取决于目标模型:
- Nano-banana → 使用其专属的扁平结构(不含
prompt_type字段)。参见下方的 Nano-banana 示例。 - Luma → 使用其专属的视频结构。参见 models/luma.md。
- 所有其他模型 → 使用带
prompt_type判别字段和meta.target_model的基础架构。参见下方的人像/产品示例。
示例:人像(基础架构 — flux、midjourney、ideogram、recraft、gpt-image-1.5、seedream-4.5 等)
必需字段: prompt_type、meta、subject、wardrobe、pose_action、environment、lighting、camera_technical、realism_anchors、negative_prompt
{
"prompt_type": "portrait",
"meta": {
"quality_tier": "professional",
"aspect_ratio": "9:16",
"style": "photorealistic",
"target_model": "flux"
},
"subject": {
"description": "young woman mid-20s, honey blonde beach waves, confident smile",
"identity": {
"age_range": "mid-20s",
"type": "young woman",
"distinguishing_features": ["honey blonde beach waves", "confident smile"]
},
"physical_details": {
"skin": { "tone": "light warm", "texture": "visible pores, natural" },
"hair": {
"color": "honey blonde",
"style": "beach waves, past shoulders"
},
"face": { "expression": "confident smile", "gaze": "direct at camera" }
},
"expression_mood": "confident, relaxed"
},
"wardrobe": {
"clothing": [
{
"type": "tank top",
"material": "cotton",
"fit": "fitted",
"color": "white"
},
{ "type": "denim shorts", "fit": "high-waisted", "details": "frayed hem" }
],
"accessories": ["gold layered necklaces", "small hoop earrings"]
},
"pose_action": {
"position": "mirror selfie, phone at chest level",
"posture": "slight hip tilt"
},
"environment": {
"location": "modern apartment bedroom",
"background": ["natural light from window"],
"atmosphere": "casual, warm"
},
"lighting": {
"type": "natural",
"quality": "soft diffused",
"effects": ["window light", "subtle shadows"]
},
"camera_technical": {
"device": "iPhone 15 Pro",
"lens": "24mm wide",
"aperture": "f/2.0"
},
"realism_anchors": [
"visible skin pores",
"fabric texture",
"natural window light"
],
"negative_prompt": [
"cartoon",
"deformed",
"blurry",
"airbrushed",
"watermark",
"low quality"
]
}
示例:产品(基础架构)
必需字段: prompt_type、meta、subject、environment、lighting、camera_technical、realism_anchors、negative_prompt
{
"prompt_type": "product",
"meta": {
"quality_tier": "professional",
"aspect_ratio": "1:1",
"style": "photorealistic",
"target_model": "flux"
},
"subject": {
"description": "vintage 1970s Polaroid camera, cream and brown body, rainbow stripe",
"physical_details": {
"materials": ["plastic body", "metal accents"],
"finish": "matte with age patina"
}
},
"environment": {
"location": "weathered wooden table surface",
"background": ["soft out-of-focus bookshelf", "warm afternoon light"],
"atmosphere": "nostalgic, cozy"
},
"lighting": {
"type": "golden-hour",
"direction": "side lighting from window",
"quality": "soft warm",
"effects": ["warm highlights", "soft shadows"]
},
"camera_technical": { "lens": "50mm macro", "aperture": "f/2.8" },
"realism_anchors": [
"surface scratches",
"dust particles",
"leather texture",
"metal patina"
],
"negative_prompt": [
"blurry",
"low quality",
"oversaturated",
"artificial",
"floating",
"watermark"
]
}
示例:Nano-banana 模型
Nano-banana 使用其专属的扁平结构——无需 prompt_type 字段。
必需字段: subject(含 body)、wardrobe、scene、lighting、camera
{
"subject": {
"description": "young woman mid-20s, honey blonde beach waves, confident smile",
"body": {
"physique": "natural athletic build, hourglass figure",
"anatomy": "defined shoulders, narrow waist, curved hips",
"details": "visible skin pores, natural texture, subtle imperfections"
}
},
"wardrobe": {
"top": "white cotton tank top, fitted, subtle outline visible",
"bottom": "high-waisted denim shorts, frayed hem",
"accessories": ["gold layered necklaces", "small hoop earrings"]
},
"pose_action": {
"description": "mirror selfie, holding smartphone at chest level, slight hip tilt"
},
"scene": {
"environment": "modern apartment bedroom, natural light from window"
},
"lighting": {
"type": "soft natural",
"effects": ["diffused window light", "subtle shadows"]
},
"camera": {
"technical": "iPhone 15 Pro, 24mm wide, f/2.0",
"aspect_ratio": "9:16",
"negative_constraints": "no cartoon, no deformed, no blurry, no airbrushed, no watermark"
}
}
步骤 4:验证
# Auto-detects model from meta.target_model (defaults to nano-banana if absent)
node /skills/generating-image-superprompts/scripts/validate-prompt.js --input prompt.json
# Or specify model explicitly
node /skills/generating-image-superprompts/scripts/validate-prompt.js --input prompt.json --model flux
验证内容:按 prompt_type 和模型检查必需字段、冲突、模型专属要求以及负面提示词覆盖情况。
重要 -- 用于验证的 JSON 结构: 传递给验证脚本的 JSON 对象,必须在顶层包含提示词字段(
subject、wardrobe、scene、lighting、camera等)。examples/目录中的示例文件会将这些字段与文档元数据(name、description、model_adaptations等)一起包在superprompt键中,但验证器不需要这个包装——它要求字段位于根级。常见失败原因: 如果验证因
subject、wardrobe、scene、lighting或camera出现“必需”错误而失败,你几乎可以确定是将提示词字段包在了superprompt对象中。移除该包装,并将所有字段放到 JSON 根级。
如果验证失败:
- 仔细查看错误消息
- 检查是否误将提示词字段包在
superprompt键中,或包含了元数据键(name、description、model_adaptations等)——如果是,请移除这些内容,并将提示词字段放到根级 - 修复 JSON 中发现的问题
- 重新运行验证
- 只有验证通过后,才能继续步骤 5
重复此循环,直到状态显示 ✓ VALID。
第 5 步:展平为模型格式
将结构化 JSON 转换为模型所需的文本格式。“展平”是指将嵌套值合并为逗号分隔的字符串。
示例(Flux):
结构化 JSON:
{
"quality_prefix": "masterpiece, 8k uhd",
"subject": "young woman mid-20s, honey blonde beach waves",
"wardrobe": "white tank top, denim mini skirt",
"pose": "mirror selfie, back arch",
"lighting": "hard direct sunlight"
}
展平后的提示词(可直接用于模型):
masterpiece, 8k uhd, young woman mid-20s, honey blonde beach waves, white tank top, denim mini skirt, mirror selfie, back arch, hard direct sunlight
请参阅模型模板,了解特定模型的展平规则(某些模型,如 GPT Image 1.5,更适合使用自然语言段落,而非逗号分隔的标签)。
第 6 步:返回给用户
始终提供:
- 可直接使用的展平后提示词(可复制粘贴到模型中)
- 推荐的模型设置(guidance_scale、steps、aspect_ratio)
可选提供: 3. 结构化 JSON — 仅在用户明确提出要求,或需要稍后迭代/编辑提示词时提供
参考图工作流
当用户提供用于保留面部/身份特征的参考图时,你仍需生成完整的超级提示词 — 只需添加一个 reference 块来保留身份特征。
[! IMPORTANT] > 这并非标准工作流的替代方案。你需要遵循标准工作流,并添加参考设置。
Reference Image Generation:
- [ ] Step 1: Confirm reference image uploaded
- [ ] Step 2: Follow Standard Workflow Steps 1-3 (generate FULL superprompt)
- [ ] Step 3: Add reference block to the superprompt
- [ ] Step 4: Ensure subject.appearance.skin references the image
- [ ] Step 5: Continue with Standard Workflow Steps 4-6 (validate, flatten, return)
生成内容
你需要生成包含所有常规块(subject、wardrobe、pose、scene、lighting、camera)的完整超级提示词,并在最前面添加一个 reference 块。
参考块结构
将此块添加到完整超级提示词中:
{
"reference": {
"face_identity": "use uploaded reference image",
"identity_lock": true,
"face_accuracy": "100% identical to reference — same facial structure, proportions, skin texture, expression, and details"
}
}
完整示例(参考图 + 完整超级提示词)
{
"reference": {
"face_identity": "use uploaded reference image",
"identity_lock": true,
"face_accuracy": "100% identical to reference — same facial structure, proportions, skin texture"
},
"subject": {
"description": "young woman mid-20s, athletic build",
"body": {
"physique": "toned athletic build",
"anatomy": "defined shoulders, narrow waist",
"details": "visible skin pores, natural texture"
},
"appearance": {
"skin": {
"tone": "same as reference image",
"texture": "natural, visible pores"
},
"expression": "confident smile",
"gaze": "direct at camera"
}
},
"wardrobe": {
"top": "black sports bra, fitted",
"bottom": "high-waisted grey leggings",
"accessories": "small stud earrings"
},
"pose": "gym mirror selfie, phone at chest level, slight hip tilt",
"scene": {
"environment": "modern gym, weight racks in background",
"lighting": { "type": "overhead fluorescent", "quality": "bright, even" }
},
"lighting": {
"type": "gym fluorescent",
"effects": "even illumination, subtle shadows"
},
"camera": {
"technical": "iPhone 15 Pro, 24mm wide, f/1.8",
"aspect_ratio": "9:16",
"negative_constraints": "no cartoon, no deformed, no blurry, no face change, no identity drift"
}
}
关键参考设置
| 设置 | 用途 |
|---|---|
identity_lock: true | 防止面部特征发生偏移 |
face_accuracy: "100%" | 精确匹配面部 |
skin.tone: "same as reference" | 保留肤色特征 |
兼容参考图的模型
- Flux IP-Adapter - 最适合保留面部特征
- Flux Kontext Max - 在编辑过程中具有出色的身份特征保留能力
- GPT Image 1.5 - 在迭代编辑中可靠地保留面部和身份特征
- Seedream 4.5 - 支持最多 14 张参考图,以保持角色一致性
- Nano Banana - 对身份锁定提供强力支持
- Midjourney --cref - 角色参考标志
请参阅 examples/reference-image-gym.json 查看完整示例。
超级提示词手册
高质量提示词的核心原则。详细说明和示例请参阅 playbook.md。
7 项原则(快速参考):
- 层次化具体描述 — 描述具体,不要含糊(
"fitted burgundy velvet midi dress",而不是"wearing a dress") - 真实感锚点 — 以物理现实为基础(
visible pores、fabric weave、accurate shadows) - 相机技术术语 — 使用摄影术语(
85mm lens、f/1.8 aperture) - 负面提示词规范 — 排除质量问题、解剖错误和风格泄漏
- 空间一致性 — 清晰定义相机角度和主体位置
- 以光线讲述故事 — 黄金时段 = 温暖;正午硬光 = 鲜明;轮廓光 = 戏剧感
- 身份锁定 — 为保持角色一致性,锁定年龄、头发和体型
示例
包含输入 → 输出转换的完整示例。每个示例都包含针对多个模型调整的提示词。
各类别重点示例
参考图(从这里开始,保留身份特征):
- examples/reference-image-gym.json - 保留面部和身份特征的工作流及最佳实践
镜子自拍(最常见的用例):
- examples/nano-banana-mirror-selfie.json - 4 种变体,深入刻画解剖细节
- examples/elevator-mirror-selfie.json - 多重倒影,深夜氛围
- examples/lifestyle-selfie.json - 街边商店橱窗倒影
户外/生活方式:
- examples/backyard-bikini.json - iPhone 户外真实感,重力物理效果
- examples/jet-ski-lookback.json - 海洋金色时刻,躯干扭转姿势
- examples/tropical-beach-selfie.json - 海滩自拍视角,草帽
室内/休闲:
- examples/bedroom-prone-selfie.json - 舒适的床上自拍,粉色家居服
- examples/kitchen-candid.json - 公寓夜晚、雨中城市、混合光线
艺术/风格化:
- examples/bw-window-portrait.json - 从文本转为结构化内容,黑白电影感
- examples/streetwear-editorial-collage.json - 多面板海报,模拟与数字融合
- examples/fashion-studio-collage.json - 多姿势拼贴,同一模特呈现 6-8 种姿势
更多示例
浏览 examples/ 目录,查看更多 50 多个示例,涵盖:
- 运动/健身姿势、复杂服装、品牌商品
- 情侣、合影、双主体
- 夜间摄影、闪光灯美学、低光照
- 编辑时尚、拼贴、分割布局
- 角色/角色扮演、奇幻元素
模型模板
每种模型都有特定的提示词格式要求:
- models/flux.md - 质量标签置于开头,使用摄影术语
- models/flux-kontext-max.md - 自然语言编辑、保留条款、512 个 token 限制
- models/gpt-image-1.5.md - 自然语言、质量参数,无需质量标签
- models/seedream-4.5.md - 连贯的自然语言、简洁的提示词、将文本放在引号内
- models/nano-banana.md - 深度 JSON、解剖术语、内联负面提示词
- models/black-forest-labs.md - 详细的 BFL/Flux 指南
- models/midjourney.md - 参数(--ar、--v、--style)
- models/ideogram.md - 将文本放在引号内、魔法提示词
- models/recraft.md - 风格预设、调色板
- models/luma.md - 动作描述、镜头移动
- models/reve.md - 艺术运动参考
- models/grok-imagine.md - 自然语言,适合社交平台
验证脚本
# Validate a prompt
node /skills/generating-image-superprompts/scripts/validate-prompt.js --input prompt.json --model nano-banana
# Strict mode (warnings as errors)
node /skills/generating-image-superprompts/scripts/validate-prompt.js --input prompt.json --model nano-banana --strict
# Pipe from stdin
cat prompt.json | node /skills/generating-image-superprompts/scripts/validate-prompt.js --model nano-banana
输出包含具体性、真实感、技术性和负面提示词覆盖度的质量评分(0-100)。
纵横比参考
| 比例 | 用途 |
|---|---|
| 9:16 | 移动设备/快拍/TikTok |
| 16:9 | 桌面设备/YouTube |
| 1:1 | Instagram/个人主页 |
| 4:5 | Instagram 人像 |