Skills chatgpt-image-generation
Generate images from ChatGPT using Playwright browser automation. Opens ChatGPT, sends prompts, waits for generation, and saves the resulting images.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/amian/chatgpt-image-generation" ~/.claude/skills/openclaw-skills-chatgpt-image-generation && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/amian/chatgpt-image-generation" ~/.openclaw/skills/openclaw-skills-chatgpt-image-generation && rm -rf "$T"
manifest:
skills/amian/chatgpt-image-generation/SKILL.mdsource content
ChatGPT Image Generation Skill
Use Playwright to automate ChatGPT web UI for image generation.
Prerequisites
npm install playwright npx playwright install chromium
Usage
# Generate images from prompts file node generate.js --prompts prompts.json --output ./images # Resume from a specific index node generate.js --prompts prompts.json --output ./images --start 5 # Run in headless mode node generate.js --prompts prompts.json --output ./images --headless
Prompt File Format
["prompt 1", "prompt 2"]
or
{ "prompts": ["prompt 1", "prompt 2"] }
How It Works
- Opens ChatGPT in a Chrome browser
- Sends each prompt from the prompts file
- Waits for the response to be generated
- Finds the generated image in the page
- Saves the image to the output directory
- Repeats for all prompts
Output
- Numbered image files:
,001.png
, etc.002.png
— log of results per promptresults.jsonl
Login (One-Time)
If not logged into ChatGPT:
- Run the script (browser will open visible)
- Sign into ChatGPT
- Session is saved for future runs