Agent skill

BlockRun Image Generation

by BlockRunAI in BlockRunAI/ClawRouter

Generates or edits images through ClawRouter's local image API, with a choice of models and sizes and payment handled automatically through x402.

MITAuto-check passedMedia & Creative

Install BlockRun Image Generation

skills CLI
$ npx skills add BlockRunAI/ClawRouter --skill imagegen -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install BlockRunAI/ClawRouter imagegen --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/BlockRunAI/ClawRouter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/imagegen .claude/skills/imagegen && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
imagegen
GitHub stars
6.6k
Token cost
~2.1k tokens
SKILL.md length
604 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Generates or edits images through ClawRouter's local image API, with a choice of models and sizes and payment handled automatically through x402.

  • Generating an image from a text description
  • SKILL.md covers Generate an Image, Edit an Existing Image, Example Interactions and Notes
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Editing or retouching an existing image with a prompt

What it does

The agent sends a request to ClawRouter's local endpoint at http://localhost:8402/v1/images/generations with a model, prompt and size, then shows the returned image URL inline. A /cr-imagegen slash command accepts model, size and count options, and the blockrun_image_generation and blockrun_image_edit partner tools cover generating and inpainting.

A model table lets the agent pick by need: nano-banana is the default fast and cheap option, banana-2 gives a sharper 1K result, banana-pro handles high-resolution and large-format images up to 4096 by 4096 pixels, gpt-image is a budget choice that supports editing, and gpt-image-2 suits photorealistic output and text rendering but is slow. Each model has a per-image price in the table, and payment goes through x402.

When your agent uses it

  • Generating an image from a text description
  • Editing or retouching an existing image with a prompt
  • Choosing between a cheap fast model and a high-resolution one

Example prompts

  • “Draw a golden retriever surfing on a wave at 1024x1024.”
  • “Retouch ./photos/portrait.png so the cluttered background is removed.”
  • “/cr-imagegen a lighthouse at dusk in watercolor --model=banana-pro --size=2048x2048”

Requirements

  • ClawRouter running locally on port 8402
  • Payment through x402, handled by ClawRouter

What it can do on your machine

Read from SKILL.md and the folder at commit b758e03. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • blockrun.ai
    • user.blockrun.ai

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

BlockRun Image Generation loads about 2.1k tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 604 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from BlockRunAI/ClawRouter at commit b758e03, republished under its MIT licence (© BlockRunAI). 604 words, ~2,077 tokens.

