Skip to content

godothub/godot-minigame / skills

godot-wechat-minigame-adapter

Unverified

Apply the bundled self-contained Godot WeChat Mini Game adapter kit to an official Godot checkout. Use when the user wants to port official Godot to WeChat Mini Game, refresh a nearby 4.6-based port, or inspect the shipped patch/source bundle for WXMEMFS, `wx.request`, audio cleanup, display/input, WXGLX dual-path rendering, `.wasm.br`, and `wx.exitMiniProgram`. This skill is version-locked to the bundled upstream base and must not be described as a generic “Godot 4.x” patch dump.

FileKindSize
SKILL.mdskill md6.0 KB
agents/openai.yamlconfig269 B
assets/min-runtime/godot-loader.jsscript16.6 KB
assets/min-runtime/godot-sdk.jsscript7.8 KB
patches/fixes/4.7-webgl-context/001-context-swap-control.patchother4.2 KB
patches/fixes/4.7-webgl-context/README.mdmarkdown1.5 KB
patches/godot-4.6.2-rc-a16e481cf4/core/001-build-and-runtime-glue.patchother12.4 KB
patches/godot-4.6.2-rc-a16e481cf4/core/002-native-audio-routing.patchother6.3 KB
patches/godot-4.6.2-rc-a16e481cf4/core/003-wxglx-nine-patch-expansion.patchother5.7 KB
patches/godot-4.6.2-rc-a16e481cf4/core/004-wxglx-nine-patch-runtime-scope.patchother7.2 KB
patches/godot-4.6.2-rc-a16e481cf4/core/series.txtmarkdown142 B
patches/godot-4.6.2-rc-a16e481cf4/manifest.jsonconfig993 B
patches/godot-4.6.2-rc-a16e481cf4/optional/001-audio-worker.patchother820 B
patches/godot-4.6.2-rc-a16e481cf4/optional/series.txtmarkdown23 B
references/compatibility-matrix.mdmarkdown1.2 KB
references/migration-modules.mdmarkdown5.8 KB
references/recent-commit-deltas.mdmarkdown2.2 KB
references/runtime-shell.mdmarkdown3.8 KB
references/validation-checklist.mdmarkdown3.4 KB
references/wxglx-adaptation.mdmarkdown8.8 KB
scripts/apply_godot_patchset.pyscript5.6 KB
scripts/compress_wasm.batscript100 B
scripts/compress_wasm.shscript91 B
scripts/godot_process.jsscript5.3 KB
scripts/install_min_runtime.pyscript1.1 KB
scripts/validate_template_runtime.jsscript2.8 KB
sources/godot-4.6.2-rc-a16e481cf4/compress_wasm.batscript237 B
sources/godot-4.6.2-rc-a16e481cf4/compress_wasm.shscript215 B
sources/godot-4.6.2-rc-a16e481cf4/godot_process.jsscript5.3 KB
sources/godot-4.6.2-rc-a16e481cf4/optional/platform/web/js/libs/audio.worker.jsscript6.6 KB
sources/godot-4.6.2-rc-a16e481cf4/optional/platform/web/js/libs/lib.wx.api.d.tsscript516.7 KB
sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_blob.jsscript27.1 KB
sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_godot_audio.jsscript88.8 KB
sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_godot_crypto.jsscript116 B
sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_godot_display.jsscript26.4 KB
sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_godot_fetch.jsscript8.9 KB
sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_godot_fs.jsscript29.4 KB
sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_godot_input.jsscript23.2 KB
tests/test_godot_process_commit_frame.jsscript2.6 KB
tests/test_min_runtime_loader.jsscript3.8 KB
tests/test_template_glx_config.jsscript1.3 KB
tests/test_wechat_audio_context_source_reuse.jsscript3.9 KB
tests/test_wxglx_nine_patch_patch.jsscript2.2 KB

references/migration-modules.md

View on GitHub
# Migration Modules

Use this file to understand what the public package actually ships. This is no longer a private-donor migration memo. It is the contract for the open-source bundle.

## Table Of Contents

1. Module order
2. Public package map
3. Core bundle
4. Optional bundle
5. Excluded donor features
6. Validation intent

## 1. Module Order

Always work in this order:

1. Verify upstream base
2. Apply core public bundle
3. Add optional modules only if the target really uses them
4. Vendor the runtime shell into the downstream minigame host
5. Build and validate

## 2. Public Package Map

