重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
imagegen by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill imagegen为当前项目生成或编辑图像(例如:网站素材、游戏素材、UI 模型、产品模型、线框图、Logo 设计、照片级真实感图像、信息图)。默认使用 gpt-image-1.5 和 OpenAI Image API,并优先使用捆绑的 CLI 以获得确定性和可复现的运行结果。
tmp/ 下写入一个临时的 JSONL 文件(每行一个任务),运行一次,然后删除该 JSONL 文件。scripts/image_gen.py)(参见 references/cli.md)。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
tmp/imagegen/ 存放中间文件(例如 JSONL 批量文件);完成后删除。output/imagegen/ 目录下。--out 或 --out-dir 来控制输出路径;保持文件名稳定且具有描述性。优先使用 uv 进行依赖管理。
Python 包:
uv pip install openai pillow
如果 uv 不可用:
python3 -m pip install openai pillow
OPENAI_API_KEY。如果密钥缺失,请向用户提供以下步骤:
OPENAI_API_KEY 设置为环境变量。如果在此环境中无法安装,请告知用户缺少哪个依赖项以及如何在本地安装。
gpt-image-1.5,除非用户明确要求 gpt-image-1-mini 或明确表示偏好更便宜/更快的模型。OPENAI_API_KEY。openai 包);不要使用原始 HTTP。client.images.edit(...) 并包含输入图像(如果提供了蒙版,也包含蒙版)。scripts/image_gen.py),而不是编写新的临时脚本。scripts/image_gen.py。如果缺少某些功能,请在执行其他操作之前询问用户。将用户提示词重新格式化为结构化的、面向生产的规范。仅使隐含的细节明确化;不要添加新的要求。
将每个请求分类到以下类别之一,并在提示词和引用中保持标识符一致。
生成:
编辑:
快速澄清(增强 vs 发明):
模板(仅包含相关行):
Use case: <taxonomy slug>
Asset type: <where the asset will be used>
Primary request: <user's main prompt>
Scene/background: <environment>
Subject: <main subject>
Style/medium: <photo/illustration/3D/etc>
Composition/framing: <wide/close/top-down; placement>
Lighting/mood: <lighting + mood>
Color palette: <palette notes>
Materials/textures: <surface details>
Quality: <low/medium/high/auto>
Input fidelity (edits): <low/high>
Text (verbatim): "<exact text>"
Constraints: <must keep/must avoid>
Avoid: <negative constraints>
增强规则:
references/sample-prompts.md 中找到匹配的示例。Use case: stylized-concept
Asset type: landing page hero
Primary request: a minimal hero image of a ceramic coffee mug
Style/medium: clean product photography
Composition/framing: centered product, generous negative space on the right
Lighting/mood: soft studio lighting
Constraints: no logos, no text, no watermark
Use case: precise-object-edit
Asset type: product photo background replacement
Primary request: replace the background with a warm sunset gradient
Constraints: change only the background; keep the product and its edges unchanged; no text; no watermark
quality=low 开始;对于文本密集或细节关键的输出,使用 quality=high。input_fidelity=high。更多原则:references/prompting.md。复制/粘贴规范:references/sample-prompts.md。
素材类型模板(网站素材、游戏素材、线框图、Logo)已整合在 references/sample-prompts.md 中。
references/cli.mdreferences/image-api.mdreferences/codex-network.mdreferences/cli.md : 如何通过 scripts/image_gen.py 运行 图像生成/编辑/批量操作(命令、标志、配方)。references/image-api.md : API 级别存在哪些可调参数(参数、尺寸、质量、背景、仅编辑字段)。references/prompting.md : 提示词原则(结构、约束/不变项、迭代模式)。references/sample-prompts.md : 复制/粘贴提示词配方(生成 + 编辑工作流;仅示例)。references/codex-network.md : 环境/沙盒/网络审批故障排除。每周安装数
59
代码库
GitHub Stars
24.0K
首次出现
2026年2月8日
安全审计
安装于
kimi-cli59
gemini-cli59
amp59
github-copilot59
codex59
opencode59
Generates or edits images for the current project (e.g., website assets, game assets, UI mockups, product mockups, wireframes, logo design, photorealistic images, infographics). Defaults to gpt-image-1.5 and the OpenAI Image API, and prefers the bundled CLI for deterministic, reproducible runs.
scripts/image_gen.py) with sensible defaults (see references/cli.md).tmp/imagegen/ for intermediate files (for example JSONL batches); delete when done.output/imagegen/ when working in this repo.--out or --out-dir to control output paths; keep filenames stable and descriptive.Prefer uv for dependency management.
Python packages:
uv pip install openai pillow
If uv is unavailable:
python3 -m pip install openai pillow
OPENAI_API_KEY must be set for live API calls.If the key is missing, give the user these steps:
OPENAI_API_KEY as an environment variable in their system.If installation isn't possible in this environment, tell the user which dependency is missing and how to install it locally.
gpt-image-1.5 unless the user explicitly asks for gpt-image-1-mini or explicitly prefers a cheaper/faster model.OPENAI_API_KEY before any live API call.openai package) for all API calls; do not use raw HTTP.client.images.edit(...) and include input images (and mask if provided).scripts/image_gen.py) over writing new one-off scripts.scripts/image_gen.py. If something is missing, ask the user before doing anything else.Reformat user prompts into a structured, production-oriented spec. Only make implicit details explicit; do not invent new requirements.
Classify each request into one of these buckets and keep the slug consistent across prompts and references.
Generate:
Edit:
Quick clarification (augmentation vs invention):
Template (include only relevant lines):
Use case: <taxonomy slug>
Asset type: <where the asset will be used>
Primary request: <user's main prompt>
Scene/background: <environment>
Subject: <main subject>
Style/medium: <photo/illustration/3D/etc>
Composition/framing: <wide/close/top-down; placement>
Lighting/mood: <lighting + mood>
Color palette: <palette notes>
Materials/textures: <surface details>
Quality: <low/medium/high/auto>
Input fidelity (edits): <low/high>
Text (verbatim): "<exact text>"
Constraints: <must keep/must avoid>
Avoid: <negative constraints>
Augmentation rules:
references/sample-prompts.md.Use case: stylized-concept
Asset type: landing page hero
Primary request: a minimal hero image of a ceramic coffee mug
Style/medium: clean product photography
Composition/framing: centered product, generous negative space on the right
Lighting/mood: soft studio lighting
Constraints: no logos, no text, no watermark
Use case: precise-object-edit
Asset type: product photo background replacement
Primary request: replace the background with a warm sunset gradient
Constraints: change only the background; keep the product and its edges unchanged; no text; no watermark
More principles: references/prompting.md. Copy/paste specs: references/sample-prompts.md.
Asset-type templates (website assets, game assets, wireframes, logo) are consolidated in references/sample-prompts.md.
references/cli.mdreferences/image-api.mdreferences/codex-network.mdreferences/cli.md : how to run image generation/edits/batches via scripts/image_gen.py (commands, flags, recipes).references/image-api.md : what knobs exist at the API level (parameters, sizes, quality, background, edit-only fields).references/prompting.md : prompting principles (structure, constraints/invariants, iteration patterns).references/sample-prompts.md : copy/paste prompt recipes (generate + edit workflows; examples only).references/codex-network.md : environment/sandbox/network-approval troubleshooting.Weekly Installs
59
Repository
GitHub Stars
24.0K
First Seen
Feb 8, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykPass
Installed on
kimi-cli59
gemini-cli59
amp59
github-copilot59
codex59
opencode59
AI界面设计评审工具 - 全面评估UI/UX设计质量、检测AI生成痕迹与优化用户体验
58,500 周安装