# canghe-image-gen

Generates AI images via OpenAI, Google, DashScope, and Canghe APIs. Handles text prompts, aspect ratios, and reference files right inside coding agents.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 594 installs · ★ 469
- Author: freestylefly
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/freestylefly/canghe-skills/tree/HEAD/skills/canghe-image-gen/SKILL.md
- Updated: 2026-06-08
- HTML: https://affpapa.org/en/nevibecode/skills/canghe-image-gen

## What it does

The skill executes a TypeScript script through Bun to invoke upstream image generation endpoints. Google acts as the default provider, but you can explicitly route requests to OpenAI, DashScope, or the Canghe gateway. It accepts prompt strings, reads concatenated markdown prompt files, and maps ratios such as 16:9 or 1:1.

You must provide at least one valid provider API key in your environment or a `.env` file before running jobs. The runner creates images sequentially by default to keep output predictable. Parallel execution runs via background subagents only when explicitly requested, with concurrency recommended at 4 and capped at 8. Project-level defaults can be pinned in an `EXTEND.md` config file.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add freestylefly/canghe-skills --skill canghe-image-gen -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/canghe-image-gen/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/canghe-image-gen/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add freestylefly/canghe-skills --skill canghe-image-gen -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/canghe-image-gen/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add freestylefly/canghe-skills --skill canghe-image-gen -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/canghe-image-gen/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install freestylefly/canghe-skills canghe-image-gen
```

2. **Manually: put the files in place**
- File: `.github/skills/canghe-image-gen/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add freestylefly/canghe-skills --skill canghe-image-gen -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/freestylefly/canghe-skills --path skills/canghe-image-gen
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/canghe-image-gen/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add freestylefly/canghe-skills --skill canghe-image-gen -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/freestylefly/canghe-skills/tree/HEAD/skills/canghe-image-gen/SKILL.md

## When to use it
- generate illustrations from text prompts inside coding agents
- edit images using reference files through multimodal models
- compose complex prompts from multiple local text files
- enforce target aspect ratios and resolution presets

## Example prompts
- Generate a cat illustration and save it to cat.png with a 16:9 aspect ratio
- Edit source.png to have a blue background using Google API and save to out.png
- Create an image from prompt files system.md and content.md with 2k quality

## Similar
- [baoyu-image-gen](https://affpapa.org/en/nevibecode/skills/baoyu-image-gen.md) — skill · 33600 installs
- [skill-image-gen](https://affpapa.org/en/nevibecode/plugins/skill-image-gen.md) — plugin · ★ 40418
- [imagencn](https://affpapa.org/en/nevibecode/skills/imagencn.md) — skill · 1700 installs
- [seo-image-gen](https://affpapa.org/en/nevibecode/skills/seo-image-gen.md) — skill · 6100 installs
- [gpt-image-2](https://affpapa.org/en/nevibecode/skills/gpt-image-2.md) — skill · 84300 installs
- [gpt-image-1-5](https://affpapa.org/en/nevibecode/skills/gpt-image-1-5.md) — skill · 615 installs

From the same set: [freestylefly/canghe-skills](https://affpapa.org/en/nevibecode/by/freestylefly/canghe-skills.md) — 8 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
