Token导航 LogoToken导航TokenDH.com
图像处理需要联网github未标认证来源可访问clear审计异常

image-gen图像生成器

Agent Skill

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

总安装

8,666

周安装

354

GitHub Stars

750

下载量

2,804
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:image-gen(图像生成器)
来源仓库:https://github.com/jezweb/claude-skills
仓库路径:skills/image-gen
安装命令:
npx skills add https://github.com/jezweb/claude-skills --skill image-gen
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/jezweb/claude-skills --skill image-gen

简介

使用 Gemini 3 Native Image Generation 生成网站图像并对其进行编辑。

  • 支持英雄横幅、服务卡、带有清晰文本的信息图表(4K 时为 94%),以及跨 10 多种宽高比和高达 4K 分辨率的多轮编辑
  • 两个活跃型号:Gemini 3 Pro Image Preview,适用于 4K 和复杂的构图; Gemini 2.5 Flash Image 实现快速迭代
  • 处理多达 14 个参考图像(最多 5 个人类图像以保持一致性)、风格转换、颜色更改、元素添加/删除以及纵横比调整
  • 包括澳大利亚特定的图像模式并防止 5 个记录错误:分辨率区分大小写、纵横比处理、人类参考限制、SynthID 水印和 Google 搜索接地限制
  • 需要从已弃用的 @google/generative-ai 迁移 SDK
  • 至@google/genai
  • ;响应方式
  • 必须同时包含文本和图像

SKILL.md

Image Generation Skill

Generate and edit website images using Gemini Native Image Generation.

⚠️ Critical: SDK Migration Required

IMPORTANT: The @google/generative-ai package is deprecated as of November 30, 2025. All new projects must use @google/genai.

Migration Required:

// ❌ OLD (deprecated, support ended Nov 30, 2025)
import { GoogleGenerativeAI } from "@google/generative-ai";
const genAI = new GoogleGenerativeAI(API_KEY);

// ✅ NEW (required)
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({ apiKey: API_KEY });

Source: GitHub Repository Migration Notice

Models

ModelIDStatusBest For
Gemini 3 Pro Imagegemini-3-pro-image-previewPreview (Nov 20, 2025)4K, complex prompts, text
Gemini 2.5 Flash Imagegemini-2.5-flash-imageGA (Oct 2, 2025)Fast iteration, general use
Imagen 4.0imagen-4.0-generate-001GA (Aug 14, 2025)Alternative platform

Deprecated Models (do not use):

  • gemini-2.0-flash-exp-image-generation - Shut down Nov 11, 2025
  • gemini-2.0-flash-preview-image-generation - Shut down Nov 11, 2025
  • gemini-2.5-flash-image-preview - Scheduled shutdown Jan 15, 2026

Source: Google AI Changelog

Capabilities

FeatureSupported
Generate from text
Edit existing images
Change aspect ratio
Widen/extend images
Style transfer
Change colours
Add/remove elements
Text in images✅ (legible!)
Multiple reference images✅ (up to 14: max 5 humans, 9 objects)
4K resolution✅ (Pro only)

Note: Exceeding 5 human reference images causes unpredictable character consistency. Keep human images ≤ 5 for reliable results.

Aspect Ratios

1:1   | 2:3  | 3:2  | 3:4  | 4:3
4:5   | 5:4  | 9:16 | 16:9 | 21:9

Resolutions (Pro only)

Size1:116:94:3
1K1024x10241376x7681184x880
2K2048x20482752x15362368x1760
4K4096x40965504x30724736x3520

Quick Start

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });

// Generate new image
const response = await ai.models.generateContent({
  model: "gemini-2.5-flash-image",
  contents: "A professional plumber in hi-vis working in modern Australian home",
  config: {
    responseModalities: ["TEXT", "IMAGE"],  // BOTH required - cannot use ["IMAGE"] alone
    imageGenerationConfig: {
      aspectRatio: "16:9",
    },
  },
});

// Extract image
for (const part of response.candidates[0].content.parts) {
  if (part.inlineData) {
    const buffer = Buffer.from(part.inlineData.data, "base64");
    fs.writeFileSync("hero.png", buffer);
  }
}

Important: responseModalities must include both ["TEXT", "IMAGE"]. Using ["IMAGE"] alone may fail or produce unexpected results.

Model Selection

RequirementUse
Fast iterationGemini 2.5 Flash Image
4K resolutionGemini 3 Pro Image Preview
Text in imagesGemini 3 Pro (94% legibility at 4K)
Simple editsGemini 2.5 Flash Image
Complex compositionsGemini 3 Pro Image Preview
Infographics/diagramsGemini 3 Pro Image Preview

Text Rendering Benchmarks (4K resolution):

  • Gemini 3 Pro Image: 94% legible text
  • DALL-E 3: 78% legible text
  • Midjourney: Decorative pseudo-text only

When to Use

Use Gemini Image Gen when:

  • Stock photos don't fit brand/context
  • Need Australian-specific imagery
  • Need text in images (infographics, diagrams)
  • Need consistent style across multiple images
  • Need to edit/modify existing images
  • Client has no photos of their work

