bggg-creator-image2psd/SKILL.md
把一张或多张图片整理成 PSD 图层文件的创作与转换 skill。当用户需要 image2psd、图片转 PSD、 多张图片拼成 PSD、海报/设计稿拆成多个图层、白底转透明、颜色聚类拆层、把 Codex/AI 生图结果拆成元素图再合成 PSD、 或希望输出 layered PSD、可在 Photoshop/Photopea 中编辑的分层栅格文件时,应该使用此 skill。 在 Codex 中使用时,默认结合 imagegen skill:先用 Codex 视觉/生图能力理解、补齐或重建元素,再用本 skill 的脚本落地 PSD。
npx skillsauth add ninehills/skills bggg-creator-image2psdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
用这个 skill 把图片资产组织成可编辑的 PSD 栅格图层。核心脚本是 scripts/image2psd.py,它不依赖 Photoshop 或 ImageMagick,能独立写出带图层名、透明通道和合成预览的 PSD。
在 Codex 里处理图片转 PSD 时,默认配合 imagegen skill 的能力:
imagegen skill 的内置生图/编辑能力生成项目内资产,再交给本 skill 组装 PSD。$CODEX_HOME。项目要用的图片必须复制到本 skill 的项目目录。每次处理图片都创建独立项目目录,放在本 skill 文件夹下:
bggg-creator-image2psd/
└── projects/
└── YYYYMMDD_slug/
├── original_reference.png
├── manifest.json
├── layer_sources/
├── psd_full_canvas_layers/
├── output.psd
├── output.preview.png
├── psd_full_canvas_layers.zip
└── process_notes.md
命名规则:
YYYYMMDD_slug 使用当前日期和简短英文/拼音任务名,例如 20260503_lifestyle_product.original_reference.png 是本次处理的源图副本。layer_sources/ 保存用于组装的透明图层源。psd_full_canvas_layers/ 保存 Photoshop 可直接按原位叠放的全画布 PNG 图层。process_notes.md 记录图层划分、是否使用 imagegen、验证结果和已知限制。判断任务类型:
assemble,按图层顺序写 manifest。split-colors 按颜色聚类拆层,并说明它不是语义对象拆层。assemble 合成 PSD。创建 projects/YYYYMMDD_slug/,把源图和所有输出放进去。默认用脚本初始化:
python3 bggg-creator-image2psd/scripts/init_project.py lifestyle_product \
--source 用户附件.png \
--date 20260503
如果使用了 imagegen,先把 $CODEX_HOME 下的生成结果复制到该项目的 imagegen_assets/,再进入拆层或合成流程。
确定画布尺寸。优先沿用源图尺寸;海报类任务需要明确宽高。
处理透明:
remove_background: none。remove_background: white。remove_background: white-preserve。corner 或 color。运行脚本输出 PSD、预览 PNG、可选的单层 PNG 目录/zip。
验证输出:检查脚本 JSON 摘要里的 layer_count、预览 PNG、PSD 文件大小;用 Pillow 或 Photoshop/Photopea 检查 PSD 可读性。
写 process_notes.md,记录图层、路径、验证和限制。
从 manifest 合成:
python3 bggg-creator-image2psd/scripts/image2psd.py assemble \
--manifest work/manifest.json \
--output work/output.psd \
--preview work/output.preview.png \
--save-layers work/layers \
--zip-layers work/layers.zip
直接把多张图合成,第一张为背景:
python3 bggg-creator-image2psd/scripts/image2psd.py assemble bg.png title.png logo.png \
--first-is-background \
--names "Background,Title,Logo" \
--output output.psd \
--save-layers layers
把单张平面图按颜色拆成 PSD 图层:
python3 bggg-creator-image2psd/scripts/image2psd.py split-colors poster.png \
--output poster-color-layers.psd \
--num-colors 10 \
--ignore-color white \
--save-layers poster-color-layers
用 manifest 管理复杂 PSD。图层数组按从底到顶排列。
{
"canvas": {
"width": 1122,
"height": 1402,
"composite_background": "#ffffff"
},
"output": "poster.psd",
"preview": "poster.preview.png",
"save_layers_dir": "layers",
"layers": [
{
"name": "Background",
"file": "assets/background.png",
"fit": "cover",
"remove_background": "none"
},
{
"name": "Ship and Waves",
"file": "assets/ship.png",
"remove_background": "white-preserve"
},
{
"name": "Title",
"type": "text",
"text": "AI Commerce Summit",
"x": 80,
"y": 120,
"font_size": 72,
"color": "#41270d",
"max_width": 900
}
]
}
图层字段要点:
file/path/src: 图片路径,manifest 相对路径从 manifest 所在目录解析。type: "text": 用 PIL 渲染成独立栅格文字层,不是 Photoshop 可编辑文字对象。x, y: 图片或文字层左上角偏移。fit: none、contain、cover、stretch。remove_background: none、white、white-preserve、corner、color。opacity: 0 到 1。在 Codex 中,默认把 imagegen 当成补强工具,而不是唯一处理方式。把设计拆成独立元素来生成或编辑,而不是只生成一张完整海报:
white 或 white-preserve 去底。如果生图只得到一张完整图,先用 split-colors 做可编辑性最低限度拆层,再按用户需求补生关键元素。
复盘成功案例后,单张图转 PSD 优先采用这个顺序:
references/implementation-notes.md。references/source-projects.md。reference/ 下克隆的外部仓库作为运行依赖;它们只是开发参考。交付时至少说明:
development
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
tools
UI/UX design intelligence for web and mobile. Includes 50+ styles, 161 color palettes, 57 font pairings, 161 product types, 99 UX guidelines, and 25 chart types across 10 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, and HTML/CSS). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, and check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, and mobile app. Elements: button, modal, navbar, sidebar, card, table, form, and chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, and flat design. Topics: color systems, accessibility, animation, layout, typography, font pairing, spacing, interaction states, shadow, and gradient. Integrations: shadcn/ui MCP for component search and examples.
data-ai
Triage issues through a state machine driven by triage roles. Use when user wants to create an issue, triage issues, review incoming bugs or feature requests, prepare issues for an AFK agent, or manage issue workflow.
tools
Turn the current conversation context into a PRD and publish it to the project issue tracker. Use when user wants to create a PRD from the current context.