Image to Prompt
Analyze images and generate detailed, reproduction-quality prompts for AI image generation.
Workflow
Step 1: Category Detection
First, classify the image into one of these categories:
- -
portrait — People as main subject (photos, artwork, digital art) - INLINECODE1 — Natural scenery, cityscapes, architecture, outdoor environments
- INLINECODE2 — Commercial product photos, merchandise
- INLINECODE3 — Animals as main subject
- INLINECODE4 — Diagrams, infographics, UI mockups, technical drawings
- INLINECODE5 — Images that don't fit above categories
Step 2: Category-Specific Analysis
Generate a detailed prompt based on the detected category.
Usage
Basic Analysis
CODEBLOCK0
Specify Output Format
Natural Language (default):
CODEBLOCK1
Structured JSON:
CODEBLOCK2
With Dimensions Extraction
Request dimension highlights to get tagged phrases for each visual aspect:
CODEBLOCK3
Category-Specific Elements
Portrait Analysis Covers:
- - Model/Style: Photography type, quality level, visual style
- Subject: Gender, age, ethnicity, skin tone, body type
- Facial Features: Eyes, lips, face shape, expression
- Hair: Color, length, style, part
- Pose: Body position, orientation, leg/hand positions, gaze
- Clothing: Type, color, pattern, fit, material, style
- Accessories: Jewelry, bags, hats, etc.
- Environment: Location, ground, background, atmosphere
- Lighting: Type, time of day, shadows, contrast, color temperature
- Camera: Angle, height, shot type, lens, depth of field, perspective
- Technical: Realism, post-processing, resolution
Landscape Analysis Covers:
- - Terrain and water features
- Sky and atmospheric elements
- Foreground/background composition
- Natural lighting and atmosphere
- Color palette and photography style
Product Analysis Covers:
- - Product features and materials
- Design elements and shape
- Staging and background
- Studio lighting setup
- Commercial photography style
Animal Analysis Covers:
- - Species identification and markings
- Pose and behavior
- Expression and character
- Habitat and setting
- Wildlife/pet photography style
Illustration Analysis Covers:
- - Diagram type (flowchart, infographic, UI, etc.)
- Visual elements (icons, shapes, connectors)
- Layout and hierarchy
- Design style (flat, isometric, etc.)
- Color scheme and meaning
Output Examples
Natural Language Output (Portrait)
CODEBLOCK4
Structured Output (Portrait)
CODEBLOCK5
With Dimensions
CODEBLOCK6
Tips for Best Results
- 1. High-resolution images produce more detailed prompts
- Clear, well-lit images yield better category detection
- Request structured output when you need programmatic access to individual elements
- Use dimensions extraction when building prompt databases or training data
- Specify word count expectations for natural language output if needed
Integration
This skill works with any vision-capable model. For best results, use:
- - GPT-4 Vision
- Claude 3 (Opus/Sonnet)
- Gemini Pro Vision
图像转提示词
分析图像并生成详细、可复现的AI图像生成提示词。
工作流程
步骤1:类别检测
首先,将图像归入以下类别之一:
- - 人像 — 以人物为主体(照片、艺术作品、数字艺术)
- 风景 — 自然风光、城市景观、建筑、户外环境
- 产品 — 商业产品照片、商品
- 动物 — 以动物为主体
- 插画 — 图表、信息图、UI模型、技术图纸
- 其他 — 不符合上述类别的图像
步骤2:类别特定分析
根据检测到的类别生成详细的提示词。
使用方法
基础分析
bash
分析图像(自动检测类别)
openclaw message send --image /path/to/image.jpg 分析此图像并生成用于复现的详细提示词
指定输出格式
自然语言(默认):
分析此图像并编写详细、流畅的提示词描述(人像600-1000字,其他类别400-600字)。
结构化JSON:
分析此图像并输出结构化JSON描述,将所有视觉元素分类。
带维度提取
请求维度高亮,获取每个视觉方面的标记短语:
使用维度提取分析此图像。标记以下方面的短语:背景、物体、角色、风格、动作、颜色、情绪、光照、构图、主题。
类别特定元素
人像分析涵盖:
- - 模特/风格:摄影类型、质量等级、视觉风格
- 主体:性别、年龄、种族、肤色、体型
- 面部特征:眼睛、嘴唇、脸型、表情
- 发型:颜色、长度、风格、分线
- 姿势:身体位置、朝向、腿/手位置、视线方向
- 服装:类型、颜色、图案、版型、材质、风格
- 配饰:珠宝、包包、帽子等
- 环境:地点、地面、背景、氛围
- 光照:类型、时间段、阴影、对比度、色温
- 相机:角度、高度、景别、镜头、景深、透视
- 技术:写实度、后期处理、分辨率
风景分析涵盖:
- - 地形和水体特征
- 天空和大气元素
- 前景/背景构图
- 自然光照和氛围
- 色调和摄影风格
产品分析涵盖:
- - 产品特征和材质
- 设计元素和形状
- 布景和背景
- 影棚灯光设置
- 商业摄影风格
动物分析涵盖:
- - 物种识别和斑纹
- 姿势和行为
- 表情和特征
- 栖息地和环境
- 野生动物/宠物摄影风格
插画分析涵盖:
- - 图表类型(流程图、信息图、UI等)
- 视觉元素(图标、形状、连接线)
- 布局和层级
- 设计风格(扁平、等距等)
- 配色方案和含义
输出示例
自然语言输出(人像)
json
{
prompt: 一位令人惊艳的超写实人像,年轻女性,25岁左右,拥有白皙瓷器般带暖粉色底调的肌肤。她有着引人注目的祖母绿杏仁眼,配以浓密黑色睫毛,饱满的玫瑰色嘴唇微扬,露出自信的微笑,鹅蛋脸配以高颧骨...
}
结构化输出(人像)
json
{
structured: {
model: 超写实,
quality: 超高,
style: 电影感自然光摄影,
subject: {
identity: 年轻美丽女性,
gender: 女性,
age: 25岁左右,
ethnicity: 欧洲人,
skin_tone: 白皙瓷器肌带粉色底调,
body_type: 苗条健美,
facial_features: {
eyes: 祖母绿色,杏仁形,目光专注,
lips: 饱满,玫瑰粉,微笑含蓄,
face_shape: 鹅蛋脸配高颧骨,
expression: 自信而宁静
},
hair: {
color: 暖蜜金色,
length: 长,
style: 柔顺波浪,
part: 中分
}
},
pose: {
position: 站立,
body_orientation: 四分之三侧身朝向镜头,
legs: 重心在右腿,姿态放松,
hands: {
right_hand: 搭在臀部,
left_hand: 自然垂于身侧
},
gaze: 直视镜头
},
clothing: {
type: 飘逸长裙,
color: 灰粉色,
pattern: 纯色,
details: V领,收腰设计,丝绸材质,
style: 浪漫女性化
},
accessories: [精致金项链, 小圈耳环],
environment: {
location: 户外花园,
ground: 鹅卵石小径,
background: 盛开的玫瑰,柔和的虚化效果,
atmosphere: 梦幻而浪漫
},
lighting: {
type: 自然阳光,
time: 黄金时刻,
shadow_quality: 柔和漫射阴影,
contrast: 中等,
color_temperature: 暖色
},
camera: {
angle: 略低于视线水平,
camera_height: 胸部高度,
shot_type: 中景,
lens: 85mm,
depth
offield: 浅景深,
perspective: 轻微压缩,显瘦效果
},
mood: 浪漫、自信、空灵,
realism: 高度写实,
post_processing: 柔和调色,微妙光晕,
resolution: 8k
}
}
带维度输出
json
{
prompt: ...,
dimensions: {
backgrounds: [户外花园, 盛开的玫瑰, 柔和虚化效果],
objects: [精致金项链, 小圈耳环],
characters: [年轻美丽女性, 25岁左右, 欧洲人],
styles: [超写实, 电影感自然光摄影],
actions: [站立, 四分之三侧身, 直视镜头],
colors: [灰粉色, 蜜金色, 祖母绿色],
moods: [浪漫, 自信, 空灵, 梦幻],
lighting: [黄金时刻, 自然阳光, 柔和漫射阴影],
compositions: [中景, 85mm, 浅景深],
themes: [浪漫女性化, 人像摄影]
}
}
最佳实践提示
- 1. 高分辨率图像可生成更详细的提示词
- 清晰、光线充足的图像可获得更好的类别检测效果
- 需要程序化访问单个元素时,请请求结构化输出
- 构建提示词数据库或训练数据时,使用维度提取
- 需要时,为自然语言输出指定字数要求
集成
此技能适用于任何具备视觉能力的模型。为获得最佳效果,请使用:
- - GPT-4 Vision
- Claude 3(Opus/Sonnet)
- Gemini Pro Vision