Przejdź do treści
Biblioteka skilli
Projektowanie i UX · Budowanie i kod

codeart2d

/codeart2d

Rysuje grafikę do gier kodem, bez modelu obrazu: sprite'y pikselowe, wektorowe rekwizyty, ikony SVG, postacie, efekty i kafelki, z kontrolą jakości.

Licencja
MIT
Ostatnia zmiana repozytorium
06.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
42
Skrypty
15
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 06.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 15 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: references/runtime/fx-template.mjs, scripts/ambient_bake.py, scripts/autotile_build.py, scripts/codeart_core.py, scripts/forge_core.py, scripts/forge_nav.py, scripts/forge_schema.py, scripts/fx_build.py, scripts/fx_verify.mjs, scripts/layout_build.py, scripts/parallax_build.py, scripts/pixel_qa.py, scripts/render_pixelspec.py, scripts/rig_animate.py, scripts/svg_render.py

Co robi i kiedy

Rysuje grafikę do gier kodem, bez modelu obrazu: sprite'y pikselowe, wektorowe rekwizyty, ikony SVG, postacie, efekty i kafelki, z kontrolą jakości.

Oryginalny opis (EN)

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, video2dsprit

Jak działa

  1. Use when
  2. Do not use when
  3. Capability check (once per session)
  4. Art source
  5. Host notes
  6. Commands
  7. Hello sprite
  8. Pipeline
  9. Rules
  10. Acceptance
Sekcje z nagłówków SKILL.md, w oryginale · 79 linii, 1 210 słów
Podgląd SKILL.md
---
name: codeart2d
description: 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.
---

# Code Art 2D

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.

## Use when

