/godot-agent-skills:godot-mobile-webfrom godot-agent-skills
Configures Godot 4.7 games for mobile (Android, iOS) and web: renderer selection, safe areas, orientation, touch input, virtual keyboard, app lifecycle, battery limits, haptics, permissions, plugins, in-app purchases, web threading, COOP/COEP hosting, and export checking.
Ships in godot-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Exporting, signing and store builds are in godot-export-ci; touch controls and VirtualJoystick in godot-input; UI layout in godot-ui. This skill covers making the game behave on phones and browsers.
Test a web build: python scripts/serve_web.py build/web --check (threads, sizes, hosting warnings), then python scripts/serve_web.py build/web serves it with COOP/COEP headers and prints the URL. Run it in the background; a browser must open it (headless Godot can't render).
| Target | Renderer |
|---|---|
| Web (any) | Compatibility (forced: rendering_method.web = gl_compatibility) |
| Low-end and old Android, widest reach | Compatibility |
| Modern phones/tablets with Vulkan/Metal, 3D | Mobile (rendering_method.mobile override; desktop can stay Forward+) |
Check what you use against the renderer: no SDFGI, volumetric fog or SSR on Mobile/Compatibility (godot-3d-rendering). Import textures with ETC2/ASTC (rendering/textures/vram_compression/import_etc2_astc = true) for mobile. |
canvas_items + aspect expand (the 4.7 default for new projects). Design for 16:9 and test 19.5:9 phones and 4:3 tablets. Anchor HUD to corners.display/window/handheld/orientation (landscape, portrait, sensor variants) or DisplayServer.screen_set_orientation() at runtime.DisplayServer.get_display_safe_area() (screen pixels; Android/iOS only) and get_display_cutouts(). Convert to viewport units and pad a MarginContainer that wraps the HUD. Backgrounds go edge to edge; buttons stay inside (reference has the script).DisplayServer.screen_get_scale() or the theme, not tiny fonts.display/window/energy_saving/keep_screen_on is true by default. Turn it off for menu-only apps.input_devices/pointing/emulate_mouse_from_touch (default true) makes Controls and InputEventMouseButton code work with taps. For gameplay use InputEventScreenTouch/InputEventScreenDrag with index (multi-touch). Pinch/pan: track two touches yourself (InputEventMagnifyGesture/PanGesture aren't sent on every platform).emulate_touch_from_mouse = true.LineEdit.virtual_keyboard_type (number, email, …) shows it automatically. Shift the UI by DisplayServer.virtual_keyboard_get_height() so it doesn't cover the field.| Event | Do |
|---|---|
NOTIFICATION_APPLICATION_PAUSED | save now (iOS kills the app after ~5 s), pause audio and the game |
NOTIFICATION_APPLICATION_RESUMED | show a pause menu; don't resume gameplay by itself |
NOTIFICATION_APPLICATION_FOCUS_OUT/_IN | pause on desktop/web tab switch too |
NOTIFICATION_WM_GO_BACK_REQUEST (Android back) | set get_tree().quit_on_go_back = false and close menus; quit only from the main menu |
Saves go to user:// (app-private storage on mobile, IndexedDB on Web). Write to a temp file, then rename (godot-architecture save patterns). |
Engine.max_fps = 60 (or 30 for casual games, with a settings toggle). Menus and puzzle games: application/run/low_processor_mode = true redraws only on change.rendering/scaling_3d/scale 0.6–0.8 on phones, baked lighting (LightmapGI) over real-time GI, few dynamic shadows, MultiMesh for crowds and grass.adb logcat -s godot.Input.vibrate_handheld(duration_ms, amplitude), which needs the Android permissions/vibrate export option. Gamepads: start_joy_vibration.OS.request_permission("android.permission.RECORD_AUDIO"). The result arrives on get_tree().on_request_permissions_result. iOS usage strings go in the export preset.OS.shell_open(url). Sensors: Input.get_accelerometer(), get_gyroscope(), get_gravity().EditorExportPlugin. They need a Gradle build (gradle_build/use_gradle_build). Access them with Engine.has_singleton("Name") → Engine.get_singleton("Name"). Always guard with has_singleton, so desktop builds don't crash.Store autoload with the same signals on every platform, and validate purchases on a server for anything valuable.godot-addons), and gate them behind consent (GDPR/ATT).variant/extensions_support.variant/thread_support = false (the default) works on any host, including itch.io and GitHub Pages, and on iOS Safari. true gives smoother audio and WorkerThreadPool but needs Cross-Origin-Opener-Policy: same-origin + Cross-Origin-Embedder-Policy: require-corp from the server (itch.io: tick "SharedArrayBuffer support"; GitHub Pages: enable the PWA and progressive_web_app/ensure_cross_origin_isolation_headers).audio/general/default_playback_type.web), which skips bus effects. Set playback_type = AudioServer.PLAYBACK_TYPE_STREAM on players that need effects..wasm is ~37 MB raw, ~8–10 MB with brotli/gzip (the host must compress). Keep the .pck small: compressed textures, Ogg audio, and lazy-load levels. A custom template with a build profile strips unused classes (godot-export-ci).OS.has_feature("web"), plus web_android/web_ios for mobile browsers (show touch controls).JavaScriptBridge.eval(), get_interface("localStorage"), create_callback() (keep a reference to the returned object), download_buffer() to give a save file to the user.Safe-area container, lifecycle/back button handler, touch pinch-zoom, store wrapper, web bridge and audio unlock (compiled by the tests): references/patterns.md
What SKILL.md sets; muted values are Claude Code's defaults
27 skills in this plugin
/godot-2d2D games in Godot 4.7 - pixel-art and HD setup, TileMapLayer (cells, terrains, custom data, runtime tiles, physics chunking), Parallax2D, Camera2D (limits, smoothing, shake), y-sort and z-index, 2D lights and normal maps, AnimatedSprite2D, one-way platforms, custom drawing, many-sprite performance. Use for platformers, top-down, tile-based or any 2D scene./godot-3d-gameplayBuilding 3D games in Godot 4.7 - third-person and orbit cameras (SpringArm3D), camera-relative movement, lock-on, top-down/RTS/isometric cameras, GridMap + MeshLibrary levels, CSG blockout and baking, modular kit import hints, Path3D rails, interactables, spawners, world-space UI, large worlds and LOD. Use for 3D player controllers, cameras or level building./godot-npx claudepluginhub el4cteo/godot-skills --plugin godot-agent-skillsOther plugins' skills for the same job