| Module | Shipped as | Target files | Required | Why it exists |
| --- | --- | --- | --- | --- |
| Core build and runtime glue | `patches/.../core/001-build-and-runtime-glue.patch` | `modules/raycast/SCsub`, `platform/web/SCsub`, `platform/web/detect.py`, `platform/web/javascript_bridge_singleton.cpp`, `platform/web/js/engine/{config.js,engine.js,features.js,preloader.js}`, `platform/web/js/libs/{library_godot_javascript_singleton.js,library_godot_os.js}` | Yes | Aligns official Godot with WeChat runtime assumptions and bundled source files |
| File system and persistence | `sources/.../platform/web/js/libs/library_godot_fs.js` plus `godot_process.js` | `platform/web/js/libs/library_godot_fs.js`, repo-root `godot_process.js` | Yes | Ships the public readable WXMEMFS implementation under the actual filename loaded by `platform/web/SCsub` so `user://` works without donor access |
| HTTP and download pipeline | `sources/.../platform/web/js/libs/library_godot_fetch.js` plus engine patch | `platform/web/js/libs/library_godot_fetch.js`, `platform/web/js/engine/{engine.js,preloader.js,config.js}` | Yes | Replaces browser fetch assumptions with WeChat-compatible loading and chunk handling |
| Audio runtime | `sources/.../platform/web/js/libs/library_godot_audio.js` plus `patches/.../core/002-native-audio-routing.patch` | `platform/web/audio_driver_web.cpp`, `platform/web/godot_audio.h`, `platform/web/js/libs/library_godot_audio.js` | Yes | Keeps short samples on WebAudio and routes long audio to `InnerAudioContext` through either an 8 MiB bounded cache or package manifest |
| Display and input | `sources/.../platform/web/js/libs/{library_godot_display.js,library_godot_input.js}` | `platform/web/js/libs/library_godot_display.js`, `platform/web/js/libs/library_godot_input.js` | Yes | Fixes DPI, window sizing, and keyboard bridge behavior |
| Runtime shell | `assets/min-runtime/*` and `scripts/install_min_runtime.py` | downstream host project files `godot-sdk.js`, `godot-loader.js` | Yes for host runtime | Removes dependency on the old machine-local `godot-minigame-sdk` |
| Packaging helpers | `sources/.../{compress_wasm.bat,compress_wasm.sh,godot_process.js}` | repo-root helper scripts | Yes | Post-processes generated `godot.js` and produces `.wasm.br` |
| Blob/Crypto helpers | `sources/.../platform/web/js/libs/{library_blob.js,library_godot_crypto.js}` | `platform/web/js/libs/library_blob.js`, `platform/web/js/libs/library_godot_crypto.js` | Yes | Supplies browser-missing APIs the WeChat runtime path depends on |

For the file-system layer, the public bundle now ships a single public file:

- `library_godot_fs.js`

Its contents are the readable WXMEMFS implementation used by the public package.

## 3. Core Bundle

### Core patch series

- `patches/godot-4.6.2-rc-a16e481cf4/core/series.txt`
- `patches/godot-4.6.2-rc-a16e481cf4/core/001-build-and-runtime-glue.patch`
- `patches/godot-4.6.2-rc-a16e481cf4/core/002-native-audio-routing.patch`

### Core source root

- `sources/godot-4.6.2-rc-a16e481cf4/`

### What the core bundle changes

- switches WebAssembly loading to `.wasm.br`
- defaults `wasm_simd` to off and gates `-msimd128`
- disables `WASM_BIGINT`
- routes file loading through `fsUtils.localFetch`
- uses `wx.exitMiniProgram()` on exit
- exposes WeChat feature checks in `library_godot_os.js`
- disables `JavaScriptBridge::eval(...)` in WeChat
- preloads the public blob/crypto/fs files before normal web libraries
- routes long WeChat audio through native playback with content-addressed cache limits

### Search anchors

```powershell
rg -n "WXMEMFS|fsUtils.localFetch|wx.exitMiniProgram|wasm\\.br|wasm_simd|WASM_BIGINT|wechat|minigame|wxgame" platform/web modules
```

## 4. Optional Bundle

These do not ship in the core path because they are not required for the default public bundle to work.

### `audio-worker`

- sources:
  - `sources/godot-4.6.2-rc-a16e481cf4/optional/platform/web/js/libs/audio.worker.js`
- patches:
  - `patches/godot-4.6.2-rc-a16e481cf4/optional/001-audio-worker.patch`
- use it only when the target runtime still packages or references `audio.worker.js`

### `dev-types`

- sources:
  - `sources/godot-4.6.2-rc-a16e481cf4/optional/platform/web/js/libs/lib.wx.api.d.ts`
- no patch
- use it when editor tooling or local type-checking needs WeChat API declarations

## 5. Excluded Donor Features

These were intentionally not bundled into the default open-source path:

- branding-only changes such as `version.py`
- donor-local docs and internal notes
- test assets such as `platform/web/js/tests/audio-unity.js`
- stale historical runtime routes such as `library_godot_wx_audio.js` as the primary audio entry

If a future public package needs one of these, ship it as a separate optional module instead of silently depending on donor history.

## 6. Validation Intent

The public package is considered healthy only when all of these are true:

- the exact-base apply works on the supported upstream commit
- a downstream host can vendor `godot-sdk.js` and `godot-loader.js` without the old external SDK
- `user://` persistence works through WXMEMFS
- large downloads are byte-correct
- repeated play/stop/replay audio is stable
- high-DPI sizing and keyboard input behave correctly
- exit uses `wx.exitMiniProgram()`
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall