From sharker-skills
为 iOS 项目生成 App Store 上架所需的视觉资源(App Icon、商店截图、Preview Poster),通过 codex CLI 调用 gpt-image-2 生成位图。产出符合 Apple Human Interface Guidelines 的简约美观图片。当用户说"生成 iOS 图标 / 上架资源 / 商店截图 / App Store screenshot / 替换 icon / 上架素材"等意图时使用。
How this skill is triggered — by the user, by Claude, or both
Slash command
/sharker-skills:ios-store-assetsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
为 iOS 项目批量产出 App Store 上架所需的视觉资源——App Icon、商店截图、App Preview Poster——并把文件按 Apple 规范交付到项目目录。
为 iOS 项目批量产出 App Store 上架所需的视觉资源——App Icon、商店截图、App Preview Poster——并把文件按 Apple 规范交付到项目目录。
frontend-design:frontend-design 直接处理)sips 即可,不必走本 skill)frontend-design:frontend-design — 用于"美学方向"决策。本 skill 在产出每条 prompt 之前必须先借鉴该 skill 的设计哲学:选定一种 BOLD 的美学方向(editorial / wax-seal / Penguin Classics / Swiss / brutalist / art-deco …),避免任何 AI-slop 配色(紫渐变、Inter 字体、对称 emoji)。codex CLI + image_gen(gpt-image-2) — 实际生图工具。本 skill 的输出 = 一段段可直接喂给 codex exec 的 prompt 与命令。sips(验证尺寸 / 缩放 / 检查 alpha)、file(确认 PNG 格式)。读取这些文件来理解 App 的功能、色彩与气质,不要凭空臆造:
*.xcodeproj / project.yml / Info.plist —— 拿到 App 名、bundle idTabView、NavigationSplitView)—— 列出功能模块Assets.xcassets/AppIcon.appiconset/Contents.json —— 现有 icon 尺寸清单REQUIREMENTS.md / README.md / Agent.md —— 产品定位、目标用户Res/ 或 Resources/ —— 现存哪些素材,分辨率是否合规把以上压缩成 一段 ≤ 5 行的 "Project Brief" 给用户,作为后续 prompt 的事实底座。
调用 frontend-design:frontend-design 的设计哲学,主动给出 3 个差异化的方向让用户选,每个方向必须包含:
⚠️ 禁止:
讨论可以多轮:用户可能说"第二个方向但配色换成深绿"或"再给我看几个"——继续迭代,直到用户明确说"用这个 / 就这样 / 开始生成"。
确定方向后,按下表为 每个资源 写一段独立的 prompt,全部汇总到项目内 Res/IMAGE_PROMPTS.md(或类似路径,跟着已有项目惯例):
| 资源 | 尺寸(px) | Apple 规范要点 |
|---|---|---|
| App Icon | 1024 × 1024 | 不透明 RGB、无 alpha、无圆角、无阴影(系统会加) |
| iPhone 6.9" 截图(必交) | 1290 × 2796 | 竖屏,最少 3 张推荐 5 张 |
| iPhone 6.5" 截图(兼容老机) | 1284 × 2778 | 可选 |
| iPad 13" 截图(如支持) | 2064 × 2752 | 竖屏 |
| App Preview Poster | 1290 × 2796 | 视频封面,可选 |
每段 prompt 必须包含:
NO Apple logo, NO Cambridge crest, NO university crest, NO copyrighted marks, NO text other than X, NO emoji, NO stock-photo aesthetics, NO purple gradient让用户再 review 一遍 prompt 文案,得到第二次确认 后再进入 Step 4。
每张图一条命令,单独跑(便于并行 + 便于审 UI 拼写)。模板:
codex exec --dangerously-bypass-approvals-and-sandbox \
"使用 image_gen 工具生成一张 <W>x<H> 的 PNG,最终保存到 <绝对路径>。生成后用 sips 验证尺寸与 hasAlpha=no(icon 必须 no)。Prompt: <Step 3 写好的 prompt>"
注意事项:
~ 或相对路径<项目>/Res/generated/(不直接覆盖现有素材,留对比空间)sips -z 1024 1024 强制规范尺寸(gpt-image-2 实际产出可能是 1254 等)codex exec,但每条命令独占一个目标文件名Read 工具把 PNG 显示给用户检视,不要只口头说"已生成"对每张产出执行:
sips -g pixelWidth -g pixelHeight -g hasAlpha <file>
file <file> # 确认是 PNG,非 8MB+
验收清单:
hasAlpha: no、< 1MB如果 AI 把 UI 内英文拼错(gpt-image-2 常见问题),有两条路:
icon 1024 → 14 个尺寸:
SET=<项目>/CambridgeDict/Resources/Assets.xcassets/AppIcon.appiconset
SRC=<项目>/Res/generated/app-icon.png
for spec in "1024:Icon-App-1024x1024@1x" \
"180:Icon-App-60x60@3x" "120:Icon-App-60x60@2x" "120:Icon-App-40x40@3x" \
"80:Icon-App-40x40@2x" "40:Icon-App-40x40@1x" \
"87:Icon-App-29x29@3x" "58:Icon-App-29x29@2x" "29:Icon-App-29x29@1x" \
"60:Icon-App-20x20@3x" "40:Icon-App-20x20@2x" "20:Icon-App-20x20@1x" \
"167:Icon-App-83.5x83.5@2x" "152:Icon-App-76x76@2x" "76:Icon-App-76x76@1x"; do
px="${spec%%:*}"; name="${spec##*:}"
sips -z "$px" "$px" "$SRC" --out "$SET/${name}.png" >/dev/null
done
跑完检查 Contents.json 的 filename 与实际文件名一致。
理想的一次完整调用应该长成:
Assets.xcassets不要把 1–8 一气呵成做完——节奏感来自每一步等用户确认。
~ 路径或相对路径(codex sandbox 可能解析不到)npx claudepluginhub akashark/sharkerskills --plugin sharker-sddCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.