# zimage-generation

This skill sends a text prompt to Z-Image through the ModelScope API and saves the generated image. Use it when an agent needs to create an image from a description.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 868 installs · ★ 12
- Author: Toolsai
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Toolsai/Free-Zimage-Skills/tree/HEAD/SKILL.md
- Updated: 2026-01-25
- HTML: https://affpapa.org/en/nevibecode/skills/zimage-generation

## What it does

The skill runs `scripts/generate_zimage.py`, a Python script that calls the ModelScope Inference API. Provide a prompt, choose where to save the result with `--output` or `-o`, and optionally select a model with `--model`.

It requires Python 3, the `requests` package, and a ModelScope API key. Supply the key with `--api-key`, place it in the script’s `DEFAULT_API_KEY` variable, or save it as `MODELSCOPE_API_TOKEN` in `scripts/.env`. The script will not run without Python 3 and `requests`.

A 401 response that refers to Alibaba Cloud account binding means ModelScope access needs that account link. Sign in to ModelScope and bind the Alibaba Cloud account before using the API.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Toolsai/Free-Zimage-Skills --skill zimage-generation -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Toolsai/Free-Zimage-Skills --skill zimage-generation -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Toolsai/Free-Zimage-Skills --skill zimage-generation -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Toolsai/Free-Zimage-Skills zimage-generation
```

2. **Manually: put the files in place**
- File: `.github/skills/zimage-generation/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Toolsai/Free-Zimage-Skills --skill zimage-generation -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Toolsai/Free-Zimage-Skills
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Toolsai/Free-Zimage-Skills --skill zimage-generation -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/Toolsai/Free-Zimage-Skills/tree/HEAD/SKILL.md

## When to use it
- generate an image from a text prompt
- choose an output file for the generated image
- select a model with `--model`
- pass a ModelScope API key at launch

## Example prompts
- Generate a Z-Image illustration of a quiet street at dusk.
- Create an image from this description and save it as `cover.png`.
- Use model `model-id` and my ModelScope key to generate an image.

## Similar
- [skill-creator](https://affpapa.org/en/nevibecode/skills/skill-creator.md) — skill · 414180 installs
- [writing-for-agents](https://affpapa.org/en/nevibecode/skills/writing-for-agents.md) — skill · 466719 installs
- [media-use](https://affpapa.org/en/nevibecode/skills/media-use.md) — skill · 1100000 installs
- [mcp-builder](https://affpapa.org/en/nevibecode/skills/mcp-builder.md) — skill · 130949 installs
- [subagent-driven-development](https://affpapa.org/en/nevibecode/skills/subagent-driven-development.md) — skill · 237746 installs
- [orchestration](https://affpapa.org/en/nevibecode/skills/orchestration.md) — skill · 349800 installs

---
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
