ernie-image-gen

ernie-image-gen is a skill for Claude Code, Codex from AgenticAIPlan/AgenticAISkills. It costs 76 tokens per session (1,943 once invoked), scanned A, original, MIT.

A tool for generating images with ERNIE Image, a text-to-image model, through a configurable service. It supports Chinese-first prompts, mixed languages, long text, and text placed in multiple image regions.

In plain words
What is it for?
Use it to create images from text prompts, especially images containing Chinese or other multilingual text, long written content, or several separate text areas.
Why use it?
It provides a consistent way to connect to a remote image service or, when explicitly chosen, a local model setup. It also saves generated images and related information to a chosen project folder.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the agentic-ai-skills plugin — 54 skills shipped together

Good fit Use it to create images from text prompts, especially images containing Chinese or other multilingual text, long written content, or several separate text areas.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agenticaiplan/agenticaiskills/ernie-image-gen
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add AgenticAIPlan/AgenticAISkills --skill ernie-image-gen
Clone the repo
git clone --depth 1 https://github.com/AgenticAIPlan/AgenticAISkills

Made for: Claude Code, Codex.

Or install agentic-ai-skills, the plugin that ships this one along with the rest of its 54 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ernie-image-gen

README.md
[![agentmods](https://agentmods.dev/badge/skills/agenticaiplan/agenticaiskills/ernie-image-gen/github.svg)](https://agentmods.dev/skills/agenticaiplan/agenticaiskills/ernie-image-gen)
Your own site
<a href="https://agentmods.dev/skills/agenticaiplan/agenticaiskills/ernie-image-gen"><img src="https://agentmods.dev/badge/skills/agenticaiplan/agenticaiskills/ernie-image-gen/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ernie-image-gen

Your own site · 80×15
<a href="https://agentmods.dev/skills/agenticaiplan/agenticaiskills/ernie-image-gen"><img src="https://agentmods.dev/badge/skills/agenticaiplan/agenticaiskills/ernie-image-gen.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,943 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00076 $0.01943
Opus 5 $0.00038 $0.00971
Sonnet 5 $0.00015 $0.00389
Haiku 4.5 $0.00008 $0.00194

Measured 11d ago against content hash fada7194d3ad, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ernie-image-gen scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/__init__.py, scripts/common.py, scripts/generate_image.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ernie-image-gen/SKILL.md · 238 lines

How it starts

The opening of the file, as written. The whole thing — 238 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ERNIE Image Gen

使用 ERNIE Image 做文生图,默认走服务调用模式,并支持切换到兼容原生 /generate 接口的模式。这个 skill 适合:

  • 需要通过配置切换不同 ERNIE Image 服务地址
  • 需要保留 model_dir / weight_tar_path 等部署上下文,但不希望写死本机路径
  • 需要中文优先、多语言混合、长文本、多区域文本渲染
  • 需要把生成图片和元数据稳定落盘到当前项目或当前任务目录

默认逻辑:云端优先,本地显式触发

这个 skill 的默认行为是:

  1. 优先采用云端模型服务
    • 默认优先找云端配置
    • 默认优先使用 assets/cloud-config.portable.cn.yaml
    • 默认优先走 openai_compatible
  2. 如果云端配置还没完成
    • 不要直接假设本地模型
    • 先引导使用者补齐最少配置:base_urlauth_token_envmode
    • 配完后先做 health_check.py,再生成
  3. 只有在用户明确说明要用本地模型时
    • 才切到本地配置路径
    • 才使用本地权重 / 本地部署上下文
    • 才优先参考 assets/local-config.portable.cn.yaml

使用者先配置这几项

无论是在另一台电脑、另一个项目,还是分享给别人用,优先检查这 5 项:

  1. base_url
    • 改成你自己的 ERNIE Image 服务地址
  2. auth_token_env
    • 填“环境变量名”,不是 API Key 本身
    • 例如:ERNIE_IMAGE_API_KEY
  3. mode
    • OpenAI 兼容接口用 openai_compatible
    • 原生接口用 native_generate
  4. output.artifact_dir
    • 推荐保留 ${ERNIE_IMAGE_ARTIFACT_DIR:-./achievement}
    • 不写死本机绝对路径
  5. weight_tar_path
    • 如果只是调远程服务,可以留空
    • 只有在你要保留本地部署上下文时才需要填

推荐直接从这两个模板开始:

  • 通用英文模板:assets/cloud-config.portable.yaml
  • 通用中文模板:assets/cloud-config.portable.cn.yaml
  • 本地模型中文模板:assets/local-config.portable.cn.yaml

如果你只是普通云端调用,最常用的动作其实只有两步:

export ERNIE_IMAGE_API_KEY='你的key'
python3 scripts/generate_image.py --config assets/cloud-config.portable.cn.yaml --prompt '一只可爱的橘猫表情包'

Quick Start

A. 默认:云端服务调用

  1. 优先复制可移植云端模板,而不是项目私有模板:
    • assets/cloud-config.portable.cn.yaml
    • assets/cloud-config.portable.yaml
  2. 按需修改:
    • mode: openai_compatiblenative_generate
    • base_url
    • auth_token_env
    • model_dir(通常不用改)
    • weight_tar_path(可留空,或用环境变量占位)
    • 输出目录 output.artifact_dir(推荐相对路径或环境变量)
  3. 先做健康检查:
python3 scripts/health_check.py \
  --config assets/cloud-config.portable.cn.yaml
  1. 生成图片:
python3 scripts/generate_image.py \
  --config assets/cloud-config.portable.cn.yaml \
  --prompt "一只戴宇航员头盔的橘猫,电影感打光,超高细节"

B. 仅当用户明确要求:本地模型调用

Read the full file on GitHub · 238 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 238 lines · 76 tokens per session scan A fada7194d3ad

Subscribe to this mod's changes

ernie-image-gen is a skill published in the GitHub repository AgenticAIPlan/AgenticAISkills (11 stars, last pushed 3mo ago), licensed MIT. It adds 76 tokens to every session and 1,943 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

general-video

Author or edit a custom HyperFrames composition when no specialized workflow fits, or when BRIEF.md sets flow: companion. Use for longer or multi-scene pieces, brand and sizzle reels, montages, static loops, static title cards, footage remixes, and freeform builds. Use motion-graphics instead for a short unnarrated…

heygen-com/hyperframes · 92 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

chengfeng-check-updates

An environment manager for a video-editing system. It checks whether its skills and runtime—the software needed to run them—are installed and compatible.

Agentchengfeng/chengfeng-videocut-skills · 120 tokens

diagnostic-stem-delivery

Audio production with diagnostic analysis, timecode parsing from documents, and verified export workflow.

HKUDS/OpenSpace · 23 tokens