跳过主要内容
ANY
Skill免费

pxl: Pixel Art as Code

/pxl-pixel-art

An Agent Skill and zero-dependency CLI: the agent writes a compact .px.js file and gets PNGs, sprite sheets with JSON, animated GIFs and a live viewer.

GitHub 星数
374
(GitHub 星数,统计于 2026-10-23)
许可证
MIT
最近提交
2026/10/15
作者
crsolver

信息来自作者的 README。 GameSkill 还没完整跑过。支持的 Agent 和安装步骤以作者文档为准。

安装

Claude Code (all projects)
git clone https://github.com/crsolver/claude-pxl.git ~/.claude/skills/pxl-pixel-art

For one project only, clone into .claude/skills/pxl-pixel-art instead.

Other agents (Codex, Cursor…)
npx github:crsolver/claude-pxl build art.px.js

Point the agent at SKILL.md and tell it the CLI is node <path to pxl>/bin/pxl.js, or use the npx form.

命令照搬项目 README。在本机运行前,请先看一眼仓库。

包含内容

  • A DSL with palettes and ramps, text-grid sprites, mirroring, auto-outline and palette-swap variants
  • Primitives and brushes: rects, lines, circles, gradients, dithering, noise, tilemaps and a pixel font
  • Animation as frame patches over a base sprite, exported as strips, JSON tags and GIFs
  • Sprite sheets with TexturePacker-style JSON
  • pxl serve: a live browser viewer that replays the painting step by step on every save
  • Optional lighting: lamps, glow and normal-based relief

适合

  • Game sprites, tiles, icons and small animated scenes that need to stay editable as code
  • Recolors and variants: one line per palette swap

不适合

  • Painting by hand: art is written as code, not drawn

试试这条提示词

提示词
Draw a 16x16 slime sprite with a red recolor and a 4-frame idle animation, then put both in a sprite sheet.

关于这个 Skill

pxl turns pixel art into code an agent can write and fix. A .px.js file defines a palette with one-character color keys and draws sprites as text grids. The CLI renders them to PNGs, sprite sheets with JSON and animated GIFs. With mirroring, auto-outline and palette swaps, an agent can draw half a sprite and get the full sprite plus its recolors.

The repository is itself the skill. SKILL.md describes the workflow, reference.md has the full API, and lighting.md is only loaded when needed. Errors point at file:line:col with "did you mean" hints, so the agent can fix its own mistakes. Ask it to start pxl serve to watch the art being painted in your browser.

环境要求

  • Node.js 22.18 or newer

相关主题

常见问题

搭配使用

作者标注的相关 Skills,或更适合相邻任务的 Skills。

相似 skills