Agent skill

Generate Images Mai

by pamelafox in pamelafox/presentation-skills

Generate or edit bitmap images with Microsoft MAI-Image-2.5 through the Azure AI image APIs.

MITAuto-check: notesMedia & Creative

Install Generate Images Mai

skills CLI
$ npx skills add pamelafox/presentation-skills --skill generate-images-mai -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install pamelafox/presentation-skills generate-images-mai --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/pamelafox/presentation-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/generate-images-mai .claude/skills/generate-images-mai && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
generate-images-mai
GitHub stars
125
Token cost
~1.5k tokens
SKILL.md length
657 words
Files
3 (incl. scripts)
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Generate or edit bitmap images with Microsoft MAI-Image-2.5 through the Azure AI image APIs.

  • Works in 5 steps: Determine the requested subject or edit,… → For an edit, confirm that the input is a… → If the prompt is underspecified,… → …
  • Text-to-image generation
  • SKILL.md covers Requirements, Procedure, Options and API behavior, plus 3 more sections
  • Runs Python scripts from its folder; calls python3; needs AZURE_API_KEY

What it does

Generate Images Mai is an agent skill from pamelafox/presentation-skills. Generate or edit bitmap images with Microsoft MAI-Image-2.5 through the Azure AI image APIs. Use for text-to-image generation, image-to-image edits, object removal or replacement, inpainting, text updates, artifact cleanup, reference-image transformations, posters, thumbnails, and concept art.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including scripts (for example `scripts/generate_image.py` and `scripts/test_generate_image.py`).

It sits in Media & Creative, covering Image generation. It works with Microsoft Azure. The repository describes itself as: Skills for AI agents to process presentations - helpful for teachers and speakers. The licence is MIT.

When your agent uses it

  • Text-to-image generation
  • Image-to-image edits
  • Artifact cleanup
  • Reference-image transformations

Example prompts

  • “/generate-images-mai”

Requirements

  • Python 3
  • A credential in AZURE_API_KEY

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Determine the requested subject or edit, intended use, output path, dimensions, and visual constraints from the conversation.
  2. For an edit, confirm that the input is a readable JPEG or PNG. Preserve the original composition or identity unless the request says…
  3. If the prompt is underspecified, preserve the user's intent and add only useful visual detail: medium, composition, environment, lighting…
  4. Default to 1024x1024 and generated_image.png for generation. Generation dimensions must each be at least 768 pixels and contain no more…
  5. Run generate_image.py with the refined prompt. Pass arguments as separate shell tokens and quote all user-provided values.

What it can do on your machine

Read from SKILL.md and the folder at commit 2b809b3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • learn.microsoft.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • AZURE_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Generate Images Mai loads about 1.5k tokens when it runs. Until then it costs about 79 tokens; SKILL.md has 657 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:16
    - A `.env` file in the current directory or one of its parents:
  • NoteMentions a .env fileSKILL.md:25
    ommands, logs, or chat. Do not create a `.env` containing a real secret. If configuration is missing, tell the user whic
  • NoteMentions a .env fileSKILL.md:67
    - `--env-file`: Loads a specific `.env` file instead of searching parent directories.
  • NoteMentions a .env fileSKILL.md:70
    process take precedence over values in `.env`.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from pamelafox/presentation-skills at commit 2b809b3, republished under its MIT licence (© pamelafox). 657 words, ~1,458 tokens.

Download SKILL.mdSave it as .claude/skills/generate-images-mai/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
generate-images-mai
description
Generate or edit bitmap images with Microsoft MAI-Image-2.5 through the Azure AI image APIs. Use for text-to-image generation, image-to-image edits, object removal or replacement, inpainting, text updates, artifact cleanup, reference-image transformations, posters, thumbnails, and concept art.
argument-hint
Describe the image or edit and optionally provide an input image, output path, width, and height
user-invocable
true
disable-model-invocation
false

Generate and edit images with MAI-Image-2.5

Create an image from text or edit a supplied JPEG or PNG, save the result, and verify that the output is usable.

Requirements

  • Python 3.10+.
  • A .env file in the current directory or one of its parents:
dotenv
AZURE_API_KEY=your-key
AZURE_IMAGE_ENDPOINT=https://your-resource.services.ai.azure.com/mai/v1/images/generations

The endpoint can be the resource root, /mai/v1/images, /generations, or /edits; the script selects the operation-specific path.

Never read, print, return, commit, or embed the API key in generated files, commands, logs, or chat. Do not create a .env containing a real secret. If configuration is missing, tell the user which variable to add without asking them to send its value through chat.

