ebitengine
Skill1 starsChanged 5 months agoMITView on GitHub
Develop, refactor, test, and ship Go projects using Ebitengine/Ebiten. Use for 2D games, game loops, sprites, tile maps, input, audio, UI, simulations, visualizers, tools, WebAssembly builds, mobile or desktop releases, and architecture decisions around Ebitengine.
In this repository6 other files it gives its agents.
- alvar-design-systemSkill
- estonian-grammarSkill
- raylibSkill
- unitySkill
- unreal-engineSkill
- skill-nameSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 14 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Use this skill when the user asks about Ebitengine, Ebiten, Go game development, real-time 2D rendering, interactive simulations, visual …
- Very specific: line 14
Keep the ebiten.Game implementation thin: Update collects input and advances state, Draw renders current state, and Layout returns logical …
- Distinctive: line 15
Put game rules, simulation, scoring, AI, collision math, and save data in ordinary Go packages that can be tested without opening a window.
- Distinctive: line 16
Prefer simple structs, slices, and interfaces first.
- Very specific: line 21
Do not mutate game state in Draw.
- Distinctive: line 22
Do not do file I/O, network I/O, image decoding, or audio decoding in the hot path unless the existing project already has a deliberate …
- Very specific: line 23
Use //go:embed for assets that must work in desktop, WebAssembly, mobile, or single-binary releases.
- Very specific: line 24
Treat ebiten.Image as a GPU resource.
- Very specific: line 28
Keep logical resolution separate from window size.
- Distinctive: line 29
Use fixed-tick logic unless the project has a clear reason for variable timestep behavior.
- Distinctive: line 30
Add tests around pure Go state transitions, collision rules, deterministic generation, save/load logic, and data parsers.
- Distinctive: line 41
Prefer this package shape unless the existing repository has a stronger convention:
- Distinctive: line 54
Read architecture patterns when creating a new project, refactoring structure, adding scenes, separating logic from rendering, introducing …
- Distinctive: line 55
Read API cheat sheet when writing Ebitengine code for drawing, input, text, audio, assets, transforms, or common API calls.
- Distinctive: line 56
Read ecosystem tooling before adding UI, scene, ECS, collision, map, animation, particles, debugging, or asset-pipeline dependencies.
- Distinctive: line 57
Read deployment guide when building for desktop, WebAssembly, mobile, Steam, release packaging, or platform-specific smoke tests.
- Distinctive: line 61
Use bundled scaffolding instead of regenerating project layout or wasm packaging from memory.
- Distinctive: line 71
Do not read script source into context unless debugging the skill itself.
- Distinctive: line 75
Before finalizing Ebitengine work, check:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ebitengine Development
Use this skill when the user asks about Ebitengine, Ebiten, Go game development, real-time 2D rendering, interactive simulations, visual tools, or cross-platform apps built on Ebitengine.
Default Workflow
- Inspect the existing Go module, package layout, build tags, assets, and tests before proposing changes.
- Keep the
ebiten.Gameimplementation thin:Updatecollects input and advances state,Drawrenders current state, andLayoutreturns logical screen dimensions. - Put game rules, simulation, scoring, AI, collision math, and save data in ordinary Go packages that can be tested without opening a window.
- Prefer simple structs, slices, and interfaces first. Add scene managers, ECS, physics libraries, or UI frameworks only when the project size or feature set justifies them.
- Validate with
go test ./.... For rendering, input, or deployment changes, also run the narrowest practical build or smoke test for the target platform.
Must-Follow Ebitengine Rules
- Do not mutate game state in
Draw. Rendering should be repeatable from the current state. - Do not do file I/O, network I/O, image decoding, or audio decoding in the hot path unless the existing project already has a deliberate async loading system.
- Use
//go:embedfor assets that must work in desktop, WebAssembly, mobile, or single-binary releases. - Treat
ebiten.Imageas a GPU resource. AvoidAt, frequentReplacePixels, and per-frame image creation in gameplay loops. - Group draw calls by source image, blend mode, filter, and render target when practical so Ebitengine can batch them.
- Map hardware input to semantic intent before applying gameplay logic. Prefer
inpututilfor just-pressed and just-released events. - Stream long music and keep short sound effects preloaded. Manage audio player lifetimes explicitly.
- Keep logical resolution separate from window size. Use
Layoutfor stable coordinates and scale intentionally. - Use fixed-tick logic unless the project has a clear reason for variable timestep behavior.
- Add tests around pure Go state transitions, collision rules, deterministic generation, save/load logic, and data parsers.
Project Setup Defaults
For a new project, use a Go module and Ebitengine v2:
go mod init example.com/my-game
go get github.com/hajimehoshi/ebiten/v2Prefer this package shape unless the existing repository has a stronger convention:
cmd/game/ # main package, window setup, RunGame
internal/app/ # ebiten.Game wrapper and scene orchestration
internal/game/ # pure gameplay state and rules
internal/input/ # hardware-to-intent mapping
internal/render/ # drawing helpers and asset-backed renderers
internal/assets/ # embed.FS and loading functionsReference Routing
- Read architecture patterns when creating a new project, refactoring structure, adding scenes, separating logic from rendering, introducing ECS, or designing tests.
- Read API cheat sheet when writing Ebitengine code for drawing, input, text, audio, assets, transforms, or common API calls.
- Read ecosystem tooling before adding UI, scene, ECS, collision, map, animation, particles, debugging, or asset-pipeline dependencies.
- Read deployment guide when building for desktop, WebAssembly, mobile, Steam, release packaging, or platform-specific smoke tests.
Templates and Scripts
Use bundled scaffolding instead of regenerating project layout or wasm packaging from memory.
- Run
scripts/new_project.pywhen creating a new Ebitengine project. Prefer this over hand-assembling packages.- Example:
python scripts/new_project.py --out ./my-game --name "My Game" --module example.com/my-game
- Example:
- Read files under
templates/when adding a missing package or matching the canonical layout (cmd/game,internal/app,internal/game,internal/assets,internal/input,internal/render). - Run
scripts/build_wasm.shorscripts/build_wasm.ps1for WebAssembly builds. This copieswasm_exec.jsfrom the correct Go toolchain path (Go 1.24+ useslib/wasm). - Run
scripts/release.shorscripts/release.ps1for multi-target desktop release builds.
On Windows, use the .ps1 scripts. On Linux and macOS, use the .sh scripts. Run scripts from the skill directory or pass the user's project path as the first argument.
Do not read script source into context unless debugging the skill itself; execute scripts and use their output.
Review Checklist
Before finalizing Ebitengine work, check:
Update,Draw, andLayoutresponsibilities are separated.- Hot paths avoid allocation, decoding, blocking I/O, and CPU/GPU synchronization.
- Asset loading returns useful errors and works from embedded files where portability matters.
- Input code supports the requested devices without leaking key names into gameplay rules.
- Tests cover pure logic and parsers; graphical behavior has at least a build or smoke-test path.
- New dependencies are justified by project complexity and documented in Go module files.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

