Agent skill

Pyxel Patterns

by vibeeval in vibeeval/vibecosystem

Pyxel retro game engine patterns - pixel art, game loops, sprite/tilemap, MML audio, resource management, and web deployment

MITAuto-check passedGame Development

Install Pyxel Patterns

skills CLI
$ npx skills add vibeeval/vibecosystem --skill pyxel-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vibeeval/vibecosystem pyxel-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vibeeval/vibecosystem.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pyxel-patterns .claude/skills/pyxel-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pyxel-patterns
GitHub stars
531
Token cost
~1.8k tokens
SKILL.md length
183 words
Files
1
Skills in repo
144
Repo updated
First seen
Licence
MIT

At a glance

Pyxel retro game engine patterns - pixel art, game loops, sprite/tilemap, MML audio, resource management, and web deployment

  • Tasks that involve Sprites and pixel art
  • SKILL.md covers When to Use, Retro Constraints, Game Loop Pattern and Input Handling, plus 9 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Game design

What it does

Pyxel Patterns is an agent skill from vibeeval/vibecosystem. Pyxel retro game engine patterns - pixel art, game loops, sprite/tilemap, MML audio, resource management, and web deployment

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Game Development, covering Sprites and pixel art, Game design and Game development. It works with Python. The repository describes itself as: AI software team for Claude Code - 138 agents, 295 skills, 73 hooks. Self-learning, multi-agent swarm, autonomous skill evolution. The licence is MIT.

When your agent uses it

  • Tasks that involve Sprites and pixel art
  • Tasks that involve Game design
  • Tasks that involve Game development

Example prompts

  • “/pyxel-patterns”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 3b763b1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pyxel Patterns loads about 1.8k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 183 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vibeeval/vibecosystem at commit 3b763b1, republished under its MIT licence (© vibeeval). 183 words, ~1,841 tokens.

Download SKILL.mdSave it as .claude/skills/pyxel-patterns/SKILL.md (or your agent's skills folder).
name
pyxel-patterns
description
Pyxel retro game engine patterns - pixel art, game loops, sprite/tilemap, MML audio, resource management, and web deployment

Pyxel Patterns

Patterns and best practices for building retro-style games with Pyxel — a Python game engine with deliberate retro constraints.

When to Use

  • Building retro/pixel art games with Python
  • Prototyping game mechanics quickly
  • Creating browser-playable games (WASM export)
  • Teaching game development fundamentals

Retro Constraints

Pyxel enforces retro limitations by design:

ConstraintLimit
Colors16-color palette (customizable)
ScreenDefault 256x256 (configurable)
Image banks3 banks (0-2), 256x256 each
Tilemaps8 maps, 256x256 tiles each
Sound channels4 simultaneous
Sound/Music64 user-definable sounds, 8 musics
InputKeyboard + Mouse + Gamepad (up to 2)

These constraints are features, not bugs. They force creative solutions and authentic retro aesthetics.

Game Loop Pattern

python
import pyxel

class App:
    def __init__(self):
        pyxel.init(160, 120, title="My Game")
        # Load resources
        pyxel.load("assets.pyxres")
        # Initialize game state
        self.player_x = 72
        self.player_y = 56
        self.score = 0
        # Start game loop
        pyxel.run(self.update, self.draw)

    def update(self):
        """Called every frame - handle input and game logic"""
        if pyxel.btnp(pyxel.KEY_Q):
            pyxel.quit()

        # Movement
        if pyxel.btn(pyxel.KEY_LEFT):
            self.player_x = max(self.player_x - 2, 0)
        if pyxel.btn(pyxel.KEY_RIGHT):
            self.player_x = min(self.player_x + 2, pyxel.width - 16)

    def draw(self):
        """Called every frame - render everything"""
        pyxel.cls(0)  # Clear screen (color 0)
        pyxel.blt(self.player_x, self.player_y, 0, 0, 0, 16, 16, 0)
        pyxel.text(5, 4, f"SCORE: {self.score}", 7)

App()

Input Handling

python
# Button states
pyxel.btn(key)      # True while held
pyxel.btnp(key)     # True on press (with optional repeat)
pyxel.btnr(key)     # True on release
pyxel.btnv(key)     # Analog value (gamepad)

# Mouse
pyxel.mouse_x       # Current X position
pyxel.mouse_y       # Current Y position
pyxel.btnp(pyxel.MOUSE_BUTTON_LEFT)

# Common pattern: 8-directional movement
dx = pyxel.btn(pyxel.KEY_RIGHT) - pyxel.btn(pyxel.KEY_LEFT)
dy = pyxel.btn(pyxel.KEY_DOWN) - pyxel.btn(pyxel.KEY_UP)

Drawing API

python
# Primitives
pyxel.cls(col)                    # Clear screen
pyxel.pset(x, y, col)            # Pixel
pyxel.line(x1, y1, x2, y2, col)  # Line
pyxel.rect(x, y, w, h, col)      # Filled rectangle
pyxel.rectb(x, y, w, h, col)     # Rectangle border
pyxel.circ(x, y, r, col)         # Filled circle
pyxel.circb(x, y, r, col)        # Circle border

# Sprites (from image bank)
pyxel.blt(x, y, img, u, v, w, h, colkey)
# img: image bank (0-2)
# u, v: source position in bank
# w, h: size (negative = flip)
# colkey: transparent color

# Tilemap
pyxel.bltm(x, y, tm, u, v, w, h, colkey)

# Text
pyxel.text(x, y, string, col)

Sprite Animation

python
class AnimatedSprite:
    def __init__(self, frames, speed=5):
        self.frames = frames  # [(u, v, w, h), ...]
        self.speed = speed
        self.frame_index = 0
        self.counter = 0

    def update(self):
        self.counter += 1
        if self.counter >= self.speed:
            self.counter = 0
            self.frame_index = (self.frame_index + 1) % len(self.frames)

    def draw(self, x, y, img=0, colkey=0):
        u, v, w, h = self.frames[self.frame_index]
        pyxel.blt(x, y, img, u, v, w, h, colkey)

Collision Detection

python
def aabb_collision(x1, y1, w1, h1, x2, y2, w2, h2):
    """Axis-aligned bounding box collision"""
    return (x1 < x2 + w2 and x1 + w1 > x2 and
            y1 < y2 + h2 and y1 + h1 > y2)

def point_in_rect(px, py, rx, ry, rw, rh):
    """Point inside rectangle"""
    return rx <= px < rx + rw and ry <= py < ry + rh

Sound & Music (MML)

python
# Define sounds using MML (Music Macro Language)
pyxel.sounds[0].set(
    "e2e2c2g1 g1g1c2e2 d2d2d2g2 e2e2e2c2",  # notes
    "p",                                         # tones: t(riangle) s(quare) p(ulse) n(oise)
    "6",                                         # volumes (0-7)
    "nnnf",                                      # effects: n(one) s(lide) v(ibrato) f(adeout)
    25                                           # speed
)

# Play sound
pyxel.play(ch, snd)     # ch: channel (0-3), snd: sound index
pyxel.playm(msc)        # Play music (0-7)
pyxel.stop(ch)          # Stop channel (-1 for all)

Resource Management

python
# Create resources with Pyxel Editor
# Terminal: pyxel edit assets.pyxres

# Load in code
pyxel.load("assets.pyxres")

# Or create programmatically
pyxel.images[0].load(0, 0, "sprite_sheet.png")

# Resource file contains:
# - Image banks (sprites, backgrounds)
# - Tilemaps (level layouts)
# - Sounds (SFX)
# - Music (BGM)

Scene Management

python
class SceneManager:
    def __init__(self):
        self.scenes = {}
        self.current = None

    def add(self, name, scene):
        self.scenes[name] = scene

    def switch(self, name):
        self.current = self.scenes[name]
        if hasattr(self.current, 'enter'):
            self.current.enter()

    def update(self):
        if self.current:
            self.current.update()

    def draw(self):
        if self.current:
            self.current.draw()

# Usage
class TitleScene:
    def update(self):
        if pyxel.btnp(pyxel.KEY_RETURN):
            scene_mgr.switch("game")

    def draw(self):
        pyxel.cls(0)
        pyxel.text(50, 50, "PRESS ENTER", pyxel.frame_count % 16)

Packaging & Distribution

bash
# Package as standalone executable
pyxel package APP_DIR STARTUP_SCRIPT

# Convert to executable
pyxel app2exe APP.pyxapp

# Convert to HTML (browser-playable via WASM)
pyxel app2html APP.pyxapp

# The HTML output uses Pyodide/Emscripten WASM
# Works in modern browsers without Python installed

Performance Tips

  • Keep update() and draw() fast (target 30fps default)
  • Use tilemaps for static backgrounds instead of drawing each tile
  • Pool objects (bullets, particles) instead of creating/destroying
  • Minimize Python object creation in the game loop
  • Use pyxel.frame_count for timing instead of tracking your own counter
  • Pre-calculate values that don't change per frame

Common Game Patterns

Particle System
python
class Particle:
    __slots__ = ['x', 'y', 'vx', 'vy', 'life', 'col']

    def __init__(self, x, y):
        self.x = x
        self.y = y
        self.vx = pyxel.rndf(-1, 1)
        self.vy = pyxel.rndf(-2, 0)
        self.life = pyxel.rndi(10, 30)
        self.col = pyxel.rndi(8, 10)

particles = []
# In update: spawn, move, remove dead
# In draw: pyxel.pset(p.x, p.y, p.col)
Camera Scrolling
python
class Camera:
    def __init__(self):
        self.x = 0
        self.y = 0

    def follow(self, target_x, target_y):
        self.x = target_x - pyxel.width // 2
        self.y = target_y - pyxel.height // 2

# In draw: offset all positions by -camera.x, -camera.y

© vibeeval, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/pyxel-patterns of vibeeval/vibecosystem.

Open the folder on GitHubat commit 3b763b1

Compare with similar skills

Pyxel Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pyxel Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pyxel Patterns this skillvibeeval/vibecosystem531—~1.8kAutomated safety check: PassMIT
Spine AnimationGenielabsOpenSource/spine-animation-ai512—~17kAutomated safety check: PassCC-BY-NC-4.0
Godot 3D World Buildingthedivergentai/GD-Agentic-Skills803—~3.3kAutomated safety check: PassLGPL-3.0
Game Enginegithub/awesome-copilot40k1 repos~1.6kAutomated safety check: PassMIT
Sprite Genaldegad/sprite-gen2.6k—~4.4kAutomated safety check: PassApache-2.0
Godot Gdscript Patterns925236118/AlphaAgent1039 repos~5kAutomated safety check: PassMIT

Similar skills

  • Spine Animation

    GenielabsOpenSource/spine-animation-ai

    Create Spine 2D skeletal animations from pre-existing character assets (separated body-part PNGs, atlas spritesheet, or a full character image).

    512 GitHub stars~17k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed
  • Godot 3D World Building

    thedivergentai/GD-Agentic-Skills

    Expert patterns for 3D level design using GridMap with MeshLibrary, CSG constructive solid geometry, occlusion, and runtime GridMap builders.

    803 GitHub stars~3.3k tokensUpdated 28 days ago
    Game DevelopmentAuto-check passed
  • Game Engine

    github/awesome-copilot

    Official

    Expert skill for building web-based game engines and games using HTML5, Canvas, WebGL, and JavaScript.

    40k GitHub starsUsed in 1 repo~1.6k tokens
    Game DevelopmentAuto-check passed
  • Sprite Gen

    aldegad/sprite-gen

    Generates images and game sprites through GPT or Grok with guided provider choices, separate saved defaults, automatic cleanup and optional curation.

    2.6k GitHub stars~4.4k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • Godot Gdscript Patterns

    925236118/AlphaAgent

    Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization.

    103 GitHub starsUsed in 9 repos~5k tokens
    Game DevelopmentAuto-check passed
  • 2D Map and Scene Generator

    0x0funky/agent-sprite-forge

    Plans and builds 2D game maps and scenes, from tilemaps and parallax backgrounds to HD-2D plates, with collision checks, a playable HTML preview and Tiled, Godot or LDtk export.

    4.3k GitHub stars~2.9k tokensUpdated yesterday
    Game DevelopmentAuto-check passed

More from vibeeval/vibecosystem

All 144 skills in this repo
  • Agent Benchmark

    vibeeval/vibecosystem

    Framework for measuring and tracking agent response quality over time.

    531 GitHub stars~2.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Differential Review

    vibeeval/vibecosystem

    Security-focused differential code review with blast radius analysis, risk-adaptive depth (DEEP/FOCUSED/SURGICAL), git history correlation, and structured finding format.

    531 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • Factcheck Guard

    vibeeval/vibecosystem

    A skill your agent uses when making any factual claim about the codebase — existence, absence, or behavior.

    531 GitHub stars~2.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Fp Check

    vibeeval/vibecosystem

    Systematic false positive verification for security findings.

    531 GitHub stars~1.6k tokensUpdated 2 mo ago
    Auto-check passed
  • N8n Workflows

    vibeeval/vibecosystem

    n8n otomasyon workflow'lari. An agent skill from vibeeval/vibecosystem.

    531 GitHub stars~3.3k tokensUpdated 2 mo ago
    Auto-check passed
  • Notepad System

    vibeeval/vibecosystem

    A skill your agent uses when context compression is imminent, when resuming a session, or when preserving critical decisions across long tasks.

    531 GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Questions about Pyxel Patterns

What does Pyxel Patterns do?

Pyxel retro game engine patterns - pixel art, game loops, sprite/tilemap, MML audio, resource management, and web deployment. Pyxel Patterns is an agent skill from vibeeval/vibecosystem.

When should I use Pyxel Patterns?

Pyxel Patterns fits situations like: tasks that involve Sprites and pixel art; tasks that involve Game design; tasks that involve Game development.

How do I install Pyxel Patterns in Claude Code?

Run `npx skills add vibeeval/vibecosystem --skill pyxel-patterns -a claude-code`. Or copy the skill folder (skills/pyxel-patterns in vibeeval/vibecosystem) into .claude/skills/pyxel-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Pyxel Patterns in Codex?

Run `npx skills add vibeeval/vibecosystem --skill pyxel-patterns -a codex`. Or copy the skill folder (skills/pyxel-patterns in vibeeval/vibecosystem) into .agents/skills/pyxel-patterns in your project. Codex loads it when a task matches its description.

Can I use Pyxel Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vibeeval/vibecosystem --skill pyxel-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pyxel-patterns, .gemini/skills/pyxel-patterns, .github/skills/pyxel-patterns and .opencode/skills/pyxel-patterns in your project.

What does Pyxel Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Pyxel Patterns is instructions for the agent only. Our summary lists: Python 3.

Does Pyxel Patterns access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Pyxel Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pyxel Patterns use?

Pyxel Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pyxel Patterns use?

About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pyxel Patterns?

Skills that share tags, products or a category with Pyxel Patterns: Spine Animation (GenielabsOpenSource/spine-animation-ai, 512 stars), Godot 3D World Building (thedivergentai/GD-Agentic-Skills, 803 stars), Game Engine (github/awesome-copilot, 40k stars) and Sprite Gen (aldegad/sprite-gen, 2.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pyxel Patterns?

vibeeval (a GitHub user) maintains it in vibeeval/vibecosystem, which has 531 GitHub stars. The repository holds 144 skills in this directory. The repository was last updated on August 8, 2026.

Source: vibeeval/vibecosystem on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.