Procedure

  1. Determine the requested subject or edit, intended use, output path, dimensions, and visual constraints from the conversation.
  2. For an edit, confirm that the input is a readable JPEG or PNG. Preserve the original composition or identity unless the request says otherwise.
  3. If the prompt is underspecified, preserve the user's intent and add only useful visual detail: medium, composition, environment, lighting, palette, camera or rendering style, and important exclusions. Do not introduce brands, people, text, or sensitive attributes the user did not request.
  4. Default to 1024x1024 and generated_image.png for generation. Generation dimensions must each be at least 768 pixels and contain no more than 1,048,576 total pixels. Edit output is always PNG and dimensions are controlled by the service.
  5. Run generate_image.py with the refined prompt. Pass arguments as separate shell tokens and quote all user-provided values.

Text-to-image generation:

bash
python3 .agents/skills/generate-images-mai/scripts/generate_image.py \
  --prompt "A photograph of a red fox in an autumn forest" \
  --width 1024 \
  --height 1024 \
  --output generated_image.png

Image-to-image edit:

bash
python3 .agents/skills/generate-images-mai/scripts/generate_image.py \
  --prompt "Replace the lawn with a native wildflower garden while preserving the house and paths" \
  --input-image garden.png \
  --output edited_garden.png
  1. If the destination exists, do not overwrite it unless the user explicitly requested replacement; use a new descriptive filename or pass --force only with that permission.
  2. Verify the output exists, is non-empty, and can be decoded as an image. Use the image-viewing tool to inspect it when available.
  3. Check that the result matches the requested subject or edit, composition, legibility, and safety constraints. Regenerate with a targeted prompt adjustment when the image is blank, malformed, materially off-topic, or has obvious layout defects.
  4. Report the saved path and, when available, final dimensions. Mention prompt changes only when they materially affect the user's request.
Show full SKILL.md (300 more words)Show less

Options

  • --prompt: Required image description or editing instruction.
  • --input-image: Optional JPEG or PNG image to edit. When present, the script uses the MAI image edits API.
  • --output: Output PNG path; defaults to generated_image.png.
  • --width and --height: Generation dimensions; each defaults to 1024. Ignored for edits.
  • --model: Deployment name; defaults to MAI-Image-2.5.
  • --endpoint: Azure resource or image API endpoint; overrides AZURE_IMAGE_ENDPOINT.
  • --env-file: Loads a specific .env file instead of searching parent directories.
  • --force: Permits replacing an existing output file.

Environment variables already present in the process take precedence over values in .env.

API behavior

  • Text generation sends JSON to /mai/v1/images/generations.
  • Image editing sends prompt, model, and one image as multipart form data to /mai/v1/images/edits.
  • Image edits accept JPEG or PNG input and return PNG output.
  • MAI-Image-2.5 image editing is currently a public-preview feature and isn't recommended for production workloads without accounting for preview limitations.

Failure handling

  • Missing configuration: Identify AZURE_API_KEY or AZURE_IMAGE_ENDPOINT and stop.
  • Invalid input image: Report that image edits require a readable JPEG or PNG.
  • HTTP authentication failure: Tell the user to verify AZURE_API_KEY locally; never request the key in chat.
  • HTTP endpoint or deployment failure: Report the status and sanitized API message, then verify the endpoint and deployment name.
  • Invalid or absent b64_json: Do not create an output file; report the response-shape problem.
  • Content-policy rejection: Explain that the service rejected the prompt and offer a compliant revision.
  • Corrupt or empty image: Remove the incomplete output and retry once with the same request before changing the prompt.

Completion checks

  • The secret was not exposed.
  • The requested output was created without overwriting unrelated work.
  • The file is a decodable image.
  • Visual inspection confirms the primary subject and requested edits are present.
  • The user receives a clickable path to the image.

Reference

© pamelafox, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (scripts) in .agents/skills/generate-images-mai of pamelafox/presentation-skills.

  • SKILL.md
  • scripts/generate_image.py
  • scripts/test_generate_image.py

Open the folder on GitHubat commit 2b809b3

Compare with similar skills

Generate Images Mai next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Generate Images Mai compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Generate Images Mai this skillpamelafox/presentation-skills125—~1.5kAutomated safety check: NotesMIT
AI Image Generation and Editingzhayujie/CowAgent47k—~1.3kAutomated safety check: PassMIT
Structured Image Generationbytedance/deer-flow84k4 repos~2.9kAutomated safety check: PassMIT
Canghe Comicfreestylefly/canghe-skills4618 repos~3.2kAutomated safety check: PassNone
Generate Imageynulihao/AgentSkillOS61810 repos~1.7kAutomated safety check: NotesNone
GPT Image Generation CLIwuyoscar/GPT-Image2-Skill5.7k—~2.5kAutomated safety check: NotesMIT

