Cursor Image Gen logo

Cursor Image Gen

Community
mini-yifan
cursor-image-gen

Generate or edit bitmap images by launching a local Cursor Agent (cursor-grok-4.6-high) and using Cursor GenerateImage, then saving files to an exact folder. Use when the running agent has no native image tool, or the user explicitly requests Cursor, for photos, illustrations, icons, banners, mockups, turnarounds, or reference-guided images, including 文生图, 图生图, 多参考图, and 改图. Do not use when the current agent already has a working image-generation tool, unless the user asks for Cursor. Do not use for SVG/vector/code-native assets or a different image-generation provider.

Overview

Publishermini-yifan
Repositoryopen-source-video-gen-skill
Skill namecursor-image-gen
Stars
40
Forks
6
Bundled files
4
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by mini-yifan on GitHub. Read the source before you install it.

Installation

Install the Cursor Image Gen AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/mini-yifan/open-source-video-gen-skill/tree/main/skills/cursor-image-gen
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mini-yifan/open-source-video-gen-skill.git /tmp/open-source-video-gen-skill
mkdir -p .claude/skills
cp -r /tmp/open-source-video-gen-skill/skills/cursor-image-gen .claude/skills/cursor-image-gen
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Cursor Image Gen in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Cursor Image Gen on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Cursor Image Gen is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Cursor Image Gen

Launch a headless Cursor Agent and save bitmaps to a user-chosen directory. Do not call $imagegen, image_gen, or the OpenAI Images API.

Skill path

bash
export ZCODE_HOME="${ZCODE_HOME:-$HOME/.zcode}"
export CURSOR_IMG="$ZCODE_HOME/skills/cursor-image-gen/scripts/generate_with_cursor.mjs"

The wrapper needs network and write access to --output-dir. In a sandboxed ZCode task, request permission before running it.

Do not invoke PATH agent; that binary may be Grok. The wrapper resolves cursor-agent.

Routing

IntentHow to call
New image, no file--prompt only (text2img)
Guide from one image--reference FILE (img2img)
Several refs (style, face, layout)repeat --reference; optional matching --reference-role
Edit an existing image--mode edit and/or --keep / --change; edit target is the first --reference
Same prompt, several variants--n N
Many different assets--jobs jobs.json
Independent multi-image setLaunch one wrapper invocation per image concurrently; reuse verified references when applicable

Scheduling: sequential vs parallel

Decide automatically from the dependency graph instead of always using one mode:

  • Generate one image at a time when there is only one requested asset, when each image depends on the previous result, or when the next prompt must be chosen after inspecting the previous output. This is the normal serial workflow.
  • If a reference, identity, style, or layout image must be created first, generate and verify that reference serially. After it exists, launch independent downstream image jobs concurrently when they share the reference but do not depend on one another. Reusing the same local reference file across concurrent jobs is supported.
  • For true parallel generation, use one generate_with_cursor.mjs invocation per output with a unique filename and start those invocations concurrently through the available execution tools. Do not put all independent jobs into one sequential loop.
  • --jobs runs several assets through one Cursor Agent invocation, and --n makes several GenerateImage calls for one prompt. Both are batch mechanisms; neither should be described as guaranteed process-level parallelism. Use separate concurrent wrapper invocations when the user asks for simultaneous multi-image generation.
  • Keep dependent edits, reference creation, inspection, and any retry that needs a prior result serial. After a parallel batch finishes, verify every returned file independently and report partial failures clearly.

Need exact pixels, a mask, true transparent PNG, seed, or ControlNet? Read references/limits.md, tell the user Cursor cannot do it, and stop. Do not silently switch to $imagegen.

Mode details and inner-prompt rules: references/modes.md.

Commands

Text to image:

bash
node "$CURSOR_IMG" \
  --prompt "a paper-cut red panda, warm studio lighting" \
  --output-dir "/absolute/path/to/output" \
  --filename "red-panda.png" \
  --aspect-ratio 1:1

Image to image / edit:

bash
node "$CURSOR_IMG" \
  --prompt "keep the subject, replace the background with a misty forest" \
  --output-dir "/absolute/path/to/output" \
  --filename "forest-edit.png" \
  --reference "/absolute/path/to/source.png" \
  --mode edit \
  --keep "subject, clothing, face" \
  --change "background only"

Multi-reference:

bash
node "$CURSOR_IMG" \
  --prompt "same person as identity ref, composition matching the layout ref, white background turnaround" \
  --output-dir "/absolute/path/to/output" \
  --filename "character-turnaround.png" \
  --aspect-ratio 16:9 \
  --reference "/absolute/path/to/face.png" \
  --reference-role identity \
  --reference "/absolute/path/to/layout.png" \
  --reference-role composition

Batch:

bash
node "$CURSOR_IMG" \
  --jobs "/absolute/path/to/jobs.json" \
  --output-dir "/absolute/path/to/output"

--aspect-ratio must be 1:1, 4:3, 3:4, 16:9, or 9:16. Optional: --transparent, --avoid "...", --n N, --overwrite (only with explicit user approval). The default Cursor model is cursor-grok-4.6-high; pass --model only when intentionally overriding it.

Verify

Treat exit code 0 and JSON ok: true as success. Return every absolute path in outputs. Inspect the files before telling the user they look right.

Setup only:

bash
node "$CURSOR_IMG" --doctor
node "$CURSOR_IMG" --help

If --doctor reports logged_in: false, ask the user to run cursor-agent login (or set CURSOR_API_KEY). Do not fall back to $imagegen.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Cursor Image Gen AI skill do?

Generate or edit bitmap images by launching a local Cursor Agent (cursor-grok-4.6-high) and using Cursor GenerateImage, then saving files to an exact folder. Use when the running agent has no native image tool, or the user explicitly requests Cursor, for photos, illustrations, icons, banners, mockups, turnarounds, or reference-guided images, including 文生图, 图生图, 多参考图, and 改图. Do not use when the current agent already has a working image-generation tool, unless the user asks for Cursor. Do not use for SVG/vector/code-native assets or a different image-generation provider.

Why use Cursor Image Gen on TypingMind?

Because you install it once and use it with any model. Cursor Image Gen is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Cursor Image Gen in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mini-yifan/open-source-video-gen-skill/tree/main/skills/cursor-image-gen. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Cursor Image Gen?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Cursor Image Gen?

As many as you like. As long as a model supports skills, you can use Cursor Image Gen with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Cursor Image Gen AI skill free?

It is published on GitHub by mini-yifan. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