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.
npx skills add wecode-ai/Wegent --skill image-generationgit clone --depth 1 https://github.com/wecode-ai/WegentWrote 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.
[](https://agentmods.dev/skills/wecode-ai/wegent/image-generation)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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:
- 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.
- 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.
- 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.
- Run
node scripts/image-generation.mjs configand find the selected profile in itsproviderslist. Use the user's explicitly selected provider ID, ordefault_providerwhen none was selected; require that profile'sconfiguredvalue 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 runnode scripts/settings.mjs startfrom 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. - 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 setoptions.nto1; 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. Invokenode scripts/image-generation.mjs generatewith one JSON object on standard input:{"prompt":"...","options":{"n":1}}. The only request fields areprompt, optionalprovider,output_directoryandoptions, plusimagesand optionalmaskfor 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. - When revising an image, invoke
node scripts/image-generation.mjs editwith the same JSON shape andimagescontaining 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. - If the active task workspace path is known, set
output_directoryto itsgenerated-imagessubdirectory. 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. - Keep the shell tool's result object and wait for the existing process to finish. A
session_idwithout anexit_codemeans it is still running, even whenoutputis empty. Continue that same session withwrite_stdinand emptychars, 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. - Display every returned saved image once by copying its
markdownfield verbatim into the final response, outside a code block. It is a standard Markdown image with an absolute localfile:URI and the image'spromptin 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 includestransparency, 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. - 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"withgeneration_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: unknownmeans 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.
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.
- today First seen · 51 lines · 51 tokens per session scan A da39cc982752
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.
image-generation compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| image-generationwecode-ai/Wegent | Skill | 897 | today | Apache-2.0 | A | 51 | Claude Code, Codex |
| ha-skill-creatorshiwenwen/hope-agent | Skill | 1.9k | today | MIT | A | 106 | Claude Code |
| ha-browsershiwenwen/hope-agent | Skill | 1.9k | today | MIT | A | 140 | Claude Code |
| ha-logsshiwenwen/hope-agent | Skill | 1.9k | today | MIT | A | 183 | Claude Code, Codex |
| ha-skill-installershiwenwen/hope-agent | Skill | 1.9k | today | MIT | A | 82 | Claude Code, Codex |
| ha-data-storesshiwenwen/hope-agent | Skill | 1.9k | today | MIT | A | 115 | Claude Code, Codex |
| ha-self-diagnosisshiwenwen/hope-agent | Skill | 1.9k | today | MIT | A | 114 | Claude Code |