← all work
● live · 2026 · Creator · Open source

Imagine

An image-generation skill for coding agents: assets on the fly, no context dump.
Imagine cover
works with
Claude Code · Codex · Gemini CLI · Copilot
use
generate assets in-flow
distribution
GitHub
SKILL.md standard Claude Code plugin Gemini image API Nano Banana · NB2 / Pro curl + bash transport Python · rembg / Pillow crafter + reviewer subagents

An AI image-generation skill for coding agents. When you're in your editor and need an asset (a favicon, an OG card, a placeholder), Imagine generates it on the fly, without you having to leave the flow or explain the whole setup.

Coding agents can't draw #

When I am building something (this very site, for instance) I keep needing small assets: an icon, a share image, a quick mockup. A coding agent cannot make those, and if it could, most prompts people write produce mush. Imagine gives the agent both halves: real Gemini prompt-engineering expertise, and a concrete way to actually call the image API and hand back a file.

One package, two shapes #

It ships as a Claude Code plugin (slash commands plus two subagents) and, from the same repo, as a portable SKILL.md bundle for other agents. So the prompt-engineering knowledge is written once and reaches Claude Code, Codex, Gemini CLI, and Copilot. The end-to-end flow: gather requirements, craft the prompt, generate, self-review, post-process, and save the image next to a markdown sidecar recording the exact prompt and settings.

Flow: craft prompt, generate via Gemini, self-review on four axes, regenerate if it fails, post-process, save asset plus markdown sidecar.
Fig 1 · craft, generate, self-review, post-process. A failed review loops back for one regenerate.

Surviving Google's renames #

The decision I like most is model resolution. The image models it targets are -preview IDs that Google renames and deprecates often, so instead of hardcoding one, it tries a primary, then a fallback, then auto-discovers by listing the API's available models and filtering for image-capable ones. The plugin keeps working the day an ID changes underneath it.

Two agents with separated duties #

A prompt-crafter subagent (write access) turns a request into an optimized prompt and picks natural-language versus JSON structure; an image-reviewer subagent (read-only, on purpose) scores the result on prompt adherence, technical quality, composition, and fitness, and returns surgical prompt edits rather than a rewrite. Review is complexity-gated so simple asks skip it. Post-processing (background removal via rembg, format conversion) is a small Python script.

A small, honest side project #

This is an early, deliberately small project rather than a grand one, and I would rather say that than dress it up. What makes it worth shipping is the cross-agent reach of the SKILL.md standard and the resilience of the model resolution. Friends kept telling me how much time it saved them generating assets on the fly, which is exactly what I wanted from it.

← PREVIOUS
Design Mode
NEXT →
TokenViz
the thinking behind this
Agentic systems · 16 min read
The Model Thinks. The Harness Remembers.