imagine

Generate and edit images through a multi-provider CLI supporting Gemini, OpenAI, and Recraft.

4|1|Updated Jul 31, 2025
One-click install
npx skills add https://github.com/alvis/.agents --skill imagine-alvis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: imagine
Source: https://github.com/alvis/.agents/tree/main/plugins/web/skills/imagine
Command: npx skills add https://github.com/alvis/.agents --skill imagine-alvis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @google/genai, openai, sharp, and includes scripts (resource) and references (resource) components.

What problem does it solve? Creating and editing images for projects—website heroes, product shots, UI mockups, logos, game assets—normally requires juggling multiple provider APIs, inconsistent flags, and ad-hoc scripts. This Skill provides one bundled CLI with a structured prompt workflow so image generation and editing are deterministic, reproducible, and provider-appropriate. ## Core Features & Use Cases - Multi-provider generation and editing: Defaults to Google Gemini, with OpenAI for mask-based inpainting and transparent backgrounds, and Recraft for vector/SVG output and named artistic styles. - Structured prompt spec: Classifies each request into a use-case slug (product-mockup, ui-mockup, logo-brand, style-transfer, etc.) and builds a reviewable prompt covering subject, composition, lighting, palette, and constraints. - Batch and style-guided runs: Runs many prompts from a JSONL file with concurrency and retries, and applies reference-image styles via --reference or Recraft style IDs. - Use Case: You need a set of landing page assets. Describe the pages, approve the structured prompts, and the Skill runs a batch job that writes consistently styled images to output/imagine/ with the final prompts and flags recorded. ## Quick Start Ask the agent to generate a hero image for your landing page with the imagine skill, providing a prompt or reference image and approving the structured prompt it drafts.

Frequently Asked Questions about imagine

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate images with Gemini, OpenAI, or Recraft from one CLI?

Run the bundled image-gen.ts script with Bun and select the provider via the --provider flag before the subcommand. Google Gemini is the default; use --provider openai for masks and transparent backgrounds, or --provider recraft for vector output and named styles.

How do I edit an existing image or replace its background with AI?

Pass the input image with --image and describe the change in the prompt, for example replacing the background with a sunset gradient. For mask-based inpainting, add a PNG mask with --mask and use the OpenAI provider, since Google does not support masks.

Which image provider should I use for transparent backgrounds or vector SVG output?

Transparent backgrounds require the OpenAI provider with --background transparent and png or webp output format. Vector or SVG output requires the Recraft provider with a _vector model such as recraftv4_vector.

Can I apply a reference image's style to new generations?

Yes, pass one or more style images with --reference and the model matches the visual style, palette, and texture. Recraft V3 models can instead create a reusable style ID from reference images via the Recraft MCP tools.

Why does image generation fail with a missing package or API key error?

The CLI resolves @google/genai, openai, and sharp through Bun's inline auto-install, so registry or network access must be available. Each provider also needs its own key: GOOGLE_API_KEY, OPENAI_API_KEY, or RECRAFT_API_TOKEN set as an environment variable.

How do I generate many images in one batch run?

Write prompts as JSONL lines to a temporary file and run generate-batch with --input and --out-dir. Concurrency defaults to 5, transient failures are retried with backoff, and per-job overrides like aspect_ratio and quality are supported.