generate-image
Skill5 starsChanged 8 days agoMITView on GitHub
Generate new raster images and edit existing ones via fal.ai (GPT Image 2.5, Nano Banana 2.1) — illustrations, product photos, hero art, UI mockups, background removal. Use whenever the user asks to generate/create/make an image, produce a photo or illustration for a page, get a before/after edit of an existing image ("add X", "remove Y", "change the color of Z" while keeping everything else the same), or strip/remove a background — even if they don't say "fal.ai" or name a model, and also when they do name one ("with Nano Banana", "use GPT Image"). For logos, icons, or anything that should ship as SVG, prefer the generate-svg skill.
44 other projects use a version of this.
Adopted by
Most recently taken up by
- brennantim/claude-skillstheir own version, first seen Nov 16, 2026
- Philmattt04/Claude-Skillstheir own version, first seen Nov 16, 2026
- Ivan-propio/claude-skillstheir own version, first seen Nov 16, 2026
- hayato-kishikawa/claude-code-demo-video-kittheir own version, first seen Nov 15, 2026
- GodD6366/skillstheir own version, first seen Nov 15, 2026
- AESiR-0/skillstheir own version, first seen Nov 15, 2026
Used with
Projects with it also use edit-image, scientific-slides and 6 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.
SamurAIGPTSkilledit-image
Edits an existing image using natural language instructions via MuAPI. Use when the user wants to modify, change, transform, or retouch an existing image.
Also in 3 projects that use this
ZanderRussSkillscientific-slides
Build slide decks and presentations for research talks. Use this for making PowerPoint slides, conference presentations, seminar talks, research presentations, thesis defense slides, or any scientific talk. Provides slide structure, design templates, timing guidance, and visual validation. Works with PowerPoint and LaTeX Beamer.
Also in 3 projects that use this
nicepkgSkillteam
根据任务快速组建临时 AI Agent 团队协作。自动从 .claude/agents/ 中选择最合适的成员组队。
Also in 3 projects that use this
AnthropicSkillpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.
Also in 5 projects that use this
AnthropicSkillpdf
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
Also in 4 projects that use this
SentrySkillskill-creator
Create new agent skills following the Agent Skills specification. Use when asked to "create a skill", "add a new skill", "write a skill", "make a skill", "build a skill", or scaffold a new skill with SKILL.md. Guides through requirements, writing, registration, and verification.
Also in 5 projects that use this
- +1 more from anthropics
Other versions44 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 44
- github/awesome-copilot★ 41ksame name
- K-Dense-AI/claude-scientific-writer★ 2.6ksame name
- LeonChaoX/qinyan-academic-skills★ 910same name
- OpenClaudia/openclaudia-skills★ 731same name
- ansari-project/codev★ 298same name
- cluesmith/codev★ 298same name
- Sateezg/codex-bridge★ 248same name
- DojoCodingLabs/remotion-superpowers★ 153same name
- happycapy-ai/Happycapy-skills★ 137same name
- qinyan-ai/qinyan-academic-skills★ 80same name
34 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- generate-svgSkill
- generate-videoSkill
- process-imageSkill
- process-videoSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Run it with Bash, e.g.:
- Very specific: line 18
If the shell says bun isn't found, Bun isn't installed.
“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.
Files
generate-image
Wraps fal.ai image generation/editing behind one CLI: ${CLAUDE_SKILL_DIR}/scripts/generate-image.ts.
Requires a fal.ai key in FAL_KEY — if it's missing the script exits with a clear error, ask the user to export it in their shell — never ask them to paste the key into the chat.
Run it with Bash, e.g.:
bun ${CLAUDE_SKILL_DIR}/scripts/generate-image.ts generate --prompt "..." --output ./out.pngIf the shell says bun isn't found, Bun isn't installed. Stop and ask the user to install it from
https://bun.com/docs/installation and restart Claude Code. Don't replace the script with other tools or
code of your own: the checks it runs before a paid call and on the result would be lost.
The script prints the final path, dimensions, and byte size — that's the confirmation the file exists; no need for a separate ls/read-back step unless you need to inspect pixels.
Files you make only to inspect a result (crops, alpha masks, previews) go in the project's work
folder: media-generation/ inside the project's own scratch folder if it has one (.scratch/,
tmp/), otherwise .media-generation/ holding a .gitignore that contains *, so git never sees
it. Never /tmp or a folder next to the project.
generate — text to image
generate-image.ts generate --prompt "<description>" --output <path>
[--model gpt-image-2.5|nano-banana-2.1] [--aspect-ratio 1:1|2:3|3:2|3:4|4:3|4:5|5:4|9:16|16:9|21:9]
[--quality low|medium|high|xhigh|max] [--resolution 1K|2K|4K] [--remove-background]
[--format jpeg|png|webp] [--output-quality 1-100] [--max-width N]If the user names a model, use it ("with Nano Banana", "via GPT Image"). Otherwise pick:
| Model | Cost (~1 MP) | Pick it for |
gpt-image-2.5 (default) | --quality low ~$0.005 · medium (default) ~$0.01 · high ~$0.05 · max ~$0.21 | almost everything: hero art, illustrations, product shots, anything with readable text, posters, UI mockups, diagrams. Top-ranked model for both generation and editing |
nano-banana-2.1 | --resolution 1K (default) ~$0.04 · 2K ~$0.06 · 4K ~$0.13 | images that must be physically large (2K/4K for print or full-bleed retina heroes), the same character or product kept consistent across several images, and photoreal scenes where a second opinion helps |
gpt-image-2.5 quality: low for drafts and peripheral filler, medium for normal page images, high when text in the image or fine detail is the point, max only when the user asks for the very best. Its pixel count stays around 1 MP; for more pixels use nano-banana-2.1 --resolution 2K/4K — there is no separate upscale tool.
Wrong tool for vector deliverables: everything here outputs raster pixels. A logo, icon set, or favicon that should scale cleanly belongs to the generate-svg skill (true SVG output).
The output is always re-encoded on save in the format of the --output extension (.jpg/.jpeg, .png or .webp; anything else is rejected). --format is optional and must agree with the extension. Quality defaults to 85 — a ~1MP JPEG lands ~150–400KB. Use --output-quality / --max-width to control size directly instead of a separate resize/convert pass (see the process-image skill for that).
--quality only applies to gpt-image-2.5 and --resolution only to nano-banana-2.1; passing either to the other model is an error. Unknown models, aspect ratios and out-of-range numbers fail before anything is sent, so nothing is billed for a typo.
The script prints the saved path, dimensions, actual format and size, plus a temporary Result URL that can be passed straight to --image-url of a follow-up edit or remove-background.
A paid result is never lost. As soon as fal.ai accepts a job the script prints its request ID and a ready resume --model … --request-id … --output … command on stderr. If the download fails or the run is interrupted, run that command — it fetches the already-paid result. Don't rerun the original command: that generates (and bills) again.
--remove-background strips the background right after generation (extra ~$0.018 Bria call) and saves a transparent cutout — use for banner subjects, product shots, stickers. The output must be .png or .webp — a .jpg output is rejected up front, since JPEG has no alpha channel. If generation succeeds but background removal returns nothing, the script fails (it never saves the opaque original as if it were a cutout) and prints a remove-background --image-url … command that retries only the removal. A plain high-contrast studio background is auto-appended to the prompt for a clean cutout unless the prompt already mentions a background.
edit — instruction-based edit of an EXISTING image
The only way to get a true before/after of the same image — generate always draws a new subject, so two generations never share the same scene/face/product. Use edit to add, remove, or change one detail while everything else stays put.
generate-image.ts edit --prompt "<what to change>" --output <path>
(--source <path> | --image-url <url>)
[--model gpt-image-2.5|nano-banana-2.1] [--quality low|medium|high|xhigh|max] [--resolution 1K|2K|4K]
[--no-match-source-size]
[--format jpeg|png|webp] [--output-quality 1-100]Pass exactly one of --source or --image-url. A local source is read and checked before the paid call.
Describe only the change ("add extended eyelashes", "remove the logo from the mug", "make the walls sage green") — the rest of the image is preserved by the model. gpt-image-2.5 is the default and the top-ranked editor (same quality tiers and prices as generate); use nano-banana-2.1 when the user asks for it or the result must be 2K/4K.
By default a result that came back larger than a local --source is shrunk to the exact source dimensions so a before/after pair lines up. It is never stretched to a different aspect ratio and never upscaled — that would fake detail the model didn't produce; the script keeps the native frame and says so. Editing a large source (say a 4K master)? Use --model nano-banana-2.1 --resolution 2K or 4K, otherwise the edit comes back at ~1K. Pass --no-match-source-size to always keep the raw edited frame. Not applied with --image-url.
remove-background — cut out an existing image
generate-image.ts remove-background --output <path>.png|.webp
(--source <path> | --image-url <url>)
[--format png|webp] [--output-quality 1-100] [--max-width N] [--keep "<what to keep>"]Works on any existing photo or picture, including photos of people. Bria keeps what it judges to be the main subject. When the image has several people or objects, or the user names what to keep, pass --keep with a short plain-English description: --keep "only the woman on the left", --keep "the person and the dog", --keep "without the lamp". It costs ~$0.03 instead of ~$0.018.
Uses Bria RMBG 2.0 (~$0.018/image), outputs a cutout with transparency — for product photos, compositing, or isolating a subject in an image you already have. If you're about to generate a new image that needs a transparent background, prefer generate --remove-background instead — prompting the model for a clean high-contrast backdrop gives RMBG a much better cutout than removing the background from an arbitrary existing photo.
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
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.

