Skywork Design by skyworkai/skywork-skills
npx skills add https://github.com/skyworkai/skywork-skills --skill 'Skywork Design'通过后端图像 API 生成新图像或编辑现有图像。请耐心等待,每次生成图像大约需要 2 分钟。
在使用此技能之前,必须完成身份验证。请先运行身份验证脚本:
# 身份验证:检查环境变量令牌 / 缓存的令牌 / 浏览器登录
python3 <skill-dir>/scripts/skywork_auth.py || exit 1
令牌优先级:
SKYBOT_TOKEN → 如果已设置,则直接使用~/.skywork_token → 通过 API 验证,如果有效则使用重要提示 - 登录 URL 处理:如果脚本输出包含以 [LOGIN_URL] 开头的行,您必须立即将该 URL 以可点击消息的形式发送给用户(例如,“请打开此链接登录:”)。用户可能处于浏览器无法自动打开的环境中,因此请始终提供登录 URL。
使用绝对路径运行脚本(不要 cd 到技能目录):
生成新图像:
python3 <SKILL_DIR>/scripts/generate_image.py --prompt "描述" --filename "output.png" [--aspect-ratio 3:4] [--resolution 1K|2K|4K]
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
编辑现有图像:
python3 <SKILL_DIR>/scripts/generate_image.py --prompt "编辑指令" --filename "output.png" --input-image "source.png" [--aspect-ratio 3:4] [--resolution 2K]
使用多张参考图像进行编辑:
python3 <SKILL_DIR>/scripts/generate_image.py --prompt "融合这些风格" --filename "output.png" -i "ref1.png" -i "ref2.png"
始终从用户的工作目录运行,以便图像保存在那里。
--prompt):从零开始创建新图像——海报、徽标、插图、照片、信息图。--prompt + --input-image):用户提供现有图像并希望进行修改——风格更改、元素添加/移除、颜色调整、格式转换。
如果用户上传/引用了图像并希望进行更改,请始终使用 --input-image。
映射用户请求:“低/草图” → 1K,“正常/中等/2K” → 2K,“高分辨率/高清/4K/超高清” → 4K。
支持的比率:1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9。
选择指南:
如果用户未指定,请省略 --aspect-ratio 并让 API 决定。
模式:yyyy-mm-dd-hh-mm-ss-描述性名称.png
示例:
2026-03-10-14-23-05-japanese-garden.png2026-03-10-15-30-12-sunset-mountains.png2026-03-10-17-12-48-x9k2.pngcommand -v python3(必须存在)--input-image 文件是否存在Error: Input image not found: → 路径错误;验证 --input-image 文件是否存在HTTP error 500 → 后端服务错误;重试或检查服务器状态Request failed: Connection refused → 后端服务不可用;确保服务正在运行Insufficient benefit. Please upgrade your account at {url} 的消息,这意味着用户的权益等级不满足此技能的要求。当您检测到上述情况时,请使用用户当前的语言回复——不要回显英文消息。使用以下模式:
[立即升级 →](url) 的链接或其语言等效形式。at https://... 部分)。将用户的请求与场景匹配,并阅读相应的文件以获取专门的工作流程:
遵循这些原则,为生成或编辑的图像 API 使用高质量的提示词:
一张电影海报,顶部有大型银色金属字母的标题“INCEPTION”
每周安装次数
–
代码仓库
GitHub 星标数
51
首次出现时间
–
安全审计
Generate new images or edit existing ones via the backend image API. Be patient, it takes about 2 minutes to generate an image each time.
Before using this skill, authentication must be completed. Run the auth script first:
# Authenticate: checks env token / cached token / browser login
python3 <skill-dir>/scripts/skywork_auth.py || exit 1
Token priority :
SKYBOT_TOKEN → if set, use directly~/.skywork_token → validate via API, if valid, use itIMPORTANT - Login URL handling : If script output contains a line starting with [LOGIN_URL], you MUST immediately send that URL to the user in a clickable message (e.g. "Please open this link to log in: "). The user may be in an environment where the browser cannot open automatically, so always surface the login URL.
Run the script using absolute path (do NOT cd to skill directory):
Generate new image:
python3 <SKILL_DIR>/scripts/generate_image.py --prompt "description" --filename "output.png" [--aspect-ratio 3:4] [--resolution 1K|2K|4K]
Edit existing image:
python3 <SKILL_DIR>/scripts/generate_image.py --prompt "edit instructions" --filename "output.png" --input-image "source.png" [--aspect-ratio 3:4] [--resolution 2K]
Edit with multiple reference images:
python3 <SKILL_DIR>/scripts/generate_image.py --prompt "combine these styles" --filename "output.png" -i "ref1.png" -i "ref2.png"
Always run from the user's working directory so images save there.
--prompt only): Creating new images from scratch — posters, logos, illustrations, photos, infographics.--prompt + --input-image): User provides existing image(s) and wants modifications — style changes, element addition/removal, color adjustments, format conversion.
If the user uploads/references images and wants changes, always use --input-image.
Map user requests: "low/draft" → 1K, "normal/medium/2K" → 2K, "high-res/hi-res/4K/ultra" → 4K.
Supported ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9.
Selection guidance:
If the user doesn't specify, omit --aspect-ratio and let the API decide.
Pattern: yyyy-mm-dd-hh-mm-ss-descriptive-name.png
Examples:
2026-03-10-14-23-05-japanese-garden.png2026-03-10-15-30-12-sunset-mountains.png2026-03-10-17-12-48-x9k2.pngcommand -v python3 (must exist)--input-image file existsError: Input image not found: → wrong path; verify --input-image file existsHTTP error 500 → backend service error; retry or check server statusRequest failed: Connection refused → backend service unavailable; ensure the service is runningInsufficient benefit. Please upgrade your account at {url}, meaning the user's benefit level does not meet the requirement for this skill.When you detect the above, reply in the user's current language — do not echo the English message. Use this pattern:
[Upgrade now →](url) or the equivalent in their language.at https://... part).Match the user's request to a scenario and read the corresponding file for specialized workflow:
Follow these principles for quality prompts using the image API for generation or editing:
A movie poster with the title "INCEPTION" in large silver metallic letters at the top
Weekly Installs
–
Repository
GitHub Stars
51
First Seen
–
Security Audits
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
60,400 周安装