Draw Image

Text-zu-Bild über OpenAI images API, lädt dann das Ergebnis auf gofile.io Public Hosting hoch

von ai-sns · ai-sns/ai-sns

Tested · Didn't pass

Draw Image — Text-zu-Bild über OpenAI images API, lädt dann das Ergebnis auf gofile.io Public Hosting hoch

Was es kann

Umschließt ein Python-Skript, das einen OpenAI-kompatiblen /v1/images/generations-Endpunkt (Standardmodell gpt-image-1-mini) mit einem Prompt, Größe, Qualität und Anzahl aufruft, das PNG lokal speichert, es dann auf den anonymen Dateihost gofile.io hochlädt und nur die öffentliche Download-Seiten-URL zurückgibt. Soll ausgelöst werden, wenn ein Benutzer darum bittet, ein Bild zu zeichnen, zu malen, zu generieren oder zu erstellen. Es ist eine Beispiel-Fähigkeit aus dem AI-SNS Agenten-Netzwerkprojekt und keine Claude Code-Fähigkeit und erfordert Ihren eigenen OpenAI API key, obwohl die Dokumentation behauptet, ein Key sei eingebaut.

Testbericht

Die openclaw-Kopie in ein temporäres HOME installiert und den dokumentierten Befehl wörtlich ausgeführt; es gab {"ok": false, "error": "API HTTP 401: Incorrect API key provided: your_api_key"} zurück, was die Behauptung von SKILL.md widerlegte, dass ein Key eingebaut sei und keine Konfiguration erforderlich sei. Ich hatte keinen OpenAI image key, daher konnte ich kein Bild generieren und produzierte kein Skill-Artefakt zum Vergleich mit einer Baseline (outputMeasured=false). Beim Lesen von scripts/draw.py fand ich ssl.CERT_NONE bei allen drei Netzwerkaufrufen und bestätigte dies durch Ausführung: Das Zeigen von --api-base auf https://self-signed.badssl.com mit --api-key sk-secret-test schloss den TLS-Handshake ab und gab einen HTTP 404-Body zurück, während ein einfacher urllib.request.urlopen gegen denselben Host CERTIFICATE_VERIFY_FAILED auslöste – der Bearer key wird also über einen unbestätigten Kanal gesendet. Auslöser-Formulierungen beurteilt: "Draw me a picture of a cow in a spacesuit" (laden), "Generate an image of a futuristic city at sunset" (laden), "Can you paint a watercolor landscape for my blog header?" (laden), "Create a flowchart diagram of our auth flow" (nicht laden – das ist mermaid/SVG, nicht Text-zu-Bild), "Resize and compress these PNGs in ./assets" (nicht laden – Manipulation, nicht Generierung); 5/5 korrekt.

Getestet am: 2026-07-31 · Claude Code 2.x (agent harness)

Installation

git clone --depth 1 https://github.com/ai-sns/ai-sns.git /tmp/draw-image-src
mkdir -p ~/.claude/skills
cp -R /tmp/draw-image-src/adapters/openclaw/skill_example/draw-image ~/.claude/skills/draw-image
# Requires python3 (stdlib only) AND your own OpenAI API key with image-generation access.
# SKILL.md claims "The script has a built-in API base and key, so no extra configuration is
# needed" -- this is FALSE. The shipped DEFAULT_API_KEY is the literal string "your_api_key"
# and OpenAI returns HTTP 401. You must set: export DRAW_IMAGE_API_KEY=sk-...
# (optionally export DRAW_IMAGE_API_BASE=https://your-openai-compatible-host/v1)
# SECURITY, read before using: scripts/draw.py sets ssl.CERT_NONE + check_hostname=False on
# every request, including the one carrying "Authorization: Bearer <your key>". Verified by
# execution: it completed a handshake with https://self-signed.badssl.com while stock
# urllib refused the same host with CERTIFICATE_VERIFY_FAILED. Your API key is MITM-able.
# Also: every generated image is unconditionally uploaded to gofile.io (anonymous public file
# sharing) with no opt-out flag, and only that public URL is returned.
# Run: python3 ~/.claude/skills/draw-image/scripts/draw.py --prompt "a cow" --size 1024x1024
# (SKILL.md's own examples hardcode C:\Users\IDD\.openclaw\workspace\skills\... and will not run.)
# Two other copies exist in the repo: adapters/hermes/skill_example/ai-sns/draw-image (identical
# script, ~/.hermes paths) and aisns_backend/skills/draw-image (NOT Claude Code compatible --
# non-standard frontmatter with runner/skill_key, and its draw.py reads creds from a local
# SQLite DB belonging to the AI-SNS backend).

Befehle & Beispiel-Prompts

  • /draw-imageText-zu-Bild über OpenAI images API, lädt dann das Ergebnis auf gofile.io Public Hosting hoch

Skills reagieren auf normale Anfragen — keine Slash-Befehle nötig. Nach der Installation aktivieren Prompts wie diese den Skill (auf Englisch):

  • Draw a sunset over a mountain lake
  • Generate an illustration of a robot barista
  • Create an image of a futuristic city skyline