- The user explicitly asks for code-drawn art: a PixelSpec or SVG sprite, palette variants drawn in code, a code rig, code FX, a seam-proven autotile set, a code-made layout, stylized parallax or ambient loops.
- `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.
- Pose and layout guides that help an image model (support material, not final art).

## Do not use when

- Any art request while an image or video route exists and the user did not ask for code art: [generate2dsprite](../generate2dsprite/SKILL.md), [generate2dmap](../generate2dmap/SKILL.md) or [video2dsprite](../video2dsprite/SKILL.md) generate it.
- Painterly, organic or identity-rich art, likenesses, portraits, HD-2D plates or textured terrain; realistic fire, smoke or water.
- Never trace licensed characters into specs.

## Capability check (once per session)

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.

## Art source

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](references/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.

## Host notes

- **Codex:** this skill is explicit-only; `image_gen` and `route_media.py` make the art unless the user asks for code art. Look at review sheets with `view_image`.
- **Claude Code:** use it only on request or after `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}`.
- **Grok:** runs the same Python tools; its native image tools make the art unless the user asks for code art.

## Commands

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. Success prints one JSON line; errors print `error: ...` and exit 1; usage errors exit 2. 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](references/rasterizers.md)). Never PyMuPDF, skia-python or cairosvg: they silently ignore crispEdges, `<style>`, clipPath or gradients. `fx_verify.mjs` needs node.

## Hello sprite

1. Write `gem.pixelspec.json` (the "Hello sprite" block in [pixelspec.md](references/pixelspec.md)).
2. `python "<skill-dir>/scripts/render_pixelspec.py" --spec gem.pixelspec.json --output-dir out/gem-v1 --preview-scale 8 --strict-qc`
3. Open `out/gem-v1/preview-x8.png`; the frames are in `out/gem-v1/<variant>/frames/`.
4. Tell the user it is code-drawn (no image model).

## Pipeline

| Need | Route |
|---|---|
| Pixel character, prop or FX with palette variants | PixelSpec ([pixelspec.md](references/pixelspec.md)), then `render_pixelspec.py --spec <spec> --output-dir <new> --build-clips --strict-qc`; review with `pixel_qa.py` |
| Flat vector character, prop, UI or icon set | portable SVG with palette classes ([svg-profile.md](references/svg-profile.md)), then `svg_render.py render --svg <svg> --palette <palette.json> --output-dir <new> --zoom N` |
| Crisp pixel art drawn with SVG shapes | `svg_render.py render --crisp --zoom N --strict-qc` |
| Check an SVG before rendering | `svg_render.py lint --svg <svg> --profile portable` (add `--compile --palette <p>`) |
| Small character that walks, idles or attacks with planted feet | rig SVG plus a `rig_anim.v1` file ([rig-animation.md](references/rig-animation.md)), then `rig_animate.py --rig <svg> --anim <json> --output-dir <new> --build-clips --strict-qc`; look at `review/*.png` |
| Slash, sparks, impact ring, hit flash, dust, projectile | `fx.v1` spec ([fx-language.md](references/fx-language.md)), then `fx_build.py --spec <json> --output-dir <new> --build-clips --export-runtime`; baked frames for pixel games, `fx-runtime.mjs` for gameplay-timed FX ([fx-runtime-contract.md](references/fx-runtime-contract.md)) |
| Check an fx.v1 runtime | `node "<skill-dir>/scripts/fx_verify.mjs" <module.mjs> --report <file>` |
| Terrain transitions, roads meeting water, paths over ground, walls and ledges | material spec, then `autotile_build.py --material-spec <json> --output-dir <new> --strict-qc` (Wang-16, three materials, blob-47, bevel; [tiles-and-maps.md](references/tiles-and-maps.md)) |
| 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](references/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>` |

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`.

## Rules

- SVG (portable profile, enforced by lint): root width and height equal an integer viewBox (1 unit = 1 logical pixel); colours via `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.
- Tilesets are seam-proven before they are published: tiles assembled from the atlas are compared pixel for pixel with an independent global render over every adjacency the set allows. `--strict-qc` never passes without that proof.
- Fold empty FX tail frames before building clips; the builder refuses fully transparent frames.
- Side-view walk and run cycles: give the near and far legs a clear value contrast (the far leg two or more shades darker, never two darks that read alike) and keep the arms or forelegs visible (not hidden under a scarf, cape or bag). `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.
- generate2dsprite `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.

## Acceptance

Look at the preview and review sheets at game size and 1x before reporting ([style-envelope.md](references/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`.
Pliki w paczce (42)
  • SKILL.md 10 KB
  • agents/openai.yaml 1 KB
  • examples/dirt-path.material.json 2 KB
  • examples/hero.anim.json 2 KB
  • examples/hero.rig.svg 3 KB
  • examples/meadow-layout.json 13 KB
  • examples/palette.json 1 KB
  • examples/parallax-gen.json 1 KB
  • examples/plate-effects.json 1 KB
  • examples/potion-icons.svg 3 KB
  • examples/slash.fx.json 2 KB
  • examples/slime.pixelspec.json 3 KB
  • examples/walker16x24.pixelspec.json 5 KB
  • examples/water-grass.material.json 1 KB
  • references/fx-language.md 10 KB
  • references/fx-runtime-contract.md 7 KB
  • references/layouts-and-parallax.md 20 KB
  • references/pixelspec.md 11 KB
  • references/rasterizers.md 5 KB
  • references/rig-animation.md 18 KB
  • references/style-envelope.md 5 KB
  • references/svg-profile.md 8 KB
  • references/tiles-and-maps.md 15 KB
  • references/runtime/fx-template.mjs 13 KB
  • references/schemas/codeart.schema.json 52 KB
  • references/schemas/common.schema.json 13 KB
  • references/schemas/map.schema.json 128 KB
  • references/schemas/sprite.schema.json 65 KB
  • scripts/ambient_bake.py 32 KB
  • scripts/autotile_build.py 103 KB
  • scripts/codeart_core.py 119 KB
  • scripts/forge_core.py 78 KB
  • scripts/forge_nav.py 95 KB
  • scripts/forge_schema.py 26 KB
  • scripts/fx_build.py 49 KB
  • scripts/fx_verify.mjs 30 KB
  • scripts/layout_build.py 107 KB
  • scripts/parallax_build.py 47 KB
  • scripts/pixel_qa.py 22 KB
  • scripts/render_pixelspec.py 43 KB
  • scripts/rig_animate.py 118 KB
  • scripts/svg_render.py 26 KB

Wersje

W bazie nie ma innych skilli o nazwie codeart2d.

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 13.11.2026 · wersja paczki c926642df1af (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100generate2dsprite
    Tworzy postacie, stworzenia, rekwizyty, ikony i efekty 2D do gier jako obrazy wzorcowe, arkusze sprite'ów lub klipy animacji, z eksportem klatek do silnika.
  • 95ai-game-art-pipeline
    Planuje i wykonuje zasoby graficzne oraz animacje do gier: rekwizyty, postacie, sprite'y, tła, efekty i pakowanie pod silnik.
  • 100pixel-art-generation
    Generuje grafikę pixel art do gier: sprite'y, animacje, tła i miniatury, dzieli arkusze sprite'ów i usuwa tła ze sprite'ów.
  • 84sprite
    Tworzy statyczne sprite'y pixel-art (postacie, przedmioty, ikony, portrety, rekwizyty) jako arkusze PNG gotowe dla silnika, renderowane bez zewnętrznych narzędzi i sprawdzane do skutku.
  • 96dotwork
    Tworzy pixel art do gry na własnym GPU przez ComfyUI: postacie z animacjami, rekwizyty, tereny, efekty, ikony i interfejs, bez płatnej usługi.
  • 100pxl-pixel-art
    Tworzy pixel art, np. postacie, kafelki i sprite'y, w bibliotece pxl z podglądem na żywo w przeglądarce.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.