# Send DrawThings Image Generation to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "drawthings",
    "name": "DrawThings Image Generation",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/dustinparsons/drawthings",
    "canonicalUrl": "https://clawhub.ai/dustinparsons/drawthings",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/drawthings",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=drawthings",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/api-reference.md",
      "references/models.md",
      "scripts/generate.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "drawthings",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-02T18:08:37.977Z",
      "expiresAt": "2026-05-09T18:08:37.977Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=drawthings",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=drawthings",
        "contentDisposition": "attachment; filename=\"drawthings-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "drawthings"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/drawthings"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/drawthings",
    "downloadUrl": "https://openagent3.xyz/downloads/drawthings",
    "agentUrl": "https://openagent3.xyz/skills/drawthings/agent",
    "manifestUrl": "https://openagent3.xyz/skills/drawthings/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/drawthings/agent.md"
  }
}
```
## Documentation

### DrawThings Image Generation

Generate images using DrawThings, a local Stable Diffusion implementation for Mac with MLX/CoreML acceleration. DrawThings exposes an Automatic1111-compatible API for programmatic image generation.

### When to Use

Use this skill when you need to:

Generate images from text prompts
Create variations of a concept
Batch generate multiple images
Test different models/samplers/settings
Generate images with specific dimensions or quality settings

### Configuration

Set the DRAWTHINGS_URL environment variable (defaults to http://127.0.0.1:7860):

export DRAWTHINGS_URL="http://127.0.0.1:7860"

Or configure in OpenClaw:

openclaw config set env.DRAWTHINGS_URL "http://127.0.0.1:7860"

### Quick Start

Generate a single image:

python3 scripts/generate.py "a cyberpunk cat in neon city"

With custom settings:

python3 scripts/generate.py "a cyberpunk cat" \\
  --steps 20 \\
  --cfg-scale 7.5 \\
  --width 768 \\
  --height 768 \\
  --sampler "DPM++ 2M Karras"

Batch generation (5 variations):

python3 scripts/generate.py "a fantasy landscape" --batch-size 5

Save to specific location:

python3 scripts/generate.py "portrait photo" --output ./outputs/portrait.png

### API Usage

The skill provides a Python script that wraps the DrawThings API (Automatic1111-compatible):

Main endpoint: POST /sdapi/v1/txt2img

Common parameters:

prompt - Text description of the image
negative_prompt - What to avoid in the image
steps - Number of diffusion steps (8-50, default: 20)
sampler_name - Sampler algorithm (default: "DPM++ 2M Karras")
cfg_scale - Classifier-free guidance scale (1.0-20.0, default: 7.0)
width / height - Image dimensions (default: 512x512)
batch_size - Number of images to generate (default: 1)
seed - Random seed for reproducibility (-1 for random)

See references/api-reference.md for complete API documentation.

### Presets

Fast (8 steps, UniPC Trailing):

python3 scripts/generate.py "your prompt" --preset fast

Quality (30 steps, DPM++ 2M Karras):

python3 scripts/generate.py "your prompt" --preset quality

NFT (optimized for 512x512 with good detail):

python3 scripts/generate.py "your prompt" --preset nft

### Workflow Examples

Character variations:

python3 scripts/generate.py "electric sheep, glowing wool, cyberpunk" \\
  --batch-size 10 \\
  --steps 20 \\
  --cfg-scale 7.5

High-res output:

python3 scripts/generate.py "detailed portrait" \\
  --width 1024 \\
  --height 1024 \\
  --steps 30 \\
  --sampler "DPM++ 2M Karras"

Reproducible generation:

python3 scripts/generate.py "landscape" --seed 42
# Re-run with same seed for identical output

### Output

Images are saved as PNG files with metadata embedded:

Prompt, negative prompt
Generation parameters (steps, sampler, cfg_scale, etc.)
Timestamp and seed

Default location: ./drawthings_output_YYYYMMDD_HHMMSS.png

### Troubleshooting

"Connection refused"

Ensure DrawThings is running
Check the API server is enabled in DrawThings preferences
Verify the port matches (default: 7860)

"Generation failed"

Check prompt length (max ~75 tokens per CLIP model)
Reduce dimensions if out of memory
Try a different sampler

Slow generation

Use fewer steps (8-12 for drafts)
Reduce image dimensions (512x512)
Use faster samplers (UniPC, Euler A)

Canvas display quirk (visual only)

DrawThings UI doesn't clear the canvas between generations
New images appear to render on top of previous ones in the app
This is purely cosmetic - API outputs are unaffected

### Tips

CFG Scale: Lower (1-3) for creative/artistic, higher (7-12) for prompt adherence
Steps: 8-12 for drafts, 20-30 for final images, 50+ rarely needed
Samplers: UniPC/Euler A are fast, DPM++ 2M Karras is quality, LCM for ultra-fast
Dimensions: Keep to multiples of 64 (512, 768, 1024)
Batch processing: Use --batch-size for variations, not multiple script calls

### Models

DrawThings supports Stable Diffusion models. To change models:

Open DrawThings app
Select model from the UI
The API will use the currently selected model

See references/models.md for recommended models and download sources.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: dustinparsons
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-02T18:08:37.977Z
- Expires at: 2026-05-09T18:08:37.977Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/drawthings)
- [Send to Agent page](https://openagent3.xyz/skills/drawthings/agent)
- [JSON manifest](https://openagent3.xyz/skills/drawthings/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/drawthings/agent.md)
- [Download page](https://openagent3.xyz/downloads/drawthings)