gpt-image
Skill này làm gì
Skill này cho phép AI của bạn tạo ảnh mới hoặc chỉnh sửa ảnh có sẵn bằng các mô hình GPT Image thông qua một công cụ dòng lệnh. Skill dành cho người cần poster, ảnh chỉnh sửa có đánh dấu hoặc ảnh có chữ.
Khi nào nên dùng
- ✓Khi bạn muốn tạo một ảnh hoặc poster mới bằng mô hình GPT Image.
- ✓Khi bạn muốn chỉnh sửa một ảnh tham khảo hoặc điền vào một phần của ảnh.
- ✓Khi ảnh của bạn cần chữ chính xác, kích thước cụ thể hoặc mức chất lượng nhất định.
Liên kết skill
https://github.com/wuyoscar/GPT-Image2-Skill/blob/main/skills/gpt-image/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm một poster với dòng chữ Summer Sale in đậm bằng mô hình GPT Image.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent chọn mô hình và cách làm phù hợp, kiểm tra công cụ có sẵn, rồi chạy lệnh tạo ảnh với yêu cầu của bạn. Với các yêu cầu tốn kém hoặc chưa rõ, agent có thể hỏi trước.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
gpt-image
Agent runbook for GPT Image 2 / 2.5 generation/editing. Use the prompt library + packaged CLI. Do not reimplement image API code.
Operating loop
- Classify request and resolve model:
generate,edit,inpaint, ormulti-reference; identify asset type, exact text, aspect ratio, references, safety constraints, and budget/quality. Apply the model-choice rules below before any API call. - Choose the reference path: Image 2 keeps the gallery-first workflow below. For 2.5, a precise brief needs no reference loading; otherwise choose one short task slice.
- Refine only as needed: preserve the brief. Add a specific gallery case, craft section or template only to fill a concrete gap; do not load them as a bundle for 2.5.
- Confer when useful: before costly/ambiguous/high-polish calls, present 1–3 matched directions plus planned size/quality; ask at most one concise question at a time. Skip long discussion for precise “generate now” requests with a resolved model.
- Preflight, no side effects: use existing CLI/skill if present. Check command availability (
command -v gpt-image), installed tool lists when the tool manager exists, or the runtime’s own skill registry when available. Do not assume a local home path in cloud/hosted runtimes. - No blind setup: do not reinstall, overwrite skill folders, create/modify
.env, or write API keys unless the user explicitly requested setup. Global/shared installs are opt-in only. - Execute via CLI only: call
gpt-imageorscripts/generate.pywith an explicit--model. Do not create a newgenerate.py, SDK wrapper, or ad-hoc script for normal image requests. - Report: output file path(s), key flags, and one concise refinement suggestion if useful.
Fast path: confirmed 2.5 model + precise prompt + “generate now” → preflight and CLI, without a mandatory reference/craft pass. Do not reconfirm an exact valid model.
Model choice and prompt adaptation
| Choice | API model ID | Suggested use |
|---|---|---|
| Flare | gpt-image-2.5-flare |
Fast general generation and drafts |
| Sunburst | gpt-image-2.5-sunburst |
Precise reference edits and detailed control |
| Image 2 | gpt-image-2 |
Existing Image 2 workflows and compatibility |
- If the model is absent, ambiguous (such as “GPT 2.5”), or misspelled, ask one clear question offering Flare, Sunburst, and Image 2 with these trade-offs, then wait. For a typo, suggest the likely intended choice without silently correcting it. Do not treat
gpt-image-2.5as an API model ID. - Use an exact supported model ID, an unambiguous choice from this menu, or the user's already confirmed choice for the current task without asking again. If the user explicitly says “you choose,” explain the pick briefly and proceed; consider their task and budget rather than always selecting the most expensive settings.
- Always pass the chosen ID through
--model. The CLI retainsgpt-image-2as its backward-compatible default, but that default is not a substitute for the agent resolving the user's choice. - Keep model confirmation, cost discussion, and API flags separate from the final image prompt. Use the model-specific reference path below only when it helps the task. Preserve the user's exact text, intended content, reference identity, and edit invariants; obtain confirmation before material prompt changes.
- Generate one image unless the user requested more. Do not silently switch models, change material prompt content, or run multiple model/prompt variants or comparisons. Ask before additional paid variants. For an authorized same-prompt comparison, keep the prompt, size, and quality identical unless the user asks to vary them.
- Consult
references/models.mdwhen parameter support or validation status needs checking. On an invalid-model, access/403, quota, or policy failure, report the failure and stop; do not switch models or rewrite the prompt to retry automatically.
CLI resolution
Preferred call order:
# Existing CLI on PATH
gpt-image --model MODEL_ID -p "PROMPT" [-f OUT] [-i REF...] [-m MASK] [options]
# Installed skill folder; use runtime-provided skill path when available
uv run "$SKILL_DIR/scripts/generate.py" --model MODEL_ID -p "PROMPT" [-f OUT] [-i REF...] [-m MASK] [options]
# Direct transient CLI when the user requested setup/one-off CLI execution
uvx --from git+https://github.com/wuyoscar/gpt_image_2_skill gpt-image --model MODEL_ID -p "PROMPT" [options]
Câu hỏi thường gặp
Skill có cần khóa API không?
Có. Các lệnh tạo ảnh cần khóa API được thiết lập cho dịch vụ ảnh, và agent không tự ghi khóa vào file cho bạn.
Skill có thể điền vào một phần của ảnh không?
Có. Skill hỗ trợ inpainting, tức là chỉnh sửa một vùng đã chọn của ảnh.
Skill có hỏi trước khi gọi API không?
Với các yêu cầu tốn kém, chưa rõ hoặc đòi hỏi độ hoàn thiện cao, skill có thể đề xuất vài hướng trước.
Chi tiết
Mô tả gốc của tác giả
Generate or edit images with GPT Image 2 or 2.5 through the packaged CLI and Reference Gallery. Use for image requests including imprecise 'GPT 2.5' model names, posters, typography, reference edits, and inpainting; resolve the model choice before generation.
Độ phổ biến
- Sao GitHub
- 6.0k
- Vị trí xếp hạng
- #14470
- Giấy phép
- MIT
- Cập nhật
- 30/9/2026
Bình luận
- …
Thêm skill từ kho mã này
Skill tương tự
gifgrep
394kCho phép agent của bạn tìm thư viện GIF, xem trước kết quả, tải một GIF, và lấy một khung hình tĩnh hoặc bảng ghép nhiều khung hình.
meme-maker
394kCho phép agent của bạn chọn một mẫu meme, thêm chú thích của riêng bạn và tạo meme dưới dạng ảnh SVG hoặc PNG.
ios-icon-gen
280kGiúp agent tạo biểu tượng cho ứng dụng iOS. Dùng biểu tượng của Apple hoặc từ các nguồn khác để tạo đúng định dạng tệp.