Back to Skills

image-generation

verified

AI image generation using Pollinations.ai with Stable Horde fallback - FREE with no API key required. Use when generating hero images, icons, logos, illustrations, mockups, or any visual assets for websites and apps. Covers product shots, avatars, placeholders, and social media images with professional quality.

View on GitHub

Marketplace

specweave

anton-abyzov/specweave

Plugin

sw

development

Repository

anton-abyzov/specweave
31stars

plugins/specweave/skills/image-generation/SKILL.md

Last Verified

February 3, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/anton-abyzov/specweave/blob/main/plugins/specweave/skills/image-generation/SKILL.md -a claude-code --skill image-generation

Installation paths:

Claude
.claude/skills/image-generation/
Powered by add-skill CLI

Instructions

# AI Image Generation Skill

Expert in generating professional-quality images using multi-provider resilience: **Pollinations.ai** (primary) with **Stable Horde** (fallback) - both FREE, no API keys required.

## ⚠️ CRITICAL: Health Check First (MANDATORY)

**BEFORE generating any image, ALWAYS run this CONTENT-BASED health check:**

⚠️ **WARNING**: HTTP 200 status is NOT sufficient! Pollinations may return 200 but with error text instead of image data. **ALWAYS verify the response is actually an image.**

```bash
# ROBUST health check - verifies actual image content (not just HTTP status)
TEMP_FILE=$(mktemp)
curl -s -L -o "$TEMP_FILE" --max-time 10 "https://image.pollinations.ai/prompt/blue%20square?width=64&height=64&nologo=true"
CONTENT_TYPE=$(file -b "$TEMP_FILE" | head -c 10)

if [[ "$CONTENT_TYPE" == "PNG image" ]] || [[ "$CONTENT_TYPE" == "JPEG image" ]]; then
    echo "✅ HEALTHY - Use Pollinations"
else
    echo "❌ BROKEN - Use Stable Horde (got: $CONTENT_TYPE)"
    cat "$TEMP_FILE"  # Show error message
fi
rm -f "$TEMP_FILE"
```

### Decision Tree Based on CONTENT (Not Just Status)

| Content Check | Meaning | Action |
|---------------|---------|--------|
| `PNG image data` | ✅ Healthy | Use Pollinations.ai |
| `JPEG image data` | ✅ Healthy | Use Pollinations.ai |
| `ASCII text` | ❌ Service error (502/503 in body) | **→ Use Stable Horde** |
| `HTML document` | ❌ Error page | **→ Use Stable Horde** |
| Empty/timeout | ❌ Network error | **→ Use Stable Horde** |

### Automated Provider Selection Script (ROBUST VERSION)

```bash
#!/bin/bash
# save as: check-image-api.sh
# IMPORTANT: This checks CONTENT, not just HTTP status!

TEMP_FILE=$(mktemp)
curl -s -L -o "$TEMP_FILE" --max-time 15 \
  "https://image.pollinations.ai/prompt/test%20square?width=64&height=64&nologo=true" 2>/dev/null

CONTENT_TYPE=$(file -b "$TEMP_FILE" 2>/dev/null | cut -d',' -f1)
rm -f "$TEMP_FILE"

if [[ "$CONTENT_TYPE" == "PNG image data" ]] || [[ "$CONTENT_TYPE" == "JPEG image data" ]]; th

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
29763 chars