imagegen
它能做什么
让助手生成原创图片、产品视觉或图表,并对你分享的图片进行编辑。适合需要新的位图图像的人。
适用场景
- ✓当你要求一张新图片、插图或产品视觉时。
- ✓当你希望对对话中已附加的图片进行修改时。
- ✓当你希望为同一个图片构思生成多个版本,以便选择时。
技能链接
https://github.com/NanmiCoder/cc-haha/blob/main/src/skills/bundled/imagegen/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请生成一张干净的产品照片:白色背景上的一个绿色陶瓷马克杯。”
每周 5 个新技能,1 分钟读完。
工作原理
新视觉内容使用图像生成工具,已有图片则使用编辑工具。每个不同的构想都会单独发出一个请求,服务商和存储由桌面应用处理。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Image generation
Use the built-in ImageGen and ImageEdit tools. Provider authentication, model routing, output storage, and secrets are managed by the desktop host; never ask the user to put an API key in this skill or in the prompt.
Decide the request shape
- Treat a brand-new visual as generation and call
ImageGen. Its schema intentionally has no image-path argument. - Treat a request that preserves, combines, or changes an existing visual as an edit and call
ImageEdit. - One distinct prompt equals one tool call.
- Use
countonly for multiple variations of the same prompt. For different concepts, make separate calls. ImageEditrequiresreferenced_image_paths: populate it with ordered, exact paths to images the user supplied in this conversation — a path surfaced by[Image source: ...], a file the user attached with@, or a path returned by an earlierImageGencall. Never invent, search for, or substitute another filesystem path, and never read an image off disk yourself to use it as an input; if the user means an image you have no path for, ask them to attach it. The first image is the primary canvas unless the user says otherwise.- For multi-turn editing, use the latest selected output as the next turn's
edit_target. Repeat all identity, layout, text, and unchanged-region constraints on every turn so edits do not drift. - To edit several images independently, make one call per image. Put multiple images in one call only when the user wants them combined or used together as references. A single call accepts at most three source images.
- Prefer a useful default composition when the user leaves details open. Do not invent branding, logos, or people they did not request.
- Provider and image model selection come from the current desktop session; do not add either to the tool arguments.
- If the provider returns an error, do not retry the image tool automatically. Explain the failure and let the user decide whether to retry or change providers.
Build the prompt
Turn the request into a complete art-direction brief. Preserve all relevant user-specified detail.
- use case and image type
- subject, action, and important attributes
- environment and context
- composition, framing, and camera angle
- lighting and mood
- visual style or medium
- color palette
- exact text, only when text must appear in the image
- constraints and elements to avoid
For edits, start the prompt with each input's numbered role, then say change only X; keep Y unchanged. For a composite, specify which subject or visual property comes from each numbered image and preserve the requested identities. Do not rely on conversational pronouns such as "it" or "the previous one" inside the tool prompt.
Preserve the user's intent and wording for names or required on-image text. For diagrams, specify hierarchy, reading order, labels, and connections. For photorealistic work, describe lens, depth of field, lighting direction, and material detail when they matter.
Output options
- Use
aspect_ratiowhen the user describes a layout such as square, portrait, landscape, banner, or phone wallpaper. - Use
resolution: "2k"only when higher resolution is useful and supported. - Use transparent background only when requested or clearly needed for a reusable asset.
- The host displays one placeholder per requested image and replaces each slot as the saved image becomes available.
After a successful call, briefly summarize what was created or changed. The host card already displays and opens the saved images, so do not repeat, link, or embed the returned local paths in the final answer. Do not include base64 data in the conversation.
常见问题
我需要把 API 密钥交给助手吗?
不需要。桌面宿主负责管理图像服务商,因此你永远不需要在提示词中放入密钥。
它能编辑我电脑上的任何图片吗?
不能。它只编辑你在对话中提供的图片,如果找不到某张图片,它会请你附加。
它能生成多少个版本?
它可以为同一条提示词生成多个变体,但不同的构想需要分别发出请求。
详情
作者的原始描述
Generate original images, artwork, product visuals, diagrams, or other raster assets with the desktop's configured image provider. Use whenever the user asks to create or generate an image.
repo: NanmiCoder/cc-haha
热度
- GitHub 星标
- 15k
- 排名
- #10919
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-desktop-ffi
15k帮助开发者直接从 Python、Swift、Node、Go 或 C++ 调用 agent-desktop 自动化库,无需为每个操作都启动命令行工具。
agent-desktop-linux
15k教你的智能体如何使用 agent-desktop 控制 Linux 桌面应用,包括在 X11 和 Wayland 上哪些功能可用,以及常见的首次运行问题修复方法。
agent-desktop-macos
15k教你的智能体如何自动化 Mac 应用,包括授予所需权限,以及处理菜单、对话框和 Chromium 或 Electron 应用。
agent-desktop-windows
15k教你的智能体如何自动化 Windows 应用,涵盖哪些功能可用、PowerShell 引号的用法、最小化窗口以及提权应用的限制。