godothub/godot-minigame / skills
godot-wechat-minigame-adapter
UnverifiedApply 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.
tests/test_godot_process_commit_frame.js
View on GitHub"use strict";
const assert = require("assert");
const childProcess = require("child_process");
const fs = require("fs");
const os = require("os");
const path = require("path");
const vm = require("vm");
const SCRIPT_PATH = path.resolve(__dirname, "../scripts/godot_process.js");
const EMPTY_SHIM = "var _emscripten_webgl_commit_frame=function(){};";
const WRAPPER_MARKER = "var __godotMinigameOriginalCommitFrame=_emscripten_webgl_commit_frame;";
function processFixture(source, runs = 1) {
const root = fs.mkdtempSync(path.join(os.tmpdir(), "godot-minigame-commit-frame-"));
const outputPath = path.join(root, "bin", ".web_zip", "godot.js");
fs.mkdirSync(path.dirname(outputPath), { recursive: true });
fs.writeFileSync(outputPath, source);
try {
for (let i = 0; i < runs; i += 1) {
childProcess.execFileSync(process.execPath, [SCRIPT_PATH], { cwd: root, stdio: "pipe" });
}
return fs.readFileSync(outputPath, "utf8");
} finally {
fs.rmSync(root, { recursive: true, force: true });
}
}
const generatedGlue = [
"var calls=[];",
"var GL={currentContext:{GLctx:{flush:function(){calls.push('flush')},commit:function(){calls.push('commit')}}}};",
"var _emscripten_webgl_do_commit_frame=function(){calls.push('original');return 17};",
"var _emscripten_webgl_commit_frame=_emscripten_webgl_do_commit_frame;",
"var wasmImports={a:_emscripten_webgl_commit_frame};",
].join("");
const processed = processFixture(generatedGlue, 2);
assert(!processed.includes(EMPTY_SHIM), "must not replace Emscripten's commit implementation with a no-op");
assert.strictEqual(processed.split(WRAPPER_MARKER).length - 1, 1, "wrapper must be idempotent");
const context = {};
vm.createContext(context);
vm.runInContext(`${processed}result=wasmImports.a();`, context);
assert.strictEqual(context.result, 17);
assert.deepStrictEqual(Array.from(context.calls), ["original", "flush", "commit"]);
// Implicit swaps return INVALID_TARGET; WeChat still needs presentation.
const implicitGlue = generatedGlue.replace("return 17", "return -3");
const implicitContext = {};
vm.createContext(implicitContext);
vm.runInContext(`${processFixture(implicitGlue)}result=wasmImports.a();`, implicitContext);
assert.strictEqual(implicitContext.result, -3);
assert.deepStrictEqual(Array.from(implicitContext.calls), ["original", "flush", "commit"]);
const withoutCommitImport = processFixture("var existing=function(){};var wasmImports={a:existing};");
assert(!withoutCommitImport.includes("_emscripten_webgl_commit_frame"), "must not invent a missing frame import");
console.log("godot_process commit-frame tests passed");
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 472k | Updated | Claude CodeCodex | Verified | Install |
| 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: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |