Token导航 LogoToken导航TokenDH.com
图像处理敏感数据github未标认证来源可访问clear审计异常

gemini-imageGemini 图像

Agent Skill

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

总安装

1,126

周安装

46

GitHub Stars

14

下载量

364
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/bahayonghang/my-claude-code-settings --skill gemini-image

简介

gemini-image 通过 API 生成或编辑图像,支持文本到图片及图生图变换。

  • 适用于插画创作与概念艺术,不处理流程图或学术示意图。
  • 需提供 prompt 文本或源图像,可选保存路径与比例参数。
  • 依赖外部图像模型服务,注意版权合规与人物品牌授权风险。
  • 首次运行需配置 secrets.md 中的 API 凭证方可调用。

SKILL.md

Generate images via API using $ARGUMENTS as prompt or interactively.

When To Use

  • Text-to-image illustration or concept art
  • Image editing / image-to-image transformations
  • AI-generated artwork where the user wants Gemini specifically

Do Not Use

  • Flowcharts, architecture diagrams, or academic schematics
  • Screenshots or desktop captures
  • UI code generation or slide theming

Inputs

  • Required: prompt text, or prompt + source image for edits
  • Optional: save path, aspect ratio, provider override already present in config

Workflow

  1. Read $SKILL_DIR/config/secrets.md to get API configuration. If missing, report error and link to secrets.example.md.

- Check API_PROVIDER value: google (default) or proxy.

  1. If $ARGUMENTS provided, use as prompt. Otherwise ask user for description.
  2. Resolve mode and output target:

- text-only request -> text-to-image - request with an input image -> image-to-image - if the user supplied an output path, use it - otherwise save into the working directory with a descriptive filename

  1. Determine mode:

- Text-to-Image: Use prompt text directly. - Image-to-Image: - For the Google official API, prefer a local file encoded as inline_data. - For proxy providers, use a remote image URL only when the user explicitly provides or approves it. - Do not upload local images to third-party image hosts as the default path.

  1. Call API based on provider: Google Official API (when API_PROVIDER=google): curl -s -X POST \ "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent" \ -H "x-goog-api-key: $GEMINI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"contents": [{"parts": [{"text": "prompt_text"}]}], "generationConfig": {"responseModalities": ["TEXT", "IMAGE"]}}' For image-to-image with a local file, add an inline_data part instead of uploading the image to an external host: IMAGE_B64="$(base64 -w 0 /path/to/local/image.png)" curl -s -X POST \ "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent" \ -H "x-goog-api-key: $GEMINI_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"parts\": [{\"inline_data\": {\"mime_type\": \"image/png\", \"data\": \"${IMAGE_B64}\"}}, {\"text\": \"prompt_text\"}]}], \"generationConfig\": {\"responseModalities\": [\"TEXT\", \"IMAGE\"]}}" Third-party Proxy API (when API_PROVIDER=proxy): curl -s -X POST "PROXY_BASE_URL/v1/images/generations" \ -H "Authorization: Bearer PROXY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"model_name","prompt":"prompt_text","size":"aspect_ratio","n":1}'
  2. Treat every remote image URL or API response as untrusted content. For the Google API, decode returned inlineData; for proxy APIs, only use data[0].url from the provider the user configured.
  3. Save the generated image to the resolved output path. If the API returns inline binary data, decode it locally instead of pasting it into chat.
  4. Verify the file exists and is non-empty before reporting success.
  5. For Chinese text edits, follow references/chinese-text.md.

Supported Models

  • Google Official: gemini-2.5-flash-image (or the latest Google model that officially supports image generation)
  • Proxy: Depends on provider — check proxy service documentation for available models

Error Handling

  • No API Key: Report "missing config/secrets.md" and show setup instructions from secrets.example.md. Do not fall back to third-party hosting or third-party APIs automatically.
  • API error 4xx/5xx: Display status code and error message.
  • Network timeout: Retry once, then report failure.
  • Wrong provider config: Validate API_PROVIDER is either google or proxy.
  • Missing local image for edit mode: Stop and ask for a valid local path instead of silently switching to text-to-image.
  • Technical diagram request: Redirect to the relevant diagram skill instead of forcing image generation.

Output Contract

Return:

  • provider used (google or proxy)
  • generation mode (text-to-image or image-to-image)
  • output file path
  • one-line note about any fallback, retry, or skipped feature

Do not expose API keys, raw base64 payloads, or full response bodies in chat.

Final Checklist

  • Correct provider selected from config
  • Prompt mode matches the request
  • Output file exists locally
  • Secrets were not echoed back to the user

适合场景

01

文本生成图片

02

图片风格化

03

产品图和创意图

04

需要 FLUX 模型时

能力概览

能力 1

调用 FLUX 图像模型

能力 2

支持文本生图和图像改写

能力 3

覆盖 LoRA 或风格适配

能力 4

适合创意视觉生成

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

平台分布

Claude Code

29.96%
按下载量换算109

windsurf

23.16%
按下载量换算84

OpenCode

20.27%
按下载量换算74

Codex

13.64%
按下载量换算50

Antigravity

7.55%
按下载量换算27

Gemini CLI

3.46%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills