ikuncode-image-gen
IKunCode Image Gen
快速使用
优先使用 scripts/generate_image.js,不要重复手写请求体。
先在当前 shell 注入 API Key:
export IKUNCODE_API_KEY='你的 API Key'
文生图:
node skills/ikuncode-image-gen/scripts/generate_image.js \
--prompt '一只可爱的皮卡丘正在开心地吃生日蛋糕,明亮温馨插画风格' \
--output ./pikachu-cake.png
图生图:
node skills/ikuncode-image-gen/scripts/generate_image.js \
--input ./source.png \
--prompt '把背景改成星空,保留主体姿态和配色' \
--output ./edited.png
工作流
- 确认用户要的是 IKunCode 生图,而不是 OpenAI Images API。
- 默认使用
gemini-3.1-flash-image-preview,只有在用户明确要求高质量终稿时才切到gemini-3-pro-image-preview。 - 默认参数使用
--aspect-ratio 1:1 --size 2K,除非用户明确指定。 - 让输出文件落到用户要求的目录;用户没指定时,保存在当前工作目录。
- 如果用户提供参考图,传
--input,脚本会自动转成 Base64 并放进inlineData。 - 如果命令因网络或沙箱失败,申请执行权限,不要把失败归咎到脚本本身。
安全规则
- 只从环境变量
IKUNCODE_API_KEY读取密钥。 - 不要把 API Key 写进
SKILL.md、脚本、测试文件、终端历史示例或 git 提交。 - 如需展示命令,示例里一律写
'你的 API Key'或引用环境变量,不展示真实值。 - 若用户直接在对话中贴出 Key,可以临时用于当前命令,但不要落盘。
参数选择
--modelgemini-3.1-flash-image-preview:默认,速度优先gemini-3-pro-image-preview:终稿,质量优先
--aspect-ratio- 常用:
1:1、16:9、9:16、4:3、3:4
- 常用:
--size- 常用:
1K、2K、4K - 默认推荐
2K
- 常用:
需要更多参数或返回格式细节时,再读 references/api.md。
故障处理
Missing IKUNCODE_API_KEY- 当前 shell 没有注入环境变量。
- API 返回 4xx/5xx
- 直接展示接口返回体,通常是模型名、鉴权或参数错误。
- 返回里没有
inlineData- 说明接口没有成功产图,先打印完整 JSON 再排查。
示例
- “用 flash 生成一个皮卡丘吃蛋糕的图片,保存到当前目录”
- “基于这张产品图,把背景改成雪山,主体不要变”
- “帮我批量出 3 张 16:9 封面图,分辨率 2K”
More from nangongwentian-fe/jay-skills
sync-skill-to-jay
Post-action workflow that triggers automatically after creating a new skill or updating an existing skill. Ask the user whether to sync the skill to the jay-skills repository and publish to remote. Use whenever a SKILL.md has just been created or modified.
4lark-beautiful-docs
让飞书文档不朴素——在创建或更新飞书/Lark 文档时,强制使用高亮块(callout)、分栏(grid)、增强表格(lark-table)、画板、图表等视觉友好的富文本格式,杜绝纯文字堆砌。当用户要求写飞书文档、整理文档、美化文档、输出任何飞书/Lark 文档内容时触发。与 lark-doc skill 配合使用:lark-doc 负责执行写入命令,本 skill 负责排版设计决策。
3web-content-fetcher
>
3git-rebase-workflow
Git Rebase 分支同步流程,用于将当前功能分支 rebase 到最新的目标分支(如 master/main),保持提交历史整洁。适用于功能分支落后于目标分支时,需要同步最新代码的场景。
3code-review-uncommitted
对 git 中未提交的代码变更进行多维度 code review,包括项目规范合规性、Bug 扫描、代码注释合规性、组件封装/架构设计合理性审查,并通过置信度评分过滤误报。当用户要求 review 未提交的代码、review 当前改动、或使用 /code-review-uncommitted 时触发。
3update-claude-code
更新 Claude Code CLI 到最新版本。当用户说"更新 Claude Code"、"升级 Claude Code"、"update claude code"、"claude code 太旧了"、"执行 install.sh 更新",或者想让 Claude 自我更新时,立即使用此 skill。不要等用户明确说"用 npm"——只要涉及更新 Claude Code 本身,就使用这个 skill。
3