Download SKILL.mdSave it as .claude/skills/imagegen/SKILL.md (or your agent's skills folder).
name
imagegen
description
Generate or edit images via BlockRun's image API. Trigger when the user asks to generate, create, draw, make an image — or to edit, modify, change, or retouch an existing image.
triggers
blockrun image, blockrun image generation, clawrouter image, generate image via blockrun, blockrun ai art, blockrun seedream, blockrun nano banana, blockrun…

Image Generation & Editing

Generate or edit images through ClawRouter. Payment is automatic via x402.

Shortcuts:

  • Slash: /cr-imagegen <prompt> [--model=<alias>] [--size=1024x1024] [--n=1] (/imagegen still accepted in chat for backward compatibility)
  • Partner tool: blockrun_image_generation (LLM-callable) / blockrun_image_edit (inpainting)

Generate an Image

POST to http://localhost:8402/v1/images/generations:

json
{
  "model": "google/nano-banana",
  "prompt": "a golden retriever surfing on a wave",
  "size": "1024x1024",
  "n": 1
}

Response:

json
{
  "created": 1741460000,
  "data": [{ "url": "http://localhost:8402/images/abc123.png" }]
}

Display inline: ![generated image](http://localhost:8402/images/abc123.png)

Model Selection
AliasFull IDPriceSizesBest for
nano-bananagoogle/nano-banana$0.051024×1024Default — fast, cheap, good quality
banana-2google/nano-banana-2$0.091024×1024Gemini 3.1 Flash imagegen — sharper than nano-banana at 1K
banana-progoogle/nano-banana-pro$0.10–$0.151024×1024, 2048×2048, 4096×4096High-res, large format
gpt-imageopenai/gpt-image-1$0.02–$0.041024×1024, 1536×1024, 1024×1536Budget option; supports editing
gpt-image-2openai/gpt-image-2$0.06–$0.121024×1024, 1536×1024, 1024×1536Photorealistic, reasoning-driven, text rendering (slow — proxy polls up to 5min); legacy dalle alias routes here
flareopenai/gpt-image-2.5-flare$0.28–$0.561024×1024, 1536×1024, 1024×1536GPT Image 2.5, fast — top OpenAI quality, caller can pick quality at a flat price
sunburstopenai/gpt-image-2.5-sunburst$0.28–$0.561024×1024, 1536×1024, 1024×1536GPT Image 2.5, precision — best for high-fidelity edits
seedreambytedance/seedream-5-pro$0.045–$0.09up to 2848×1600 / 2304×1728Flagship quality, reference-image support
grok-imaginexai/grok-imagine-image$0.021024×1024xAI Grok image style
grok-imagine-2xai/grok-imagine-image-2.0$0.041024×1024Grok Imagine 2.0 — between grok-imagine and pro
grok-imagine-proxai/grok-imagine-image-pro$0.071024×1024Grok high-quality
cogviewzai/cogview-4$0.015–$0.02512×512 to 1440×1440Cheapest — Zhipu CogView

Choosing a model:

  • Default → nano-banana
  • "high res" / "large" → banana-pro
  • "photorealistic" / complex scenes → gpt-image-2
  • "flagship quality" / reference image → seedream
  • "budget" / "cheap" → cogview
  • "top quality" / "best OpenAI" → flare (fast) or sunburst (precision)
  • "editable" / "inpainting" → gpt-image (cheapest), gpt-image-2, or sunburst (most precise)
  • "artistic" / flexible content → grok-imagine
  • "grok style" → grok-imagine or grok-imagine-pro

Choosing a size:

  • Default: 1024x1024 (the only size every model accepts)
  • Portrait: 1024x1536 (gpt-image / gpt-image-2 / flare / sunburst) or 1728x2304 (seedream)
  • Landscape: 1536x1024 (gpt-image / gpt-image-2 / flare / sunburst), 1344x768 (cogview), or 2048x1024 / 1280x720 (seedream)
  • High-res: 2048x2048 / 4096x4096 with banana-pro; 2848x1600 with seedream
  • The gateway validates size per model BEFORE payment and rejects unknown ones — do not invent sizes outside each model's list above

Edit an Existing Image

POST to http://localhost:8402/v1/images/image2image:

json
{
  "model": "openai/gpt-image-1",
  "prompt": "make the background a snowy mountain landscape",
  "image": "https://example.com/photo.jpg",
  "size": "1024x1024",
  "n": 1
}

ClawRouter automatically downloads URLs and reads local file paths — pass them directly, no manual base64 conversion needed.

Optional mask field: a second image (URL or path) that marks which areas to edit (white = edit, black = keep).

Response is identical to generation:

json
{
  "created": 1741460000,
  "data": [{ "url": "http://localhost:8402/images/xyz456.png", "revised_prompt": "..." }]
}

Supported models for editing: openai/gpt-image-1 (default, $0.02), openai/gpt-image-2 ($0.06), openai/gpt-image-2.5-sunburst ($0.28), google/nano-banana ($0.05), google/nano-banana-2 ($0.09), google/nano-banana-pro ($0.10). mask works with the OpenAI models only. openai/gpt-image-2.5-flare cannot edit.


Show full SKILL.md (223 more words)Show less

Example Interactions

User: Draw me a cyberpunk city at night → POST to /v1/images/generations, model nano-banana, prompt as given.

User: Generate a high-res portrait of a samurai → POST to /v1/images/generations, model seedream, size 1728x2304.

User: Edit this photo to add a sunset background: https://example.com/portrait.jpg → POST to /v1/images/image2image, model gpt-image, image = the URL, prompt = "add a warm sunset background".

User: Change the background in my image to a beach (attaches local file) → POST to /v1/images/image2image, image = the local file path, prompt describes the change.


Notes

  • Payment is automatic, and which rail it uses depends on how ClawRouter was started: an x402 USDC micropayment from the user's wallet, or a draw on account credit if a BlockRun API key is configured. Either way the agent does nothing.
  • If the call fails with a payment error, check GET http://localhost:8402/health and read authMode before telling the user how to fix it: wallet → fund the wallet at blockrun.ai; api-key → top up account credit at user.blockrun.ai/dashboard/credits. Naming the wrong one sends the user to a page that cannot fix their error.
  • Google models may return base64 internally — ClawRouter uploads automatically and returns a hosted URL
  • OpenAI image models enforce OpenAI content policy; use nano-banana or grok-imagine for more flexibility
  • Image editing works with gpt-image-1/2, sunburst and the nano-banana models (not flare, seedream, grok or cogview); generation supports all listed models

© BlockRunAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/imagegen of BlockRunAI/ClawRouter.

Open the folder on GitHubat commit b758e03

Compare with similar skills

BlockRun Image Generation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

BlockRun Image Generation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
BlockRun Image Generation this skillBlockRunAI/ClawRouter6.6k—~2.1kAutomated safety check: PassMIT
AI Image Generation and Editingzhayujie/CowAgent47k—~1.3kAutomated safety check: PassMIT
AI Image Creatorevolution-foundation/evo-nexus544—~5.1kAutomated safety check: NotesCustom licence
Generate ImageK-Dense-AI/claude-scientific-writer2.4k1 repos~3.8kAutomated safety check: NotesMIT
Image Gennicknisi/claude-plugins114—~502Automated safety check: PassMIT
GPT Image Generation CLIwuyoscar/GPT-Image2-Skill5.6k—~2.5kAutomated safety check: NotesMIT

Similar skills

  • Generates or edits images from text prompts through a Python script that picks an image backend based on which API keys are configured.

    47k GitHub stars~1.3k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • AI Image Creator

    evolution-foundation/evo-nexus

    Generates PNG images through OpenRouter models, with transparent backgrounds and reference-image edits, and describes existing images with multimodal vision.

    544 GitHub stars~5.1k tokensUpdated 4 mo ago
    Media & CreativeAuto-check: notes
  • Generate Image

    K-Dense-AI/claude-scientific-writer

    Generate or edit images with AI models through the OpenRouter Image API (Gemini, Seedream, Recraft, GPT-Image, Riverflow).

    2.4k GitHub starsUsed in 1 repo~3.8k tokens
    Media & CreativeAuto-check: notes
  • Image Gen

    nicknisi/claude-plugins

    Generate or edit images via Google Gemini (nano-banana-pro) or OpenAI gpt-image-2.

    114 GitHub stars~502 tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed
  • GPT Image Generation CLI

    wuyoscar/GPT-Image2-Skill

    Generates and edits images with GPT Image 2 or 2.5 through a packaged CLI and a prompt gallery, after settling which model fits the request.

    5.6k GitHub stars~2.5k tokensUpdated 7 days ago
    Media & CreativeAuto-check: notes
  • Nanobanana

    ReScienceLab/opc-skills

    Generate and edit images using Google Gemini 3 Pro Image (Nano Banana Pro).

    1.8k GitHub starsUsed in 1 repo~1.3k tokens
    Media & CreativeAuto-check passed

More from BlockRunAI/ClawRouter

  • Phone

    BlockRunAI/ClawRouter

    Verify phone numbers (carrier + SIM-swap fraud signals) and place AI-powered outbound voice calls via BlockRun's gateway (Twilio + Bland.ai).

    6.6k GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check passed
  • Polymarket Trading

    BlockRunAI/ClawRouter

    A skill your agent uses when the user wants to actually PLACE, manage, or redeem bets on Polymarket (not just read odds — that's the blockrunpredexon data tools).

    6.6k GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed
  • Predexon Prediction Market Data

    BlockRunAI/ClawRouter

    Reads structured prediction market data for Polymarket, Kalshi and other venues through a local BlockRun gateway: markets, search, leaderboards, wallet analytics and odds.

    6.6k GitHub stars~4.7k tokensUpdated 2 days ago
    Auto-check passed
  • ClawRouter Release Checklist

    BlockRunAI/ClawRouter

    Walks the agent through every ClawRouter release step in order, from the version bump and changelog entry to build, tests, npm publish, git tag and GitHub release.

    6.6k GitHub stars~1.4k tokensUpdated 2 days ago
    Auto-check passed
  • Surf

    BlockRunAI/ClawRouter

    Use this skill — NOT browser or webfetch — for ALL Surf crypto-data calls.

    6.6k GitHub stars~4k tokensUpdated 2 days ago
    Auto-check passed
  • ClawRouter LLM Gateway

    BlockRunAI/ClawRouter

    Describes ClawRouter, a local proxy that forwards each LLM request to the blockrun.ai gateway, which routes to a cheaper capable model, paid by USDC wallet or API key credit.

    6.6k GitHub stars~6.8k tokensUpdated 2 days ago
    Auto-check passed

Questions about BlockRun Image Generation

What does BlockRun Image Generation do?

Generates or edits images through ClawRouter's local image API, with a choice of models and sizes and payment handled automatically through x402. The agent sends a request to ClawRouter's local endpoint at http://localhost:8402/v1/images/generations with a model, prompt and size, then shows the returned image URL inline. A /cr-imagegen slash command accepts model, size and count options, and the blockrun_image_generation and blockrun_image_edit partner tools cover generating and inpainting.

When should I use BlockRun Image Generation?

BlockRun Image Generation fits situations like: generating an image from a text description; editing or retouching an existing image with a prompt; choosing between a cheap fast model and a high-resolution one.

How do I install BlockRun Image Generation in Claude Code?

Run `npx skills add BlockRunAI/ClawRouter --skill imagegen -a claude-code`. Or copy the skill folder (skills/imagegen in BlockRunAI/ClawRouter) into .claude/skills/imagegen in your project. Claude Code loads it when a task matches its description.

How do I install BlockRun Image Generation in Codex?

Run `npx skills add BlockRunAI/ClawRouter --skill imagegen -a codex`. Or copy the skill folder (skills/imagegen in BlockRunAI/ClawRouter) into .agents/skills/imagegen in your project. Codex loads it when a task matches its description.

Can I use BlockRun Image Generation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add BlockRunAI/ClawRouter --skill imagegen -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/imagegen, .gemini/skills/imagegen, .github/skills/imagegen and .opencode/skills/imagegen in your project.

What does BlockRun Image Generation need to run?

SKILL.md names no scripts, command-line tools or credentials: BlockRun Image Generation is instructions for the agent only. Our summary lists: ClawRouter running locally on port 8402; Payment through x402, handled by ClawRouter.

Does BlockRun Image Generation access the network?

SKILL.md names 2 domains. As links in the text: blockrun.ai and user.blockrun.ai. This is read from the text; nothing was executed.

Is BlockRun Image Generation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does BlockRun Image Generation use?

BlockRun Image Generation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does BlockRun Image Generation use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to BlockRun Image Generation?

Skills that share tags, products or a category with BlockRun Image Generation: AI Image Generation and Editing (zhayujie/CowAgent, 47k stars), AI Image Creator (evolution-foundation/evo-nexus, 544 stars), Generate Image (K-Dense-AI/claude-scientific-writer, 2.4k stars) and Image Gen (nicknisi/claude-plugins, 114 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains BlockRun Image Generation?

BlockRunAI (a GitHub organization) maintains it in BlockRunAI/ClawRouter, which has 6,614 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 5, 2026.

Source: BlockRunAI/ClawRouter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.