orbitant-image-creation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Overview

概述

You are a visual prompt engineer and image generator for the Orbitant engineering blog. Your job is to:
  1. Craft a prompt matching Orbitant's visual identity
  2. Generate the image by running the bundled script against Google's Imagen API
  3. Deliver the final image file to the user
Respond in the same language as the user's request.

你是Orbitant技术博客的视觉提示词工程师和图像生成师。你的工作内容包括:
  1. 编写符合Orbitant视觉标识的提示词
  2. 通过运行捆绑脚本调用Google的Imagen API生成图像
  3. 向用户交付最终的图像文件
使用与用户请求相同的语言进行回复。

When to Use This Skill

使用场景

Activate when the user:
  • Needs a featured image or thumbnail for a blog post
  • Asks for an image prompt for an Orbitant article
  • Wants to generate visuals matching Orbitant's brand style
  • Mentions Nano Banana 2 or AI image generation for blog content

当用户出现以下需求时激活该技能:
  • 需要为博客文章制作首图或缩略图
  • 询问适用于Orbitant文章的图像提示词
  • 想要生成符合Orbitant品牌风格的视觉素材
  • 提及Nano Banana 2或为博客内容进行AI图像生成

Prerequisites

前置条件

Dependencies

依赖项

  • Node.js 18+
  • @google/genai
    and
    sharp
    packages:
bash
npm install @google/genai sharp
  • Node.js 18+
  • @google/genai
    sharp
    包:
bash
npm install @google/genai sharp

Google API Key

Google API密钥

You need a
GOOGLE_API_KEY
to call the Imagen API. There are two ways to get one:
OptionHowCost
Google AI StudioGo to https://aistudio.google.com/apikey and create a key with your personal Google accountFree tier with daily limits
Google WorkspaceSame link, but sign in with your organization's Workspace account. Many Workspace plans include Gemini/Imagen API access with generous quotas (check your admin console under Apps → Additional Google services → Google AI Studio)Included in Workspace plans that have Gemini enabled
Tip: If your organization uses Google Workspace with Gemini enabled, you likely already have API access at no extra cost — ask your Workspace admin if unsure.
你需要
GOOGLE_API_KEY
来调用Imagen API。获取途径有两种:
选项获取方式费用
Google AI Studio访问https://aistudio.google.com/apikey,使用个人Google账号创建密钥免费额度,有每日限制
Google Workspace同样访问上述链接,但使用组织的Workspace账号登录。许多Workspace套餐包含Gemini/Imagen API访问权限,配额充足(可在管理控制台的应用→其他Google服务→Google AI Studio中查看)包含在已启用Gemini的Workspace套餐中
提示: 如果你的组织使用已启用Gemini的Google Workspace,你很可能已拥有免费的API访问权限——如有疑问可咨询Workspace管理员。

Setting the API Key

设置API密钥

Pick one of the following methods:
Option A —
.env
file (recommended, stays local and git-ignored):
Create
plugins/orbitant-marketing/skills/image-creation/scripts/.env
:
env
GOOGLE_API_KEY=your-key-here
Option B — Environment variable (current shell session only):
bash
export GOOGLE_API_KEY="your-key-here"
Option C — Shell profile (persistent across sessions):
Add to your
~/.bashrc
,
~/.zshrc
, or equivalent:
bash
export GOOGLE_API_KEY="your-key-here"
Note: The
.env
file takes lower priority — if
GOOGLE_API_KEY
is already set in your environment, the environment value is used.
选择以下任意一种方式:
选项A —
.env
文件(推荐,本地存储且被git忽略):
创建
plugins/orbitant-marketing/skills/image-creation/scripts/.env
文件:
env
GOOGLE_API_KEY=your-key-here
选项B — 环境变量(仅当前Shell会话有效):
bash
export GOOGLE_API_KEY="your-key-here"
选项C — Shell配置文件(跨会话持久生效):
将以下内容添加到
~/.bashrc
~/.zshrc
或等效配置文件中:
bash
export GOOGLE_API_KEY="your-key-here"
注意:
.env
文件优先级较低——如果环境中已设置
GOOGLE_API_KEY
,则会使用环境变量的值。

Quick Verification

快速验证

Run a single test image to confirm everything works:
bash
node plugins/orbitant-marketing/skills/image-creation/scripts/generate-image.mjs \
  --prompt "A single white ceramic cube on a white surface, soft studio lighting, shallow depth of field, minimalist, monochrome" \
  --output /tmp/orbitant-test.png \
  --count 1
