- name
SKILL.md
技能檔案保留在發布者的儲存庫中。
在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add 0x0funky/agent-sprite-forge --skill codeart2d -a cursor -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add 0x0funky/agent-sprite-forge --skill codeart2d -a claude-code -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add 0x0funky/agent-sprite-forge --skill codeart2d -a codex -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add 0x0funky/agent-sprite-forge --skill codeart2d -a grok -y在 Grok Bot 聊天中傳送複製的訊息。Bot 會從 GitHub 取得這個 SKILL.md,並加入你所有 Bot 共用的技能中。
Install this skill: https://github.com/0x0funky/agent-sprite-forge/tree/HEAD/skills/codeart2d來自發布者
You write the art as text (PixelSpec JSON, portable SVG, rig, FX, material, layout or parallax
specs); the scripts render, check and package it. No image model is involved. It is a declared art
source (art_source: "code"), not a placeholder.
route_media.py prints no-route (exit 3): no API key is configured and no local image or video route exists. Say so, and offer to add a key or a CLI as well.Run python "<skill-dir>/../generate2dmedia/scripts/route_media.py" resolve --kind image (or --kind video): when it names a route, the image or video skill takes the request unless the user asked for code art. forge_doctor.py in the same folder shows the full picture. If encoding.stdout fails, set PYTHONUTF8=1. For SVG work also run svg_render.py doctor --report <new.json> once per machine.
This skill is the explicit-only last resort of the route order: the API when a key is configured, then the local image tools, then code art, only when the user asks for it or no route exists. Never substitute it silently for generated art. Before you draw, check what code art can and cannot draw well in style-envelope.md (its table describes strengths, not the route order), and tell the user when a request needs an image model. Disclose every result: "code-drawn, no image model" (codeart-meta.json records "art_source": "code"); never present it as image-model output.
image_gen and route_media.py make the art unless the user asks for code art. Look at review sheets with view_image.no-route. Look at every preview-*.png and review/*.png with Read before you report; run tools with Bash; <skill-dir> is ${CLAUDE_SKILL_DIR}.Run each tool as one line from the user's project root: python "<skill-dir>/scripts/<tool>.py" .... <skill-dir> is this skill's folder; sibling skills sit beside it (--build-clips calls <skill-dir>/../generate2dsprite/scripts/build_animation_clips.py). Keep specs and outputs inside the project. Every tool writes a new --output-dir: it refuses an existing one and publishes only a complete result; with --strict-qc a failed check publishes nothing (exit 1). Success prints one JSON line; errors print error: ... and exit 1 (nothing usable is published); usage errors exit 2; a result published for inspection with QA status fail exits 4. Examples to copy: examples/.
Dependencies: numpy and Pillow for everything; PixelSpec rendering and pixel_qa.py need nothing else. SVG art also needs one rasterizer: resvg-py (python -m pip install "resvg-py>=0.5,<0.6", preferred), the resvg-js CLI on PATH, or Chrome/Edge (set CHROME_PATH) (rasterizers.md). Never PyMuPDF, skia-python or cairosvg: they silently ignore crispEdges, <style>, clipPath or gradients. fx_verify.mjs needs node.
gem.pixelspec.json (the "Hello sprite" block in pixelspec.md).python "<skill-dir>/scripts/render_pixelspec.py" --spec gem.pixelspec.json --output-dir out/gem-v1 --preview-scale 8 --strict-qcout/gem-v1/preview-x8.png; the frames are in out/gem-v1/<variant>/frames/.Hand-offs: clips go to generate2dsprite export_engine.py (never generate2dsprite.py process); a layout's map_bundle.v2 goes to generate2dmap map_bundle.py validate, map_nav.py check and export_tiled.py / export_godot.py / export_ldtk.py.
class="c-NAME"; bones rotate with transform="rotate(a cx cy)"; no <text>, <image>, feTurbulence, feDisplacementMap or mix-blend-mode; pixel art adds shape-rendering="crispEdges" and no gradients, masks, filters or opacity.--strict-qc never passes without that proof.render_pixelspec.py warns half_cycle_duplicates when frame i and i+n/2 of a walk/run clip share a silhouette (IoU >= 0.95); fix the legs, or pass --allow-duplicate-half-cycle only after the review sheet shows the stride reads.sheet_qc.py frames on code-drawn frames (art_source=code): identity_residual and torso_drift are advisory, since the head and root are fixed in code; judge them by eye, and treat near_duplicates and leg_alternation as real.Look at the preview and review sheets at game size and 1x before reporting (style-envelope.md has the review loop). Quote the QA status and failed checks from the JSON summary.
Report every WARN or FAIL check verbatim (id, value, threshold, files) from each published QA envelope; never say "all checks passed" when any published envelope has a warn. Deliver specs, rendered frames or tiles, clips or bundles, codeart-meta.json and the disclosure line. Data contracts: references/schemas/codeart.schema.json.
Explicit-only last resort. Draws game art from code, with no image model - pixel sprites from a PixelSpec, flat vector props, UI and icons from portable SVG, rigged characters with planted feet, FX wi
---name: codeart2ddescription: Explicit-only last resort. Draws game art from code, with no image model - pixel sprites from a PixelSpec…---# skills/codeart2d/SKILL.md總覽
Explicit-only last resort. Draws game art from code, with no image model - pixel sprites from a PixelSpec, flat vector props, UI and icons from portable SVG, rigged characters with planted feet, FX with a JS runtime, seam-proven autotiles, playable top-down layouts with collision, stylized parallax and ambient plate motion - palette-exact, with QA and review sheets. Use only when the user explicitly asks for code-drawn art, or when generate2dmedia route_media.py finds no image or video route (no-route, exit 3). Never the default - image generation (generate2dsprite, generate2dmap, video2dsprite) comes first for characters, props, maps and FX. Not for painterly, detailed or likeness art, HD-2D plates or realistic fire, smoke or water. Always disclose the result as code-drawn.
常見問題
從發布者下載 skills/codeart2d/SKILL.md,或複製路徑後開啟儲存庫。PlugMCP 只收錄這項技能,不代管檔案。
發布者將它存放在 https://github.com/0x0funky/agent-sprite-forge。
Claude、Cursor、Codex 和 Grok Build 可以讀取你從發布者儲存庫加入的 SKILL.md。在聊天中傳送技能的 GitHub 資料夾連結,Grok Bot 就會安裝它。
| An image-tool texture inside exact tile masks | autotile_build.py --material-texture NAME=PATH --quantize-textures (one tile that wraps) |
| Playable top-down map: roads, props, exits, collision, reachability | layout_build.py --spec <layout.json> --output-dir <new> --preview --strict-qc (--tiles <tileset manifest> for real tiles); open debug.png (layouts-and-parallax.md) |
| Stylized parallax background | parallax_build.py --spec <parallax.json> --output-dir <new> --validate --sweep-frames 49; review sweep-sheet.png |
| Ambient motion on a static plate | ambient_bake.py --plate <png> --spec <effects.json> --output-dir <new> --preview --strict-qc; encode with generate2dmap scene_motion.py |
| QA any pixel frames | pixel_qa.py --input "<glob>" --palette <palette, spec or codeart-meta.json> --review <new.png> --onion --strict --report <new.json> |