Similar skills

  • Generates or edits images from text prompts through a Python script that picks an image backend based on which API keys are configured.

    47k GitHub stars~1.3k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Structured Image Generation

    bytedance/deer-flow

    Turns an image request into a structured JSON prompt and runs a bundled Python script to generate the picture, optionally guided by reference images.

    84k GitHub starsUsed in 4 repos~2.9k tokens
    Media & CreativeAuto-check passed
  • Canghe Comic

    freestylefly/canghe-skills

    Knowledge comic creator supporting multiple art styles and tones.

    461 GitHub starsUsed in 8 repos~3.2k tokens
    Media & CreativeAuto-check passed
  • Generate Image

    ynulihao/AgentSkillOS

    Generate or edit images using AI models (FLUX, Gemini). An agent skill from ynulihao/AgentSkillOS.

    618 GitHub starsUsed in 10 repos~1.7k tokens
    Media & CreativeAuto-check: notes
  • GPT Image Generation CLI

    wuyoscar/GPT-Image2-Skill

    Generates and edits images with GPT Image 2 or 2.5 through a packaged CLI and a prompt gallery, after settling which model fits the request.

    5.7k GitHub stars~2.5k tokensUpdated 11 days ago
    Media & CreativeAuto-check: notes
  • Minimal Zine Poster Generator

    LiamGvchi/gc-minimal-zine-poster

    Creates or analyzes quiet, paper-texture zine posters with big negative space, one color accent and experimental type, returning an image prompt and the generated poster.

    7.3k GitHub stars~2.9k tokensUpdated 1 mo ago
    Media & CreativeAuto-check passed

More from pamelafox/presentation-skills

All 14 skills in this repo
  • Make Revealjs Presentation

    pamelafox/presentation-skills

    Create or update a RevealJS HTML presentation using the repository's bundled slide template.

    125 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Capture Video Frames

    pamelafox/presentation-skills

    Capture frames from a YouTube video at a regular interval, produce a manifest mapping filenames to timestamps, and describe each frame with an LLM.

    125 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Fetch Slides

    pamelafox/presentation-skills

    Fetch presentation slides from a URL and convert them to PDF.

    125 GitHub stars~528 tokensUpdated 1 mo ago
    Auto-check passed
  • Generate Writeup

    pamelafox/presentation-skills

    Generate an annotated blog-style write-up from a presentation's slides and video recording.

    125 GitHub stars~2.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Outline Slides

    pamelafox/presentation-skills

    Generate a numbered outline of presentation slides with one-sentence summaries.

    125 GitHub stars~462 tokensUpdated 1 mo ago
    Auto-check passed
  • Thumbnail Of PPTX

    pamelafox/presentation-skills

    Capture a thumbnail image of a slide from a OneDrive/Office presentation link.

    125 GitHub stars~686 tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Generate Images Mai

What does Generate Images Mai do?

Generate or edit bitmap images with Microsoft MAI-Image-2.5 through the Azure AI image APIs. Generate Images Mai is an agent skill from pamelafox/presentation-skills.5 through the Azure AI image APIs.

When should I use Generate Images Mai?

Generate Images Mai fits situations like: text-to-image generation; image-to-image edits; artifact cleanup; reference-image transformations.

How do I install Generate Images Mai in Claude Code?

Run `npx skills add pamelafox/presentation-skills --skill generate-images-mai -a claude-code`. Or copy the skill folder (.agents/skills/generate-images-mai in pamelafox/presentation-skills) into .claude/skills/generate-images-mai in your project. Claude Code loads it when a task matches its description.

How do I install Generate Images Mai in Codex?

Run `npx skills add pamelafox/presentation-skills --skill generate-images-mai -a codex`. Or copy the skill folder (.agents/skills/generate-images-mai in pamelafox/presentation-skills) into .agents/skills/generate-images-mai in your project. Codex loads it when a task matches its description.

Can I use Generate Images Mai in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pamelafox/presentation-skills --skill generate-images-mai -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generate-images-mai, .gemini/skills/generate-images-mai, .github/skills/generate-images-mai and .opencode/skills/generate-images-mai in your project.

What does Generate Images Mai need to run?

Going by SKILL.md and its folder, Generate Images Mai needs Python for the scripts in its folder, the command-line tools its instructions call (python3) and credentials named AZURE_API_KEY. Our summary lists: Python 3; A credential in AZURE_API_KEY.

Does Generate Images Mai access the network?

SKILL.md names 1 domain. As links in the text: learn.microsoft.com. This is read from the text; nothing was executed.

Is Generate Images Mai safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Generate Images Mai use?

Generate Images Mai is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Generate Images Mai use?

About 1.5k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Generate Images Mai?

Skills that share tags, products or a category with Generate Images Mai: AI Image Generation and Editing (zhayujie/CowAgent, 47k stars), Structured Image Generation (bytedance/deer-flow, 84k stars), Canghe Comic (freestylefly/canghe-skills, 461 stars) and Generate Image (ynulihao/AgentSkillOS, 618 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Generate Images Mai?

pamelafox (a GitHub user) maintains it in pamelafox/presentation-skills, which has 125 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on September 2, 2026.

Source: pamelafox/presentation-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.