agentleFS
alvarlaignaalvarlaigna/agent-skills/skills/ebitengine/SKILL.md

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.

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
  1. Distinctive:

    Use this skill when the user asks about Ebitengine, Ebiten, Go game development, real-time 2D rendering, interactive simulations, visual …

    line 9
  2. Very specific:

    Keep the ebiten.Game implementation thin: Update collects input and advances state, Draw renders current state, and Layout returns logical …

    line 14
  3. Distinctive:

    Put game rules, simulation, scoring, AI, collision math, and save data in ordinary Go packages that can be tested without opening a window.

    line 15
  4. Distinctive:

    Prefer simple structs, slices, and interfaces first.

    line 16
  5. Very specific:

    Do not mutate game state in Draw.

    line 21
  6. Distinctive:

    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 …

    line 22
  7. Very specific:

    Use //go:embed for assets that must work in desktop, WebAssembly, mobile, or single-binary releases.

    line 23
  8. Very specific:

    Treat ebiten.Image as a GPU resource.

    line 24
  9. Very specific:

    Keep logical resolution separate from window size.

    line 28
  10. Distinctive:

    Use fixed-tick logic unless the project has a clear reason for variable timestep behavior.

    line 29
  11. Distinctive:

    Add tests around pure Go state transitions, collision rules, deterministic generation, save/load logic, and data parsers.

    line 30
  12. Distinctive:

    Prefer this package shape unless the existing repository has a stronger convention:

    line 41
  13. Distinctive:

    Read architecture patterns when creating a new project, refactoring structure, adding scenes, separating logic from rendering, introducing …

    line 54
  14. Distinctive:

    Read API cheat sheet when writing Ebitengine code for drawing, input, text, audio, assets, transforms, or common API calls.

    line 55
  15. Distinctive:

    Read ecosystem tooling before adding UI, scene, ECS, collision, map, animation, particles, debugging, or asset-pipeline dependencies.

    line 56
  16. Distinctive:

    Read deployment guide when building for desktop, WebAssembly, mobile, Steam, release packaging, or platform-specific smoke tests.

    line 57
  17. Distinctive:

    Use bundled scaffolding instead of regenerating project layout or wasm packaging from memory.

    line 61
  18. Distinctive:

    Do not read script source into context unless debugging the skill itself.

    line 71
  19. Distinctive:

    Before finalizing Ebitengine work, check:

    line 75

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Inspect the existing Go module, package layout, build tags, assets, and tests before proposing changes.
  2. Keep the ebiten.Game implementation thin: Update collects input and advances state, Draw renders current state, and Layout returns logical screen dimensions.
  3. Put game rules, simulation, scoring, AI, collision math, and save data in ordinary Go packages that can be tested without opening a window.
  4. 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.
  5. 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:embed for assets that must work in desktop, WebAssembly, mobile, or single-binary releases.
  • Treat ebiten.Image as a GPU resource. Avoid At, frequent ReplacePixels, 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 inpututil for 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 Layout for 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/v2

Prefer 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 functions

Reference 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.py when 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
  • 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.sh or scripts/build_wasm.ps1 for WebAssembly builds. This copies wasm_exec.js from the correct Go toolchain path (Go 1.24+ uses lib/wasm).
  • Run scripts/release.sh or scripts/release.ps1 for 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, and Layout responsibilities 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.