一键导入
design-character
Design a new pixel-family character interactively. Use when the user wants to add a new character to the pixel-family package.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Design a new pixel-family character interactively. Use when the user wants to add a new character to the pixel-family package.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when Codex needs to animate Typst pixel-art character functions into a looping GIF, especially in pixel-family-style packages with 16x16 inline vector sprites, generated frame sheets, or ImageMagick/Typst GIF assembly.
Release a new version of pixel-family to GitHub and Typst Universe.
| name | design-character |
| description | Design a new pixel-family character interactively. Use when the user wants to add a new character to the pixel-family package. |
| disable-model-invocation | true |
Interactive workflow: gather requirements, design pixel art, name it, and integrate into the repo.
Usage: /design-character
Ask the user two questions (in a single message):
Wait for the user to answer before proceeding.
Create 3 distinct pixel art interpretations of the character description. Each variant should differ meaningfully — not just palette swaps. Vary pose, accessories, silhouette, or stylistic emphasis.
Create candidates/<username>-candidates.typ containing:
<username>-a-data, <username>-b-data, <username>-c-data<username>-a-colors(skin, hair, shirt, pants), etc.none (index 0 = transparent)// Variant A — "Sitting Tabby")Create candidates/<username>-render.typ:
// Render character candidates for <username>
// Compile: typst compile candidates/<username>-render.typ candidates/<username>-render.pdf
#import "../lib.typ": pixel-grid
#import "<username>-candidates.typ": *
#let sz = 128pt
#set page(width: 3 * sz + 80pt, height: auto, margin: 20pt)
#set text(size: 10pt, font: "DejaVu Sans")
#let render(data, colors) = box(
width: sz, height: sz,
pixel-grid(data, colors, sz / 16),
)
#align(center, text(size: 16pt, weight: "bold")[<Character Name> — Candidates])
#grid(
columns: (1fr, 1fr, 1fr),
gutter: 12pt,
align(center, stack(dir: ttb, spacing: 6pt,
render(<username>-a-data, <username>-a-colors(...)),
text(weight: "bold", "A: <variant-a-name>"),
)),
align(center, stack(dir: ttb, spacing: 6pt,
render(<username>-b-data, <username>-b-colors(...)),
text(weight: "bold", "B: <variant-b-name>"),
)),
align(center, stack(dir: ttb, spacing: 6pt,
render(<username>-c-data, <username>-c-colors(...)),
text(weight: "bold", "C: <variant-c-name>"),
)),
)
Fill in appropriate default colors for each variant's colors(...) call.
typst compile --root . candidates/<username>-render.typ candidates/<username>-render.pdf
open candidates/<username>-render.pdf # macOS
# or: xdg-open candidates/<username>-render.pdf # Linux
Show the user a message like:
I've opened the PDF with 3 designs. Which variant do you prefer — A, B, or C?
Briefly describe each variant's key visual difference so the user can reference them by name if the PDF hasn't opened.
Wait for the user to pick before proceeding.
Based on the character description, suggest 3 candidate function names for the Typst API. Present them in a table:
| # | Name | Recommended? | Reason |
|---|---|---|---|
| 1 | <name> | Yes/No | ... |
| 2 | <name> | Yes/No | ... |
| 3 | <name> | Yes/No | ... |
Guidelines for name suggestions:
tabby, sun-chaser)patrick, guanhua)Wait for the user to pick before proceeding.
Using the chosen variant and function name, follow the checklist from CLAUDE.md "Adding a Character" section:
Batch file: Copy the chosen variant's data + colors into the appropriate characters/batch-*.typ file (or create a new batch). Rename from <username>-X-data to <chosen-name>-data and <username>-X-colors to <chosen-name>-colors.
lib.typ: Import the batch (if new), add the character function with appropriate default colors and doc comment.
images/render.typ: Add a #pagebreak() + #align(center + horizon, <name>(size: sz)) entry.
Makefile:
CHARACTERS listmv render-NN.svg <name>.svg line in the $(SVGS) target (increment the page number)manual.typ:
README.md: Add a cell to the gallery table (use v0.2.0 tag or current version for image URL)
Verify: Run make test to confirm everything compiles
Generate images: Run make images to produce SVGs
Clean up: Remove the candidate files from candidates/ that were created in step 2
Commit: Stage all changes and commit with message: feat: add <name> character (<description>). Do NOT push.
After committing, show the user: