gemini-infographic

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Gemini Infographic Generator

Gemini 信息图生成器

Generate professional infographic images from text descriptions using Gemini Nano Banana Pro SDK (
@google/genai
).
借助Gemini Nano Banana Pro SDK(
@google/genai
),根据文本描述生成专业的信息图图片。

Prerequisites

前提条件

  1. API Key: Configured in skill
    .env
    file with
    GEMINI_API_KEY=...
    and
    HTTPS_PROXY=...
    (if needed).
  2. Node.js 18+: Dependencies pre-installed in
    scripts/node_modules/
    .
  1. API密钥:在技能的
    .env
    文件中配置
    GEMINI_API_KEY=...
    HTTPS_PROXY=...
    (如有需要)。
  2. Node.js 18+:依赖包已预安装在
    scripts/node_modules/
    目录中。

Workflow

工作流程

Step 1: Understand the User's Request

步骤1:理解用户需求

Extract from the user's description:
  • Topic: What the infographic is about
  • Style: Preferred visual style (see styles.md)
  • Orientation: landscape (default), portrait, or square
  • Detail level: brief, standard, or detailed (default)
  • Language: zh-CN (default), en, ja, ko, etc.
Defaults when not specified: style=
auto
, orientation=
landscape
, detail=
detailed
, language=
zh-CN
.
从用户的描述中提取以下信息:
  • 主题:信息图的核心内容
  • 风格:偏好的视觉风格(详见styles.md
  • 排版方向:横版(默认)、竖版或方形
  • 细节级别:简洁、标准或详细(默认)
  • 语言:zh-CN(默认)、en、ja、ko等
未指定时的默认值:风格=
auto
、排版方向=
landscape
、细节=
detailed
、语言=
zh-CN

Step 2: Generate the Infographic

步骤2:生成信息图

Run the generation script:
bash
node {SKILL_DIR}/scripts/generate_infographic.mjs \
  --prompt "user's description here" \
  --style professional \
  --orientation landscape \
  --detail detailed \
  --language zh-CN \
  --output "{WORKSPACE}/infographic/{DATE}" \
  --name "descriptive_filename"
Replace
{WORKSPACE}
with the current workspace root,
{DATE}
with today's
YYYY-MM-DD
.
Parameters:
ParameterValuesDefault
--style
auto, sketchnote, kawaii, professional, scientific, anime, claymation, editorial, storyboard, bento, bricksauto
--orientation
landscape, portrait, squarelandscape
--detail
brief, standard, detaileddetailed
--language
zh-CN, en, ja, ko, or any language namezh-CN
--model
gemini-3-pro-image-preview, gemini-3.1-flash-image-previewgemini-3-pro-image-preview
--resolution
512, 1K, 2K, 4K2K
运行生成脚本:
bash
node {SKILL_DIR}/scripts/generate_infographic.mjs \
  --prompt "用户描述内容" \
  --style professional \
  --orientation landscape \
  --detail detailed \
  --language zh-CN \
  --output "{WORKSPACE}/infographic/{DATE}" \
  --name "描述性文件名"
{WORKSPACE}
替换为当前工作区根目录,
{DATE}
替换为当日的
YYYY-MM-DD
格式日期。
参数说明:
参数可选值默认值
--style
auto, sketchnote, kawaii, professional, scientific, anime, claymation, editorial, storyboard, bento, bricksauto
--orientation
landscape, portrait, squarelandscape
--detail
brief, standard, detaileddetailed
--language
zh-CN, en, ja, ko或任意语言名称zh-CN
--model
gemini-3-pro-image-preview, gemini-3.1-flash-image-previewgemini-3-pro-image-preview
--resolution
512, 1K, 2K, 4K2K

Step 3: Verify and Report

步骤3:验证并反馈

After generation, confirm the output file exists and report its path. Re-run with modified parameters for adjustments.
生成完成后,确认输出文件是否存在,并反馈其路径。如需调整,可修改参数后重新运行脚本。

Examples

示例

User: "做一个关于全球气候变化的信息图,专业风格"
bash
node {SKILL_DIR}/scripts/generate_infographic.mjs \
  --prompt "全球气候变化:温度趋势、碳排放数据、冰川融化、海平面上升" \
  --style professional --detail detailed \
  --output "./infographic/2026-03-17" --name "climate_change"
User: "Create a cute infographic about photosynthesis"
bash
node {SKILL_DIR}/scripts/generate_infographic.mjs \
  --prompt "Photosynthesis: sunlight + water + CO2 → glucose + oxygen" \
  --style kawaii --detail standard --language en \
  --output "./infographic/2026-03-17" --name "photosynthesis"
用户请求:"做一个关于全球气候变化的信息图,专业风格"
bash
node {SKILL_DIR}/scripts/generate_infographic.mjs \
  --prompt "全球气候变化:温度趋势、碳排放数据、冰川融化、海平面上升" \
  --style professional --detail detailed \
  --output "./infographic/2026-03-17" --name "climate_change"
用户请求:"Create a cute infographic about photosynthesis"
bash
node {SKILL_DIR}/scripts/generate_infographic.mjs \
  --prompt "Photosynthesis: sunlight + water + CO2 → glucose + oxygen" \
  --style kawaii --detail standard --language en \
  --output "./infographic/2026-03-17" --name "photosynthesis"

Style & Prompt Tips

风格与提示词技巧

  • Data-heavy →
    professional
    or
    scientific
  • Educational →
    storyboard
    or
    sketchnote
  • Social media →
    portrait
    +
    kawaii
    or
    anime
  • Enrich user descriptions with data points and section breakdowns before passing to script
  • See styles.md and prompt_template.md for details
  • 数据密集型内容 → 选择
    professional
    scientific
    风格
  • 教育类内容 → 选择
    storyboard
    sketchnote
    风格
  • 社交媒体适用 → 选择
    portrait
    排版 +
    kawaii
    anime
    风格
  • 在将用户描述传入脚本前,可补充数据点和板块划分信息
  • 详情请参考styles.mdprompt_template.md