React Design Draft
根据内容自动生成可编辑的React风格信息图设计稿,支持单图与多图模式。
下载 231
使用 Gemini 通过 Google GenAI SDK 生成或编辑图像,支持文本转图与图像修改。
openclaw skills install @ztj7728/gemini-image-generation命令、参数、文件名以原文为准
当需要根据文本提示创建一张或多张图像,或使用 Gemini 编辑一张或多张现有图像时,请使用此技能。
~/.openclaw/openclaw.json 中必须包含 $.skills.entries["gemini-image-generation"].enabled 设置为 true。~/.openclaw/openclaw.json 中必须包含 $.skills.entries["gemini-image-generation"].env,并设置以下键值: - GEMINI_API_KEY(必需)
- GEMINI_MODEL_ID(必需)
- GEMINI_BASE_URL(可选)
~/.openclaw/openclaw.json:{
......,
"skills": {
"entries": {
"gemini-image-generation": {
"enabled": true,
"env": {
"GEMINI_API_KEY": "sk-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"GEMINI_MODEL_ID": "gemini-3.1-flash-image-preview",
"GEMINI_BASE_URL": "https://custom-endpoint.com"
}
}
}
},
......
}npm install 安装依赖。--aspectRatio 和 --imageSize 参数传递。--prompt、--output 及可选的图像配置参数。--prompt、一个或多个 --input 值、--output 及可选的图像配置参数。GEMINI_API_KEY 获取 API 密钥,从 GEMINI_MODEL_ID 获取模型 ID。GEMINI_BASE_URL 读取自定义端点地址。MEDIA:<image_path>(例如:MEDIA:outputs/gemini-native-image.png),以便在对话中内联显示图像。node ./skills/gemini-image-generation/scripts/generate-image.mjs --prompt "Create a picture of a nano banana dish in a fancy restaurant with a Gemini theme" --output "outputs/gemini-native-image.png"node ./skills/gemini-image-generation/scripts/generate-image.mjs --prompt "Create a wide cinematic food photo of a nano banana dish in a fancy restaurant with a Gemini theme" --output "outputs/gemini-wide.png" --aspectRatio "16:9" --imageSize "2K"node ./skills/gemini-image-generation/scripts/edit-image.mjs --prompt "Turn this cat into a watercolor illustration eating a nano-banana in a fancy restaurant under the Gemini constellation" --input "inputs/cat.png" --output "outputs/cat-watercolor.png" --aspectRatio "5:4" --imageSize "2K"node ./skills/gemini-image-generation/scripts/edit-image.mjs --prompt "Create an office group photo of these people making funny faces" --input "inputs/person-1.jpg" --input "inputs/person-2.jpg" --input "inputs/person-3.jpg" --output "outputs/group-photo.png"TEXT: 行用于模型文本响应,以及 IMAGE: 行用于每个保存的文件。MEDIA:<path>,确保图像能在对话中内联显示,同时附带文件路径。name-1.png、name-2.png 等形式。edit-image.mjs 支持重复使用 --input 参数。也可将多个输入路径以逗号分隔,传入单个 --input 参数。edit-image.mjs 会根据 .png、.jpg、.jpeg 或 .webp 后缀推断源文件的 MIME 类型。可使用一个 --mime-type 适用于所有输入,或为每个 --input 重复指定 --mime-type 以一一对应。--aspectRatio 和 --imageSize 参数,也接受连字符形式 --aspect-ratio 和 --image-size。config.imageConfig。已收录 1 个 Skill