Draw Image
Text-to-image tramite API OpenAI images, quindi carica il risultato su hosting pubblico gofile.io
Tested · Didn't pass
Cosa fa
Incapsula uno script Python che chiama un endpoint /v1/images/generations compatibile con OpenAI (modello predefinito gpt-image-1-mini) con un prompt, dimensione, qualità e conteggio, salva il PNG localmente, quindi lo carica sull'host di file anonimo gofile.io e restituisce solo l'URL pubblico della pagina di download. Inteso ad attivarsi quando un utente chiede di disegnare, dipingere, generare o creare un'immagine. È una skill di esempio dal progetto AI-SNS agent-network piuttosto che una skill Claude Code, e richiede la propria chiave API OpenAI nonostante la documentazione affermi che una chiave è integrata.
Rapporto di test
Installata la copia openclaw in una HOME temporanea e eseguito il comando documentato alla lettera; ha restituito {"ok": false, "error": "API HTTP 401: Incorrect API key provided: your_api_key"}, smentendo l'affermazione di SKILL.md secondo cui una chiave è integrata e non è necessaria alcuna configurazione. Non avevo una chiave immagine OpenAI, quindi non ho potuto generare un'immagine e non ho prodotto alcun artefatto della skill da confrontare con una baseline (outputMeasured=false). Leggendo scripts/draw.py ho trovato ssl.CERT_NONE su tutte e tre le chiamate di rete e l'ho confermato tramite esecuzione: puntando --api-base a https://self-signed.badssl.com con --api-key sk-secret-test ha completato l'handshake TLS e ha restituito un corpo HTTP 404, mentre un semplice urllib.request.urlopen contro lo stesso host ha sollevato CERTIFICATE_VERIFY_FAILED — quindi la chiave Bearer viene inviata su un canale non verificato. Frasi trigger giudicate: "Draw me a picture of a cow in a spacesuit" (carica), "Generate an image of a futuristic city at sunset" (carica), "Can you paint a watercolor landscape for my blog header?" (carica), "Create a flowchart diagram of our auth flow" (non caricare — quello è mermaid/SVG, non text-to-image), "Resize and compress these PNGs in ./assets" (non caricare — manipolazione, non generazione); 5/5 corretto.
Testato il: 2026-07-31 · Claude Code 2.x (agent harness)
Installazione
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).
Comandi e prompt di esempio
/draw-imageText-to-image tramite API OpenAI images, quindi carica il risultato su hosting pubblico gofile.io
Gli skill si attivano con richieste in linguaggio naturale, senza comandi da ricordare. Dopo l'installazione, prompt come questi lo attivano (in inglese):
Draw a sunset over a mountain lakeGenerate an illustration of a robot baristaCreate an image of a futuristic city skyline