Don't use when:

  • Client has good photos of actual work
  • Real team photos needed (discuss first)
  • Product shots (use real products)
  • Legal/compliance concerns

Known Issues Prevention

This skill prevents 5 documented issues:

Issue #1: Resolution Parameter Case Sensitivity

Error: Request fails with invalid parameter error Source: Google AI Image Generation Docs Why It Happens: Resolution values are case-sensitive and must use uppercase 'K'. Prevention: Always use "4K", "2K", "1K" - never lowercase "4k".

// ❌ WRONG - causes request failure
config: { imageGenerationConfig: { resolution: "4k" } }

// ✅ CORRECT - uppercase required
config: { imageGenerationConfig: { resolution: "4K" } }

Issue #2: Aspect Ratio May Be Ignored (Sept 2025+)

Error: Returns 1:1 square image despite requesting 16:9 or other ratios Source: Google Support Thread Why It Happens: Backend update in September 2025 affected Gemini 2.5 Flash Image model's aspect ratio handling. Prevention: Use Gemini 3 Pro Image Preview for reliable aspect ratio control, or generate 1:1 and use multi-turn editing to extend.

// May ignore aspectRatio on Gemini 2.5 Flash Image
model: "gemini-2.5-flash-image",
config: { imageGenerationConfig: { aspectRatio: "16:9" } }

// More reliable for aspect ratio control
model: "gemini-3-pro-image-preview",
config: { imageGenerationConfig: { aspectRatio: "16:9" } }

Status: Google confirmed working on fix (Sept 2025).

Issue #3: Exceeding 5 Human Reference Images

Error: Unpredictable character consistency in generated images Source: Google AI Image Generation Docs Why It Happens: Gemini 3 Pro Image supports up to 14 reference images total, but only 5 can be human images for character consistency. Prevention: Limit human images to 5 or fewer. Use remaining slots (up to 14 total) for objects/scenes.

// ❌ WRONG - 7 human images exceeds limit
const humanImages = [img1, img2, img3, img4, img5, img6, img7];
const prompt = [
  { text: "Generate consistent characters" },
  ...humanImages.map(img => ({ inlineData: { data: img, mimeType: "image/png" }})),
];

// ✅ CORRECT - max 5 human images
const humanImages = images.slice(0, 5);  // Limit to 5
const objectImages = images.slice(5, 14);  // Up to 9 more for objects
const prompt = [
  { text: "Generate consistent characters" },
  ...humanImages.map(img => ({ inlineData: { data: img, mimeType: "image/png" }})),
  ...objectImages.map(img => ({ inlineData: { data: img, mimeType: "image/png" }})),
];

Issue #4: SynthID Watermark Cannot Be Disabled

Error: N/A (documented limitation) Source: Google AI Image Generation Docs Why It Happens: All generated images automatically include a SynthID watermark for content authenticity tracking. Prevention: Be aware of this limitation for commercial use cases. Watermark cannot be disabled by developers.

Issue #5: Google Search Grounding Excludes Image Results

Error: Generated images don't reflect visual search results, only text Source: Google AI Image Generation Docs Why It Happens: When using Google Search tool with image generation, "image-based search results are not passed to the generation model." Prevention: Only text-based search results inform the visual output. Don't expect the model to reference images from search results.

// Google Search tool enabled
const response = await ai.models.generateContent({
  model: "gemini-3-pro-image-preview",
  contents: "Generate image of latest iPhone design",
  tools: [{ googleSearch: {} }],
  config: { responseModalities: ["TEXT", "IMAGE"] },
});
// Result: Only text search results used, not image results from web search

Pricing

Current Pricing (as of November 2025):

  • Gemini 2.5 Flash Image: ~$0.008 per image

- Input: 258 tokens per image - Output: 1290 tokens per image - Rate: $30.00 per 1M output tokens

Note: The generateImages API (Imagen models) does not return usageMetadata in responses. Track costs manually based on pricing above.

Source: Google Developers Blog - Gemini 2.5 Flash Image

Reference Files

  • references/prompting.md - Effective prompt patterns
  • references/website-images.md - Hero, service, background templates
  • references/editing.md - Multi-turn editing patterns
  • references/local-imagery.md - Australian-specific details
  • references/integration.md - API code examples

Last verified: 2026-01-21 | Skill version: 2.0.0 | Changes: Added SDK migration notice (critical), updated to current model names (gemini-3-pro-image-preview, gemini-2.5-flash-image), added 5 Known Issues (resolution case sensitivity, aspect ratio bug, reference image limits, SynthID watermark, Google Search grounding), added pricing section, added text rendering benchmarks.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

27.11%
按下载量换算760

Gemini CLI

23.32%
按下载量换算654

Cursor

17.16%
按下载量换算481

Antigravity

12.28%
按下载量换算344

OpenCode

6.91%
按下载量换算194

Codex

3.1%
按下载量换算87

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills