/essentials:gpt-image-2from essentials
Generates images from text prompts using OpenAI's gpt-image-2 API and saves them into the project. Useful for creating hero images, OG images, logos, illustrations, or placeholders.
Ships in essentials. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Front door for "I need an image" requests in this codebase. The skill shells out to a small bash script that calls OpenAI's image-generation endpoint and writes the resulting PNG into the project, then hands control back to you to wire the image up however the user asked.
The script reads the API key from .openai-key at the project root (the current working directory).
If .openai-key does not exist or is empty, stop and tell the user verbatim:
I need an OpenAI API key to call gpt-image-2. Paste your key into a file named
.openai-keyat the root of your project (same directory aspackage.json), then re-run. The file is git-ignored on most setups, but double-check.gitignorebefore committing.
Do not prompt them for the key inline — the script only reads from disk.
Ask only for whichever is missing:
public/og-image.png, src/assets/hero.png). If the user already implied a destination ("set this as the og image", "use it as the hero on the landing page"), infer the path from the project's existing convention by listing the relevant folder first.1024x1024. Common: 1024x1024, 1024x1792 (portrait), 1792x1024 (landscape).From the project root:
bash "${CLAUDE_PLUGIN_ROOT}/skills/gpt-image-2/generate.sh" "<prompt>" <output-path> [size]
The script:
.openai-key exists and is non-empty (exits with a clear message otherwise).https://api.openai.com/v1/images/generations with model: "gpt-image-2".b64_json (or downloads url as a fallback) and writes the PNG to the output path, creating parent dirs as needed.Continue with whatever the user originally asked — this skill only handles generation. Typical follow-ups:
head() (TanStack Start) or metadata (Next.js) to point at the new file.If the user did not specify a follow-up, report the output path and ask what to do next. Do not invent integrations.
exit 3 → .openai-key missing or empty. Show the verbatim message above.exit 4 → OpenAI returned an API error (invalid key, billing, content policy, model name). Surface the error JSON to the user; do not retry silently.jq not installed → tell the user to brew install jq (mac) or the equivalent for their OS; the script depends on it for safe JSON encoding.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
image-generation, openai, gpt-image-2, ai-image, asset-creation
npx claudepluginhub agentsystemlabs/essentials --plugin agentsystem-essentials2 skills in this plugin
Other plugins' skills for the same job