Skip to main content
skill CX Codex

zimage-generation — Claude Code skill for image 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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Toolsai/Free-Zimage-Skills --skill zimage-generation -a claude-code
Open on GitHub

What zimage-generation 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.

What it helps with

  • 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 for the agent

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

How to install zimage-generation

1Skills CLI (Vercel)

npx skills add Toolsai/Free-Zimage-Skills --skill zimage-generation -a claude-code

2Manually: put the files in place

~/.claude/skills/zimage-generation/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/zimage-generation/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about zimage-generation

How do I install zimage-generation in Claude Code?

Run npx skills add Toolsai/Free-Zimage-Skills --skill zimage-generation -a claude-code. The skill file will be at ~/.claude/skills/zimage-generation/SKILL.md.

What does zimage-generation do?

It passes a text prompt to Z-Image through the ModelScope Inference API and generates an image using a Python script.

What does zimage-generation need to run?

It needs Python 3, the requests package, and a ModelScope API key. Provide the key with --api-key, set it in the script, or store it in scripts/.env.

Similar skills

All skills for AI and ML →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor