AI-driven 2D pixel game asset generation toolkit
Project description
Pixel Asset Master — AI generates 2D pixel game assets from game design briefs
English | 中文
Drop in a game concept, art direction, or reference images — get back a structured pixel asset project with sprites, tiles, items, UI, effects, backgrounds, animation frames, sprite sheets, and export metadata.
我是一名对游戏独立开发感兴趣的大学生,这个项目的灵感来自 PPT-master。它尝试把“用结构化流程辅助创作”的思路迁移到 2D 游戏像素素材生成中,让独立开发者可以更快整理美术方向、生成素材,并保留可复用的项目规范。
Project Example
下面是一个水墨工笔像素风项目示例,包含两种树与竹子的动画展示。
| Asset | Preview | Frames |
|---|---|---|
| Cherry Blossom Tree | 6-frame sprite sheet | |
| Willow Tree | 6-frame sprite sheet | |
| Bamboo | 4-frame sprite sheet |
How it works — Pixel Asset Master is a workflow skill for AI IDEs. You chat with an AI agent, confirm the style constraints, and the skill guides the agent through project setup, asset planning, generation, validation, and export.
Local-first workflow — Project files and generated assets are stored locally under
projects/. API usage only depends on whatever AI tool or image provider you choose to connect.
Pixel Asset Master focuses on:
- Game-ready structure — assets are grouped by
characters,tiles,items,ui,effects, andbackgrounds. - Strict visual contract —
spec_lock.mdrecords canvas size, palette, style, color budget, and forbidden rendering patterns. - Reusable templates — built-in palettes, size presets, and sprite layout references.
- Validation tools — scripts help check palette compliance, color budget, image format, and sprite sheet export.
- Agent-friendly process — staged confirmations reduce vague prompts and keep long asset runs consistent.
Quick Start
1. Prerequisites
| Dependency | Required? | What it does |
|---|---|---|
| Python 3.8+ | ✅ Yes | Runs the helper scripts |
| Pillow | ✅ Yes | Image analysis, validation, quantization, and sprite sheet packing |
Install the CLI tool with uv:
uv tool install .
This installs the pam (and pixel-asset-master) command globally. If you prefer to run without installing, use uv run pam ... from the repository root.
2. Set Up
Option A — Download ZIP: download the repository ZIP from GitHub and unzip it.
Option B — Git clone:
git clone <your-repository-url>
cd pixel-asset-master-skills
uv tool install .
3. Put It Into Your AI Coding IDE
After downloading or unzipping the repository, open the entire pixel-asset-master-skills/ folder as a workspace in your AI coding IDE.
| IDE | How to use |
|---|---|
| Cursor | File → Open Folder... and select pixel-asset-master-skills/. Ask the chat agent to read skills/pixel-asset-master/SKILL.md. |
| Trae | Open the folder as a project/workspace. Then mention skills/pixel-asset-master/SKILL.md in chat before asking for assets. |
| Windsurf | Open the folder in Windsurf. Use Cascade chat and reference skills/pixel-asset-master/SKILL.md when starting a pixel asset task. |
| Other AI coding IDEs | Open the repository root as the workspace and point the agent to skills/pixel-asset-master/SKILL.md. |
Recommended first prompt:
Read skills/pixel-asset-master/SKILL.md and help me create a pixel art asset project.
4. Create a Pixel Asset Project
pam init demo --size 32x32 --palette DB32
The generated project is saved under projects/ and is ignored by Git by default.
5. Choose Your Generation Mode
Mode A — Without Reference Images
Use this when you only have a text idea, game design brief, or art direction.
Example prompt:
Read skills/pixel-asset-master/SKILL.md.
Create a 64x64 4-direction RPG character sprite sheet.
Style: ink-wash gongbi pixel art.
Actions: idle and walk.
No reference image.
The agent should:
- Confirm style, size, palette, facing direction, action list, and frame count.
- Create or update
projects/<project_name>/design_spec.md. - Create or update
projects/<project_name>/spec_lock.md. - Generate PNG assets, animation frames, sprite sheets, and manifests.
Mode B — With Reference Images
Use this when you already have character art, tiles, UI mockups, moodboards, or screenshots that should guide the generated pixel art.
First, import reference images:
pam import-sources projects/demo_32x32_YYYYMMDD path/to/reference.png
Then prompt the AI agent:
Read skills/pixel-asset-master/SKILL.md.
Use the images under projects/demo_32x32_YYYYMMDD/images/ as visual references.
Generate matching pixel art assets and keep the same silhouette, palette mood, and style constraints.
The agent should analyze the reference images, derive style and palette constraints, then continue through the same spec lock, generation, validation, and export pipeline.
6. Validate and Export
pam validate-project projects/demo_32x32_YYYYMMDD
pam validate-assets projects/demo_32x32_YYYYMMDD
pam finalize projects/demo_32x32_YYYYMMDD --all
pam sheet projects/demo_32x32_YYYYMMDD --by-category
AI lost context? Ask it to read
skills/pixel-asset-master/SKILL.md.
Repository Layout
.
├── pyproject.toml
├── uv.lock
├── src/
│ └── pixel_asset_master/ # Installable Python package / CLI
├── skills/
│ └── pixel-asset-master/
│ ├── SKILL.md
│ ├── references/
│ ├── scripts/
│ │ └── README.md # CLI command reference
│ ├── templates/
│ └── workflows/
└── projects/ # Generated asset projects (ignored by Git)
Documentation
| Document | Description | |
|---|---|---|
| 📖 | SKILL.md | Core workflow and execution rules |
| 🛠️ | CLI Reference | pam command usage and examples |
| 🏗️ | Project Structure | Repository structure and generated-content boundaries |
| 🤝 | Contributing | Contribution scope and workflow |
| 🔐 | Security | Vulnerability reporting and scope |
What Should Not Be Committed
- Generated projects:
projects/ - Export packages:
exports/,*.zip,*.tar.gz - Secrets:
.env, real API keys, tokens, private account data
Contributing
See CONTRIBUTING.md for how to get involved.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pixel_asset_master-0.2.0.tar.gz.
File metadata
- Download URL: pixel_asset_master-0.2.0.tar.gz
- Upload date:
- Size: 45.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5863dca1be20e98038670b8150ed1f62159599058dfa53206e610c3f0e46fa38
|
|
| MD5 |
d6bb42c056cec97a39ab5ba2f00d2269
|
|
| BLAKE2b-256 |
adea9519a8f46df02223df637c73dc12b203902cb4bf04fece3a47b3e7e7775d
|
File details
Details for the file pixel_asset_master-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pixel_asset_master-0.2.0-py3-none-any.whl
- Upload date:
- Size: 54.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
451f8878fd8f59e862f208147a6635d07c6bd3be686d6c442b1ea498ab248219
|
|
| MD5 |
a9179a1f2e8dab312cd4e82369a25dbe
|
|
| BLAKE2b-256 |
86a96e55d063d435d436d72aa0096d00f1ce751f8c00f535132e601c7e4fed10
|