image-generation

image-generation is a skill for Claude Code, Codex from wecode-ai/Wegent. It costs 51 tokens per session (2,177 once invoked), scanned A, original, Apache-2.0.

Generate or edit images with configured OpenAI Images, Seedream or custom services when the current task has no native tool for the requested operation, or the user explicitly chooses this plugin or a configured provider. Prefer available native image tools by default.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install with agentmods
npx agentmods add skills/wecode-ai/wegent/image-generation
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 wecode-ai/Wegent --skill image-generation
Clone the repo
git clone --depth 1 https://github.com/wecode-ai/Wegent

Made for: Claude Code, Codex.

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 image-generation

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/wecode-ai/wegent/image-generation"><img src="https://agentmods.dev/badge/skills/wecode-ai/wegent/image-generation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,177 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 unknown 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.00051 $0.02177
Opus 5.5 $0.00020 $0.00871
Sonnet 5.5 $0.00010 $0.00435
Haiku 4.5 $0.00005 $0.00218

Measured today against content hash da39cc982752, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

image-generation 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 today.

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.

wework/resources/bundled-plugins/wework-personal/plugins/wework-image-generation-builtin/skills/image-generation/SKILL.md · 51 lines

How it starts

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

Image generation and editing

Choose the route before checking plugin configuration or submitting an image request:

  1. If the user explicitly selects this plugin or one of its configured provider profiles, use this plugin. Being installed or enabled, or having this Skill automatically activated, is not an explicit selection.
  2. Otherwise, prefer the runtime's native image tool when it is available in the current task for the requested generation or edit. Follow that tool's instructions and stop this plugin workflow; native generation does not require this plugin's configuration.
  3. If no native tool is available for the requested operation, use this plugin's task CLI below. If the plugin is disabled, unavailable or unconfigured, explain what is needed; do not automatically install, enable or configure it.

Use actual tool availability and its supported operations, not a model name, image-input support, a configuration flag or the presence of a Skill file, to select the route. Do not submit an image request just to probe support. These instructions guide the agent's tool selection; they do not enforce routing inside the host.

Choose one route per request. Errors, quota exhaustion, timeouts, cancellation, partial results and unknown outcomes after a call do not make the native tool absent. Do not automatically switch between native generation, this CLI, MCP or providers to resend it. A separate user request can authorize another generation.

When the plugin route is selected, run node scripts/image-generation.mjs from this plugin's installed directory, or use the script's absolute path, in the active task shell. Use the configured default provider unless the user explicitly selects another configured profile. The text/chat model does not need to match the image provider.

  1. Run node scripts/image-generation.mjs config and find the selected profile in its providers list. Use the user's explicitly selected provider ID, or default_provider when none was selected; require that profile's configured value to be true. An unconfigured default or another profile must not block a different configured selection. If the selected profile is missing or unconfigured, direct the user to this plugin's 插件配置 → 默认配置 / Plugin configuration → Default configuration button. They can also run node scripts/settings.mjs start from this plugin's installed directory. If task identity is required but unavailable, explain that the service must be called from a task with an injected Wework identity. Do not request API keys or usernames in chat, read credential files, inspect environment values, or configure credentials through shell tool arguments.
  2. Translate the user's request into both a clear image prompt and explicit provider parameters in options. Each supplied option overrides the same configured default; unspecified options keep their defaults. For one requested image set options.n to 1; translate a requested size, quality or format into the corresponding supported option. Never keep a conflicting default just because it is configured, or change persistent settings to satisfy one request. Invoke node scripts/image-generation.mjs generate with one JSON object on standard input: {"prompt":"...","options":{"n":1}}. The only request fields are prompt, optional provider, output_directory and options, plus images and optional mask for edits. Never pass identity, usernames, model, URL, headers or credentials as request parameters. Keep the JSON separate from executable shell syntax; do not create temporary request files.
  3. When revising an image, invoke node scripts/image-generation.mjs edit with the same JSON shape and images containing the actual absolute source image paths. Use a previously saved result or the user's attachments. Preserve reference order. Pass a mask only for a provider/model that supports it. Do not substitute a new text-only generation for an edit.
  4. If the active task workspace path is known, set output_directory to its generated-images subdirectory. Otherwise omit it: the plugin uses its configured output directory or ~/Pictures/WeWork. Never save outputs inside the installed plugin directory. Source files are preserved.
  5. Keep the shell tool's result object and wait for the existing process to finish. A session_id without an exit_code means it is still running, even when output is empty. Continue that same session with write_stdin and empty chars, accumulating its output chunks until a final exit code arrives. If an outer tool wrapper yields a job or cell ID, resume it through that wrapper's wait tool first. A long requested yield time does not prove completion. Do not start another CLI call or use a directory listing as a substitute for the final result. Parse the completed CLI's JSON even when its exit code is nonzero.
  6. Display every returned saved image once by copying its markdown field verbatim into the final response, outside a code block. It is a standard Markdown image with an absolute local file: URI and the image's prompt in its quoted title. Keep its URI encoding and HTML entities intact so paths, quotes, backslashes and multiline prompts remain correct. prompt_source: "provider_revised" means the provider reported a revised prompt; "request" means the prompt sent in this call. Do not claim a request prompt was revised. When an image includes transparency, report its actual status as described below. The tool returns text metadata only and does not display an image itself. Do not also embed data URLs or emit a second copy as an attachment. Show only files actually returned as saved, including saved images in a partial result.
  7. For partial, show the saved images and explain the reported processing failure or unmet transparency requirement; it does not necessarily mean a file could not be saved. error.code: "transparency_not_confirmed" with generation_state: "completed" means the output was preserved but transparency was not confirmed. Do not delete it or resubmit. For failed, timed-out or cancelled calls, report the result without claiming an image was generated. If the completed process returns no valid JSON, report that the result could not be confirmed. Never automatically retry a generation: generation_state: unknown means the provider may already have accepted or charged for it. Do not switch to MCP, another provider or another command to resend a failed or uncertain operation. A separate user request can authorize another generation.

Read the full file on GitHub · 51 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. today First seen · 51 lines · 51 tokens per session scan A da39cc982752

Subscribe to this mod's changes

image-generation is a skill published in the GitHub repository wecode-ai/Wegent (897 stars, last pushed today), licensed Apache-2.0. It adds 51 tokens to every session and 2,177 once invoked, about $0.0002 per session on Opus 5.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-12-04.

Related

image-generation compared with skills from other repositories

image-generation next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
image-generationwecode-ai/WegentSkill897todayApache-2.0A51Claude Code, Codex
ha-skill-creatorshiwenwen/hope-agentSkill1.9ktodayMITA106Claude Code
ha-browsershiwenwen/hope-agentSkill1.9ktodayMITA140Claude Code
ha-logsshiwenwen/hope-agentSkill1.9ktodayMITA183Claude Code, Codex
ha-skill-installershiwenwen/hope-agentSkill1.9ktodayMITA82Claude Code, Codex
ha-data-storesshiwenwen/hope-agentSkill1.9ktodayMITA115Claude Code, Codex
ha-self-diagnosisshiwenwen/hope-agentSkill1.9ktodayMITA114Claude Code