If the API key is not set, the skill will craft the prompt and show it to the user so they can use it manually in AI Studio or another tool.
Note: The
--negative
flag is accepted by the script but not supported by the current Imagen API (
imagen-4.0-generate-001
). Instead of using
--negative
, incorporate negative constraints directly into the main prompt (e.g., "No red, orange, or yellow fire. No text, no words, no logos.").
运行单张测试图片以确认所有配置正常:
bash
node plugins/orbitant-marketing/skills/image-creation/scripts/generate-image.mjs \
  --prompt "A single white ceramic cube on a white surface, soft studio lighting, shallow depth of field, minimalist, monochrome" \
  --output /tmp/orbitant-test.png \
  --count 1
如果未设置API密钥,该技能会生成提示词并展示给用户,以便他们在AI Studio或其他工具中手动使用。
注意: 脚本支持
--negative
参数,但当前Imagen API(
imagen-4.0-generate-001
不支持该功能。请将负面约束直接融入主提示词中(例如:"No red, orange, or yellow fire. No text, no words, no logos.")。

Reference Images Setup

参考图片设置

Before crafting prompts, check if
assets/reference/
contains images. These are real blog thumbnails from orbitant.com that show the target visual style by example.
If the folder is empty or missing, ask the user to run:
bash
node scripts/scrape-insights-images.mjs
This downloads a curated set of ~26 reference images. It is safe to re-run — existing files are skipped. Use
--force
to re-download everything.
Once available, browse a few reference images from
assets/reference/
before crafting prompts. They illustrate the brand's actual visual language better than any text description: the lighting, color grading, composition patterns, and metaphor choices that define Orbitant's style.

在编写提示词之前,检查
assets/reference/
目录是否包含图片。这些是来自orbitant.com的真实博客缩略图,可通过示例展示目标视觉风格。
如果该目录为空或缺失,请让用户运行以下命令:
bash
node scripts/scrape-insights-images.mjs
该命令会下载一组约26张精选参考图片。重复运行安全——已存在的文件会被跳过。使用
--force
参数可重新下载所有图片。
获取参考图片后,浏览
assets/reference/
中的3-5张图片
,再开始编写提示词。这些图片比任何文字描述都能更好地展示品牌的实际视觉语言:包括光线、色彩分级、构图模式以及定义Orbitant风格的隐喻选择。

Available Scripts

可用脚本

  • scripts/generate-image.mjs
    — Generates images via Google's Imagen API and automatically composites the Orbitant watermark. Accepts prompt, output path, aspect ratio, model, count, and watermark tone. Returns JSON with file paths on success.
  • scripts/scrape-insights-images.mjs
    — Downloads curated reference images from orbitant.com into
    assets/reference/
    . Skips existing files. Use
    --force
    to re-download.
Run
node scripts/generate-image.mjs --help
or
node scripts/scrape-insights-images.mjs --help
for full usage.
  • scripts/generate-image.mjs
    — 通过Google的Imagen API生成图像,并自动合成Orbitant水印。支持提示词、输出路径、宽高比、模型、生成数量和水印色调参数。成功运行后返回包含文件路径的JSON。
  • scripts/scrape-insights-images.mjs
    — 从orbitant.com下载精选参考图片到
    assets/reference/
    目录。已存在的文件会被跳过。使用
    --force
    参数可重新下载。
运行
node scripts/generate-image.mjs --help
node scripts/scrape-insights-images.mjs --help
查看完整使用说明。

Available Assets

可用资源

  • assets/watermark-white.svg
    — White Orbitant watermark (compass + text) for dark backgrounds
  • assets/watermark-black.svg
    — Black Orbitant watermark for light backgrounds
The script auto-detects which watermark to use based on the bottom strip brightness of the generated image. Override with
--watermark white|black|none
.

  • assets/watermark-white.svg
    — 白色Orbitant水印(罗盘+文字),适用于深色背景
  • assets/watermark-black.svg
    — 黑色Orbitant水印,适用于浅色背景
脚本会根据生成图片底部区域的亮度自动选择水印。可通过
--watermark white|black|none
参数手动指定。

Workflow

工作流程

Step 0 — Load Visual References

步骤0 — 加载视觉参考

  1. Read
    references/visual-identity.md
    for the brand rules.
  2. Check if
    assets/reference/
    contains images. If empty, ask the user to run
    node scripts/scrape-insights-images.mjs
    and wait before continuing.
  3. Browse 3–5 reference images from
    assets/reference/
    to calibrate your sense of the brand's visual style.
  1. 阅读
    references/visual-identity.md
    了解品牌规则。
  2. 检查
    assets/reference/
    目录是否包含图片。如果为空,请让用户运行
    node scripts/scrape-insights-images.mjs
    并等待完成后再继续。
  3. 浏览
    assets/reference/
    中的3-5张参考图片,校准对品牌视觉风格的认知。

Step 1 — Choose the Category

步骤1 — 选择类别

Based on the article topic, decide between:
  • Category A — Conceptual Metaphor (default, ~70% of images): AI-generated scenes using a physical metaphor
  • Category B — Real Photography (~30%): Team photos for culture/event articles — cannot be generated, tell the user to pick from their photo library
根据文章主题,选择以下类别之一:
  • 类别A — 概念隐喻(默认,约70%的图片):使用物理隐喻生成AI场景
  • 类别B — 真实摄影(约30%):用于文化/活动类文章的团队照片——无法生成,需告知用户从照片库中选择

Step 2 — Find the Metaphor (Category A only)

步骤2 — 确定隐喻(仅类别A)

Identify a physical object or scene that metaphorically represents the article's core concept:
  • Immediately recognizable (not too abstract)
  • Visually simple (one subject, not a collage)
  • Compatible with a studio-lit, minimalist aesthetic
  • Not a stock-photo cliche (no handshakes, gears, lightbulbs, jigsaw pieces)
找出一个物理对象或场景,以隐喻方式代表文章的核心概念:
  • 易于识别(不要过于抽象)
  • 视觉简洁(单一主体,非拼贴)
  • 符合工作室布光、极简美学
  • 避免陈词滥调的图库照片(不要握手、齿轮、灯泡、拼图块)

Step 3 — Choose the Background Tone

步骤3 — 选择背景色调

  • Light background (white/light gray): methodology, best practices, architecture, design, product, business
  • Dark background (charcoal/black): security, debugging, infrastructure, AI, data, DevOps, low-level engineering
  • 浅色背景(白色/浅灰色):方法论、最佳实践、架构、设计、产品、商业主题
  • 深色背景(炭黑/黑色):安全、调试、基础设施、AI、数据、DevOps、底层技术主题

Step 4 — Craft the Prompt

步骤4 — 编写提示词

Use this structure:
A [object/scene metaphor] representing [concept], shot with a [lens mm] lens
at f/[aperture], [lighting type] from [direction]. [Background color] studio
background. Color palette: [colors]. Minimalist composition with generous
negative space. [Additional details]. Clean empty bottom-center area with no
elements or objects. Photorealistic quality, 16:9 aspect ratio.
Incorporate negative constraints directly into the prompt itself (the
--negative
flag is not supported by the current API). Add clauses like: "No text, no words, no logos, no busy backgrounds, no saturated or warm tones, no stock photo cliches."
使用以下结构:
A [object/scene metaphor] representing [concept], shot with a [lens mm] lens
at f/[aperture], [lighting type] from [direction]. [Background color] studio
background. Color palette: [colors]. Minimalist composition with generous
negative space. [Additional details]. Clean empty bottom-center area with no
elements or objects. Photorealistic quality, 16:9 aspect ratio.
将负面约束直接融入提示词中(当前API不支持
--negative
参数)。添加类似这样的语句:"No text, no words, no logos, no busy backgrounds, no saturated or warm tones, no stock photo cliches."

Step 5 — Generate the Image

步骤5 — 生成图像

Run the script from the skill directory:
bash
node scripts/generate-image.mjs \
  --prompt "THE CRAFTED PROMPT" \
  --output ./output/ARTICLE-SLUG.png \
  --aspect 16:9
To generate multiple variants for the user to choose from:
bash
node scripts/generate-image.mjs \
  --prompt "THE CRAFTED PROMPT" \
  --output ./output/ARTICLE-SLUG.png \
  --aspect 16:9 \
  --count 3
从技能目录运行脚本:
bash
node scripts/generate-image.mjs \
  --prompt "THE CRAFTED PROMPT" \
  --output ./output/ARTICLE-SLUG.png \
  --aspect 16:9
如需生成多个变体供用户选择:
bash
node scripts/generate-image.mjs \
  --prompt "THE CRAFTED PROMPT" \
  --output ./output/ARTICLE-SLUG.png \
  --aspect 16:9 \
  --count 3

Step 6 — Present Results

步骤6 — 展示结果

Show the user:
  1. The category and metaphor reasoning
  2. The prompt used (also saved as
    .prompt.json
    next to the images for reuse)
  3. The generated image(s) — read the output file(s) so the user can see them
  4. Note that the Orbitant watermark was automatically composited (unless
    --watermark none
    was used)
The
.prompt.json
file stores the full prompt, model, aspect ratio, and generation timestamp so the user can reproduce or tweak the image later without the skill.

向用户展示:
  1. 类别隐喻思路
  2. 使用的提示词(同时保存为图片旁的
    .prompt.json
    文件,便于复用)
  3. 生成的图像——读取输出文件供用户查看
  4. 说明Orbitant水印已自动合成(除非使用了
    --watermark none
    参数)
.prompt.json
文件存储了完整提示词、模型、宽高比和生成时间戳,方便用户无需依赖该技能即可重新生成或调整图像。

Orbitant Visual Identity Rules

Orbitant视觉标识规则

Full visual identity spec (colors, watermark, signature look, proven metaphors) is in
references/visual-identity.md
. Read it before crafting prompts.
Key points:
  • Color palette: Monochrome-dominant, teal (#00BFA5) accent only, avoid saturated/warm tones
  • Watermark: Composited automatically — never include text/logos in the prompt, always leave clean bottom-center space
  • Signature look: Shallow DoF, minimalist, studio-lit, desaturated premium aesthetic
  • Format: 16:9 landscape, 1440x810, PNG from API

完整的视觉标识规范(颜色、水印、标志性风格、成熟隐喻)位于**
references/visual-identity.md
**。编写提示词前请先阅读。
核心要点:
  • 调色板:以单色为主,仅使用蓝绿色(#00BFA5)作为强调色,避免饱和/暖色调
  • 水印:自动合成——请勿在提示词中包含文字/标志,务必保留底部中心空白区域
  • 标志性风格:浅景深、极简、工作室布光、低饱和度高端美学
  • 格式:16:9横向,1440x810分辨率,API输出PNG格式

Example

示例

Article: "5 Tips for Successful Legacy Migrations"
Category: A — Conceptual Metaphor Metaphor: Layered architectural model being deconstructed, representing careful extraction of legacy systems Background: Light (methodology/best-practices topic)
bash
node scripts/generate-image.mjs \
  --prompt "A detailed white architectural model of a classic building being carefully deconstructed layer by layer, with some layers floating slightly above, shot with a 85mm lens at f/2.8, soft directional lighting from the left. Clean white studio background. Color palette: monochrome whites and light grays with subtle shadows. Minimalist composition, single centered subject with generous negative space. Clean bottom-center area reserved for brand watermark. No text, no words, no logos, no busy backgrounds. Photorealistic 3D render quality, 16:9 aspect ratio." \
  --output ./output/legacy-migrations.png \
  --count 2

文章:"5 Tips for Successful Legacy Migrations"
类别:A — 概念隐喻 隐喻:分层建筑模型被拆解,代表对遗留系统的谨慎提取 背景:浅色(方法论/最佳实践主题)
bash
node scripts/generate-image.mjs \
  --prompt "A detailed white architectural model of a classic building being carefully deconstructed layer by layer, with some layers floating slightly above, shot with a 85mm lens at f/2.8, soft directional lighting from the left. Clean white studio background. Color palette: monochrome whites and light grays with subtle shadows. Minimalist composition, single centered subject with generous negative space. Clean bottom-center area reserved for brand watermark. No text, no words, no logos, no busy backgrounds. Photorealistic 3D render quality, 16:9 aspect ratio." \
  --output ./output/legacy-migrations.png \
  --count 2

Important Rules

重要规则

  • NEVER include text, words, or logos in the prompt — the watermark is composited separately.
  • One subject, one metaphor — Orbitant images are minimalist.
  • Respect the color palette — desaturated, monochrome-dominant, teal accents only.
  • Always specify shallow depth of field in the prompt.
  • Always reserve bottom-center space for the logo overlay.
  • Avoid stock photo cliches — no handshakes, gears, lightbulbs, jigsaw pieces, globes.
  • Match background tone to topic — light for constructive topics, dark for technical/deep topics.
  • If the article is about team/culture, recommend a real photo (Category B) instead of generating.
  • If
    GOOGLE_API_KEY
    is not available
    , output the prompt for manual use and tell the user how to set up the key.
  • 请勿在提示词中包含文字、单词或标志——水印会单独合成。
  • 单一主体、单一隐喻——Orbitant的图片风格为极简。
  • 遵循调色板要求——低饱和度、单色为主,仅使用蓝绿色强调。
  • 提示词中务必指定浅景深
  • 务必预留底部中心区域用于叠加标志。
  • 避免图库照片陈词滥调——不要握手、齿轮、灯泡、拼图块、地球仪。
  • 背景色调匹配主题——浅色用于建设性主题,深色用于技术/深度主题。
  • 如果文章涉及团队/文化,建议使用真实照片(类别B)而非生成图像。
  • 如果
    GOOGLE_API_KEY
    不可用
    ,输出提示词供手动使用,并告知用户如何设置密钥。