agentleFS
claude-worldclaude-world/claude-agent/.claude/skills/image-gen/SKILL.md

image-gen

Skill5 starsChanged 8 months agoMITView on GitHub

Generate images from text prompts using the OpenAI Images API (DALL-E 3) via curl. Supports single and batch generation with configurable size and quality. Use when user says "generate an image", "create a picture of", "make an image of", or "batch generate images".

  • Reads credentials

48 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use paid-ads, remotion-best-practices and 4 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • silvainfmSkill

    paid-ads

    When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ad copy,' 'ad creative,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' or 'audience targeting.' This skill covers campaign strategy, ad creation, audience targeting, and optimization.

    Also in 3 projects that use this

  • VercelSkill

    remotion-best-practices

    Best practices for Remotion - Video creation in React

    Also in 3 projects that use this

  • nilssonrSkill

    seo

    Full SEO workflow for auditing pages and creating SEO-optimized content. Provides checklists with educational explanations aligned with Google Search Central documentation.

    Also in 3 projects that use this

  • NVIDIASkill

    github

    Interact with GitHub using the gh CLI restricted to REST API only (no GraphQL). Use when the user wants to work with GitHub issues, pull requests, repos, releases, or Actions — especially in sandboxed environments where the GraphQL endpoint may be blocked. Trigger keywords - github, gh, pull request, PR, github issue, github actions, workflow, release, gh api.

    Also in 3 projects that use this

  • VercelSkill

    deploy

    Deploy applications to Vercel. Use when the user says "deploy", "deploy to Vercel", "push to production", "deploy my app", or "go live".

    Also in 3 projects that use this

  • Microsoft AzureSkill

    humanizer

    Tone enforcement patterns for external-facing community responses

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 36 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No CLI install needed — uses curl and jq (pre-installed on macOS/Linux).

    line 28
  2. Very specific:

    Always check that OPENAI_API_KEY is set: [[ -z "$OPENAI_API_KEY" ]] && echo "OPENAI_API_KEY not set"

    line 110
  3. Distinctive:

    Never print the API key value in output

    line 111
  4. Very specific:

    Default to dall-e-3, size 1024x1024, quality standard unless specified

    line 112
  5. Very specific:

    Always download images to workspace/ directory.

    line 113
  6. Very specific:

    Check API response for errors: jq '.error' before using the URL

    line 116

“Common” is measured: kept by at least 6 in 10 of the 36 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Image Gen

Generate images from text prompts using the OpenAI Images API (DALL-E 3) via curl. Requires an OPENAI_API_KEY environment variable.

Prerequisites

No CLI install needed — uses curl and jq (pre-installed on macOS/Linux).

Set up your API key:

export OPENAI_API_KEY="sk-..."
# Or add to ~/.zshrc / ~/.bashrc for persistence

Get a key: https://platform.openai.com/api-keys

Commands

Generate a single image (returns URL):

curl -s https://api.openai.com/v1/images/generations \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dall-e-3",
    "prompt": "A serene mountain lake at sunset, photorealistic",
    "n": 1,
    "size": "1024x1024",
    "quality": "standard"
  }' | jq -r '.data[0].url'

Generate HD image:

curl -s https://api.openai.com/v1/images/generations \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"dall-e-3","prompt":"<prompt>","n":1,"size":"1024x1024","quality":"hd"}' \
  | jq -r '.data[0].url'

Download generated image to file:

URL=$(curl -s https://api.openai.com/v1/images/generations \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"dall-e-3","prompt":"<prompt>","n":1,"size":"1024x1024","quality":"standard"}' \
  | jq -r '.data[0].url')
curl -s "$URL" -o workspace/image-output.png

Batch generate (loop):

PROMPTS=("prompt one" "prompt two" "prompt three")
for i in "${!PROMPTS[@]}"; do
  URL=$(curl -s https://api.openai.com/v1/images/generations \
    -H "Authorization: Bearer $OPENAI_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"model\":\"dall-e-3\",\"prompt\":\"${PROMPTS[$i]}\",\"n\":1,\"size\":\"1024x1024\",\"quality\":\"standard\"}" \
    | jq -r '.data[0].url')
  curl -s "$URL" -o "workspace/image-$i.png"
  echo "Saved workspace/image-$i.png"
done

Size Options

SizeUse Case
1024x1024Square (default, social media)
1792x1024Landscape (banners, thumbnails)
1024x1792Portrait (stories, posters)

Usage Examples

Generate a social media card image:

# Prompt + download to workspace
URL=$(curl -s https://api.openai.com/v1/images/generations \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"dall-e-3","prompt":"Minimalist tech blog cover, dark background, glowing circuit pattern, 1080x1080","n":1,"size":"1024x1024","quality":"hd"}' \
  | jq -r '.data[0].url')
curl -s "$URL" -o workspace/social-card.png

Rules

  • Always check that OPENAI_API_KEY is set: [[ -z "$OPENAI_API_KEY" ]] && echo "OPENAI_API_KEY not set"
  • Never print the API key value in output
  • Default to dall-e-3, size 1024x1024, quality standard unless specified
  • Always download images to workspace/ directory; never just return raw URLs
  • Name output files descriptively: workspace/image-<slug>.png
  • For batch jobs, generate one at a time sequentially to avoid rate limits
  • Check API response for errors: jq '.error' before using the URL
  • Confirm completion with: "Generated <N> image(s) → workspace/<filename>"
  • DALL-E 3 limit is n=1 per request; for multiple images, loop the request

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.