oil-icon
生成风格统一的图标集合,通过宫格生图、切分和去背景交付透明 PNG。用户需要成套自定义图标、栏目图标或匹配品牌风格的图标时使用;不用于单个简单矢量图标或小尺寸密集功能符号。
含まれるファイル(91)
- SKILL.md6.4 KB
- .github/workflows/credential-ui.yml601 B
- .gitignore188 B
- assets/readme/made-with-beautify.svg1.5 KB
- assets/readme/readme-hero.png476.8 KB
- assets/readme/readme-section-consistency.svg1.4 KB
- assets/readme/readme-section-start.svg1.3 KB
- assets/readme/readme-section-styles.svg1.3 KB
- assets/readme/readme-section-what.svg1.3 KB
- assets/readme/readme-section-workflow.svg1.4 KB
- assets/readme/showcase-isometric/01.png150.5 KB
- assets/readme/showcase-isometric/02.png167.5 KB
- assets/readme/showcase-isometric/03.png87.3 KB
- assets/readme/showcase-isometric/04.png162.4 KB
- assets/readme/showcase-isometric/05.png157.9 KB
- assets/readme/showcase-isometric/06.png148.2 KB
- assets/readme/showcase-isometric/07.png124.0 KB
- assets/readme/showcase-isometric/08.png142.5 KB
- assets/readme/showcase-isometric/09.png144.8 KB
- assets/readme/showcase-isometric/10.png163.0 KB
- assets/readme/showcase-isometric/11.png138.1 KB
- assets/readme/showcase-isometric/12.png188.3 KB
- assets/readme/showcase-isometric/13.png131.4 KB
- assets/readme/showcase-isometric/14.png155.7 KB
- assets/readme/showcase-isometric/15.png150.7 KB
- assets/readme/showcase-isometric/16.png160.8 KB
- assets/readme/showcase-soft3d/01.png181.3 KB
- assets/readme/showcase-soft3d/02.png183.2 KB
- assets/readme/showcase-soft3d/03.png97.1 KB
- assets/readme/showcase-soft3d/04.png186.6 KB
- assets/readme/showcase-soft3d/05.png153.3 KB
- assets/readme/showcase-soft3d/06.png154.5 KB
- assets/readme/showcase-soft3d/07.png171.5 KB
- assets/readme/showcase-soft3d/08.png139.4 KB
- assets/readme/showcase-soft3d/09.png167.6 KB
- assets/readme/showcase-soft3d/10.png167.5 KB
- assets/readme/showcase-soft3d/11.png186.1 KB
- assets/readme/showcase-soft3d/12.png202.1 KB
- assets/readme/showcase-soft3d/13.png155.2 KB
- assets/readme/showcase-soft3d/14.png168.9 KB
- assets/readme/showcase-soft3d/15.png158.0 KB
- assets/readme/showcase-soft3d/16.png192.4 KB
- assets/readme/source/hero.html4.6 KB
- LICENSE1.0 KB
- README.md6.8 KB
- reference/construction.md4.2 KB
- reference/design-rules.md5.0 KB
- reference/image-providers.md2.9 KB
- reference/prompt-template.md3.5 KB
- reference/style-adaptation.md2.4 KB
- references/api-key-setup.md3.8 KB
- scripts/credential-ui/component.json2.2 KB
- scripts/credential-ui/manifests/default.json230 B
- scripts/credential-ui/manifests/profiles.json147 B
- scripts/credential-ui/package-lock.json8.5 KB
- scripts/credential-ui/package.json656 B
- scripts/credential-ui/public/app.js6.3 KB
- scripts/credential-ui/public/favicon.svg315 B
- scripts/credential-ui/public/index.html1.2 KB
- scripts/credential-ui/public/style.css3.1 KB
- scripts/credential-ui/README.md8.0 KB
- scripts/credential-ui/src/cli.ts6.3 KB
- scripts/credential-ui/src/config.ts5.7 KB
- scripts/credential-ui/src/page.ts1.7 KB
- scripts/credential-ui/src/profile.ts4.7 KB
- scripts/credential-ui/src/run.ts3.3 KB
- scripts/credential-ui/src/server.ts11.3 KB
- scripts/credential-ui/tests/configure.test.ts2.5 KB
- scripts/credential-ui/tests/credentials.test.ts6.4 KB
- scripts/credential-ui/tests/multi-key.test.ts9.7 KB
- scripts/credential-ui/tests/native-smoke.ts4.1 KB
- scripts/credential-ui/tests/page.test.ts2.0 KB
- scripts/credential-ui/tests/profile.test.ts4.1 KB
- scripts/credential-ui/tests/run.test.ts2.7 KB
- scripts/credential-ui/tests/ui.test.ts5.0 KB
- scripts/credential-ui/tsconfig.json353 B
- scripts/credential-ui/tsconfig.web.json237 B
- scripts/credential-ui/web/app.ts6.3 KB
- scripts/gen_image.py1.4 KB
- scripts/setup.sh491 B
- scripts/slice_icons.py5.4 KB
- styles/animal-badge.json1.1 KB
- styles/cartoon.json1.1 KB
- styles/colorblock.json1.0 KB
- styles/filled.json1.1 KB
- styles/isometric.json1.0 KB
- styles/linear.json1.1 KB
- styles/realistic.json1.1 KB
- styles/render3d.json1.1 KB
- styles/sticker.json1.1 KB
- tests/test_profile_business.py1.2 KB
SKILL.md(原文)
インストールする前に、エージェントに与えられる指示の中身を確認できます。
oil-icon
Generate a set of icons that share one visual style, output as transparent PNGs.
Image generation runs on a flat grey backdrop as a 4×4 sheet — 16 icons in one generation, 有助于统一风格,但仍需逐个检查 — then each cell is sliced out and background-removed.
Agent owns the design decisions (which style, which palette, which metaphors, whether to match a brand); image generation and slicing are mechanical steps.
API Key 配置入口
需要外部服务凭据时先读API Key 配置与业务读取:复用已有安全入口;本机缺少 Key 时使用随附固定页面,保存后通过业务包装入口读取。内置能力与纯本地流程不要求配置 Key。
Workflow
- Choose the style. Either pick a built-in from
styles/(table below), or match the user's brand by reading their project's design tokens / assets and deriving a custom style-spec — seereference/style-adaptation.md. Freeze the result as a style-spec with the same fields as the built-in JSONs; 后续批次复用同一规范,并检查生成偏差. - List the icons. Write each concept as
name — short concrete metaphor(e.g.settlement — a wallet with a coin). One clear idea per icon; keep the detail level consistent across the set. 默认每张 16 格;明确选择 9 格时,提示词使用 3×3,切图命令必须同时传--grid 3。 If the user asks for an exact count below 16, still use a 4x4 / 16-cell sheet: place the requested icons first in row-major order, then explicitly ask the remaining cells to stay empty grey background. - Compose the prompt.
style.preamble+ the style'sconstructionfields (as short guidance) + palette-lock line + numbered metaphors + the fixed composition text — seereference/prompt-template.mdandreference/construction.md. - Generate the sheet(s). Choose an image provider by capability, in order (see
reference/image-providers.md) — never assume Codex is present:- Built-in / host imagegen first — if the running agent already has a callable image-generation tool, including Codex's built-in
image_gentool or theimagegenskill, call it directly. Do not delegate to external Codex CLI just to reach imagegen from another process. - Codex CLI fallback — only if this agent has no callable image-generation tool, and Codex is available (从可用 Skill 清单定位 codex,或使用 PATH 中已有的 codex), delegate generation to it.
- External API fallback — only if neither of the above exists, 沿用用户已授权的供应商;缺少凭据时按配置说明打开随附页面,不索要聊天中的 Key; for OpenAI Images,
scripts/gen_image.py --prompt "…" --out raw/<style>.pngis ready. Save or copy each generated sheet toraw/<style>.pngon flat grey#808080. Built-in imagegen may save under$CODEX_HOME/generated_images/...; after generation, move or copy the selected PNG into the task outputraw/folder. 同一张图更容易保持共同风格,但仍须逐个验收,不能把一次生成视为一致性保证; a provider only has to turn the prompt into a grey-background PNG.
- Built-in / host imagegen first — if the running agent already has a callable image-generation tool, including Codex's built-in
- Slice. Run
scripts/setup.shonce, then:.venv/bin/python3 scripts/slice_icons.py <raw>.png <outdir> --mode <cutout> [--thresh N] [--grid 4] [--count N]using the style'scutoutmode (floodfillfor flat/hard-edge,rembgfor soft / 3D / glossy / photo). - QA (mandatory). Composite the sliced PNGs onto a contrasting colour (e.g. magenta) and check every icon for (a) a fragment bled in from a neighbouring cell, (b) leftover grey, and (c) consistency against the style's
construction— uniform stroke, one radius, matched detail level, shared parts, motif present, single perspective, and no accent out-weighting the defining element (in line styles the accent must be lighter and smaller than the stroke). Re-slice or regenerate any that fail — never ship an icon carrying part of the one above it. - Deliver the transparent PNGs, organized and named.
Built-in styles
| style | look | cutout | fits |
|---|---|---|---|
| linear | mono line / outline | floodfill | utility, settings |
| filled | solid single-colour glyphs | floodfill | mobile nav / tab bars |
| colorblock | bold flat multi-colour blocks | floodfill | kids, creative |
| cartoon | sticker-style cartoon | rembg | games, entertainment |
| isometric | isometric 3D miniatures | rembg | SaaS, dashboards |
| render3d | glossy puffy 3D | rembg | rewards, onboarding |
| sticker | die-cut glossy vinyl | rembg | social, reactions |
| realistic | photoreal product renders | rembg | e-commerce, hero |
| animal-badge | animal emblems in badges | rembg | avatars, kids |
Each styles/<name>.json holds the preamble, locked palette, cutout mode, threshold, construction system, and what it fits.
Key rules (see reference/design-rules.md)
- Lock the palette as hex in the spec — colourful styles drift run-to-run otherwise.
- Never make black filled icons — near-black / black may be used as a thin outline or line stroke, but never as the dominant filled mass of an icon set. If the brand foreground is black, map it to strokes only; for filled or duotone styles, choose a mid-light brand colour for the main shape and keep dark colours small.
- Start from the real product context — when a user gives a live site, screenshot, mascot, logo, or brand asset, derive the icon concepts and construction from that source first. Do not jump straight into generic style families such as isometric, duotone, 3D, or colorblock; those are finishes applied after the product motif, real navigation, and real feature names are locked.
- Slicing drops neighbour bleed — the slicer keeps only the centred icon per cell.
- Cutout by edge type — flat/hard-edge → floodfill; soft / 3D / glossy / photo → rembg.
- Design sophistication comes from a construction system + a brand motif, not from tinting a generic set — each style's
constructionobject encodes the grid, stroke, radius, detail budget, shared parts, and motif (seereference/construction.md). A rigorous system ultimately wants vector; raster is for direction and spot icons.
レビュー
まだレビューはありません。使ってみた感想をお寄せください。