ernie-image-assistant

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

An image-analysis assistant that examines a supplied picture and turns its visual details into prompts for ERNIE-Image. A prompt is the written instruction used to generate an image.

In plain words
What is it for?
Use it to reverse-engineer prompts from PNG, JPG, JPEG, WebP, or BMP images, particularly anime, film-like, and illustration styles.
Why use it?
It helps when you want to recreate an image but do not know how to describe its subject, composition, colors, lighting, style, or visible text.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

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

Good fit Use it to reverse-engineer prompts from PNG, JPG, JPEG, WebP, or BMP images, particularly anime, film-like, and illustration styles.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/agenticaiplan/agenticaiskills/ernie-image-assistant
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-assistant
Clone the repo
git clone --depth 1 https://github.com/AgenticAIPlan/AgenticAISkills

Made for: Claude Code.

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-assistant

README.md
[![agentmods](https://agentmods.dev/badge/skills/agenticaiplan/agenticaiskills/ernie-image-assistant/github.svg)](https://agentmods.dev/skills/agenticaiplan/agenticaiskills/ernie-image-assistant)
Your own site
<a href="https://agentmods.dev/skills/agenticaiplan/agenticaiskills/ernie-image-assistant"><img src="https://agentmods.dev/badge/skills/agenticaiplan/agenticaiskills/ernie-image-assistant/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-assistant

Your own site · 80×15
<a href="https://agentmods.dev/skills/agenticaiplan/agenticaiskills/ernie-image-assistant"><img src="https://agentmods.dev/badge/skills/agenticaiplan/agenticaiskills/ernie-image-assistant.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,594 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00149 $0.01594
Opus 5 $0.00075 $0.00797
Sonnet 5 $0.00030 $0.00319
Haiku 4.5 $0.00015 $0.00159

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

Security

Grade A, and why

ernie-image-assistant scanned grade A with 1 finding 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 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/analyze_image.sh, scripts/generate_image.sh), 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s https://aistudio.baidu.com/llm/lmapi/v3/chat/completions \
skills/ernie-image-assistant/SKILL.md · 181 lines

How it starts

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

ERNIE-Image Assistant: Enter Prompt, Auto-Generate

使用场景

用户说以下类似内容时触发此 skill:

  • "帮我逆向这张图的提示词"
  • "分析这张图片,生成文生图 prompt"
  • "我想复现这张图,帮我写提示词"
  • "反推一下这张图的 prompt"
  • "逆向提示词"
  • "图片转 prompt"

环境要求

  • 需要设置星河社区 API Key:export AISTUDIO_API_KEY="your-key"
  • API 端点:https://aistudio.baidu.com/llm/lmapi/v3/chat/completions
  • 分析模型:ernie-4.5-turbo-vl-32k(支持多模态图片理解)
  • 目标生图模型:Ernie-image-turbo(通过星河社区调用)

工作流程

Step 1: 获取图片

确认用户提供的图片来源:

  1. 用户粘贴本地图片路径(如 /path/to/image.png
  2. 如果用户未提供图片,主动询问

支持格式: PNG、JPG、JPEG、WebP、BMP

获取图片后,使用 Read 工具读取图片文件以确认图片可访问,然后将其转为 base64 编码用于 API 调用。

# 将图片转为 base64
base64 -i <图片路径>

Step 2: 多维度视觉分析

调用星河社区 ERNIE-4.5 多模态 API,对图片进行结构化深度分析。

API 调用方式:

curl -s https://aistudio.baidu.com/llm/lmapi/v3/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: bearer $AISTUDIO_API_KEY" \
  -d '{
    "model": "ernie-4.5-turbo-vl-32k",
    "messages": [{
      "role": "user",
      "content": [
        {"type": "image_url", "image_url": {"url": "data:image/<ext>;base64,<BASE64_DATA>"}},
        {"type": "text", "text": "<分析提示词>"}
      ]
    }],
    "temperature": 0.3,
    "max_tokens": 4096
  }'

分析提示词(系统级,写入 text 字段):

参见 references/analysis-prompt.md 中的完整分析提示词模板。

分析维度:

维度 关注点
主体内容 画面中的核心对象、人物特征(发型/服装/表情/动作)、场景元素
艺术风格 动漫/胶片/写实/水彩/油画/像素/赛博朋克等风格识别
构图方式 视角(俯拍/仰拍/平视)、构图法则(三分法/对称/引导线)、景深
色彩基调 主色调、配色方案、色温(冷/暖)、饱和度、对比度
光影效果 光源方向、光线类型(自然光/逆光/霓虹灯)、阴影特征
氛围情绪 整体氛围(温馨/忧郁/热血/宁静)、情绪表达
文字渲染 图中出现的文字内容、字体风格、排版位置、文字特效(如果有)
纹理质感 画面质感(颗粒感/平滑/磨砂)、特效(光斑/烟雾/雨滴)

Step 3: 生成多版本提示词

基于 Step 2 的分析结果,生成 3 个版本的 ERNIE-Image 提示词:

版本说明:

版本 用途 特点
精准复现版 尽可能还原原图 包含全部细节描述,最长最详细
创意改编版 在原图基础上微调 保留核心风格,简化部分细节,留出创意空间
精简核心版 快速出图 只保留最关键的风格和主体描述

提示词撰写规范:

参见 references/prompt-writing-guide.md 中的 ERNIE-Image 提示词撰写指南。

Step 4: 输出结果

按以下格式输出完整的逆向分析报告:

## 图片逆向分析报告

### 一、视觉分析

#### 主体内容
...

#### 艺术风格
...

#### 构图与视角
...

#### 色彩分析
...

#### 光影效果
...

#### 氛围与情绪
...

#### 文字内容(如有)
...

#### 纹理与质感
...

---

### 二、逆向提示词

#### 版本 A — 精准复现版
> [完整提示词]

#### 版本 B — 创意改编版
> [提示词]

#### 版本 C — 精简核心版
> [提示词]

---

### 三、生图建议
- 推荐尺寸:...
- 推荐风格参数:...
- 注意事项:...

Read the full file on GitHub · 181 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 181 lines · 149 tokens per session scan A eb392b5d0bde

Subscribe to this mod's changes

ernie-image-assistant is a skill published in the GitHub repository AgenticAIPlan/AgenticAISkills (11 stars, last pushed 3mo ago), licensed MIT. It adds 149 tokens to every session and 1,594 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens