pygame-patterns
Pygame Patterns
Purpose
Build, refactor, debug, and review pygame projects using idiomatic Python and pygame-specific practices. Use this skill with refactor-python when cleaning up pygame code.
Optimize for a stable main loop, explicit input/update/draw boundaries, predictable timing, cached assets, testable core logic, and architecture that fits the game's actual size.
First Inspection Checklist
Before editing, inspect:
- Python tooling:
pyproject.toml,uv.lock,.python-version, test config, run scripts, package layout, and supported Python versions. - Which package is installed:
pygameorpygame-ce. They both import aspygame; choose one and do not mix them. - Entry point and initialization: where
pygame.init(), mixer/display setup,display.set_mode(), and the main loop happen. - Main loop order: event pumping, input handling, update timing, drawing,
display.flip()/update(), andClock.tick(). - Asset paths/loading for images, sounds, fonts, maps, and data.
- Scene/state model for menus, gameplay, pause, settings, and game-over flows.
- Sprite/entity organization, collision code, coordinate system, and camera/viewport logic.
More from jwd83/skills
system-verilog-expert
Expert SystemVerilog guidance for RTL, interfaces, and verification-adjacent code with EDA-friendly design patterns. Use when designing, reviewing, or refactoring hardware-oriented SystemVerilog and when spotting HDL antipatterns that cause timing, lint, CDC, or tool-flow pain.
14simplify
Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
11grill-me
Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
10wiki-me
Build or extend a project wiki — a persistent, interlinked markdown knowledge base that the LLM incrementally maintains from your sources. Use when the user wants to start a wiki, add new sources, or synthesize notes into a living knowledge base rather than one-off RAG.
10godot-gdscript-patterns
Master Godot 4 GDScript patterns including signals, scenes, state machines, and optimization. Use when building Godot games, implementing game systems, or learning GDScript best practices.
10next-step
Resume an in-progress codebase from its actual current state, identify the next smallest defensible implementation step, make that change, and update tests, docs, or plans to match. Use when a rewrite, migration, refactor, feature, or cleanup is underway and you want the agent to move the work forward safely without inventing a whole new roadmap.
7