image-generator

Generate images from text prompts via CLI or library using ModelScope and Gemini backends.

598|75|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/wlzh/skills --skill image-generator-wlzh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: image-generator
Source: https://github.com/wlzh/skills/tree/main/image-generator
Command: npx skills add https://github.com/wlzh/skills --skill image-generator-wlzh

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, Pillow, google-generativeai, and includes scripts (resource) components.

What problem does it solve?

This Skill provides a simple way for designers and content creators to generate high-quality images from text prompts, reducing manual drawing time and speeding up visual assets creation.

Core Features & Use Cases

  • Multi-model support: Switch between ModelScope and Gemini to fit accuracy, speed, and cost.
  • Library for integration: Can be imported into other Skills as a reusable image generator.
  • CLI and automation ready: Works from the command line or inside automation pipelines to generate visuals on demand.
  • Use Case: Generate a blog cover image, product visuals, or social media banners from concise prompts.

Quick Start

  • 方式 1:直接命令行调用 python3 ~/.claude/skills/image-generator/generate_image.py "A golden cat" python3 ~/.claude/skills/image-generator/generate_image.py "A golden cat" --output /path/to/image.jpg python3 ~/.claude/skills/image-generator/generate_image.py "A golden cat" --model "Tongyi-MAI/Z-Image-Turbo" python3 ~/.claude/skills/image-generator/generate_image.py "A golden cat" --api-type modelscope

  • 方式 2:在其他 Skills 中导入使用 import sys from pathlib import Path image_gen_path = Path.home() / ".claude/skills/image-generator" sys.path.insert(0, str(image_gen_path)) from generate_image import ImageGenerator generator = ImageGenerator(api_type="modelscope") image_path = generator.generate(prompt="A beautiful landscape", output_path="/path/to/output.jpg") print(f"图片已生成: {image_path}")

Frequently Asked Questions about image-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate AI images from text prompts using Python CLI?

To generate AI images from text prompts using Python, execute the CLI script with your prompt string, optionally specifying the output path and model. This enables quick image generation directly from the command line.

Can I use ModelScope and Gemini to generate images in the same workflow?

Yes, you can generate images using both ModelScope and Gemini. The tool supports multi-model switching via the `--api-type` and `--model` arguments to fit your specific accuracy, speed, and cost requirements.

Do I need an API key to generate AI images with ModelScope or Gemini?

Yes, you need an API key to generate AI images with ModelScope or Gemini. The tool relies on a local configuration file that securely supports API keys to authenticate your backend requests.

How do I import an AI image generator into another Python script?

To import an AI image generator into another script, add the skill directory to `sys.path` and instantiate the `ImageGenerator` class. You can then programmatically call the `generate` method with your prompt and output path.

What is the best way to automate blog cover image generation?

The best way to automate blog cover image generation is integrating this tool into your automation pipelines. It works from the command line or as an imported library to generate visuals on demand from concise text prompts.

Are there limitations when switching AI models for image generation?

Limitations when switching AI models for image generation depend on the specific ModelScope or Gemini backend chosen. Users must consider the distinct accuracy, speed, and cost trade-offs inherent to each selected model.