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.
scripts/validate_template_runtime.js
View on GitHub"use strict";
const fs = require("fs");
const path = require("path");
const REQUIRED_LOADER_ANCHORS = [
"getWindowInfo()",
"__godotMinigamePixelRatio",
"syncWindowDevicePixelRatio",
"drawCoverImage",
"normalizeProgress",
"this.gl.commit",
];
function validateTemplateRuntime(templateDir, mode = "webgl2") {
if (mode !== "webgl2" && mode !== "wxglx") {
throw new Error(`Unsupported runtime mode: ${mode}`);
}
const root = path.resolve(templateDir);
const loaderPath = path.join(root, "godot-loader.js");
const loader = fs.readFileSync(loaderPath, "utf8");
for (const anchor of REQUIRED_LOADER_ANCHORS) {
if (!loader.includes(anchor)) {
throw new Error(`${loaderPath} is stale: missing ${anchor}`);
}
}
if (loader.includes("this.dpr=window.devicePixelRatio||1")) {
throw new Error(`${loaderPath} still uses the legacy DPR path`);
}
const wxglxAnchors = [
"__GODOT_DISABLE_WXGLX",
"__godotMinigameWXGLXEnabled",
'"wxwebgl2"',
];
if (mode === "wxglx") {
for (const anchor of wxglxAnchors) {
if (!loader.includes(anchor)) {
throw new Error(`${loaderPath} is missing WXGLX selection: ${anchor}`);
}
}
} else if (loader.includes('"wxwebgl2"')) {
throw new Error(`${loaderPath} must not enable WXGLX`);
}
const enginePath = path.join(root, "engine", "godot.js");
const engine = fs.readFileSync(enginePath, "utf8");
if (/var\s+_emscripten_webgl_commit_frame\s*=\s*function\s*\(\s*\)\s*\{\s*\}\s*;/.test(engine)) {
throw new Error(`${enginePath} replaces Emscripten's frame commit with a no-op`);
}
if (
engine.includes("_emscripten_webgl_do_commit_frame") &&
!engine.includes("__godotMinigameOriginalCommitFrame")
) {
throw new Error(`${enginePath} does not wrap Emscripten's frame commit for WeChat presentation`);
}
const ratioStart = engine.indexOf("getPixelRatio:function()");
const ratioBlock = ratioStart >= 0 ? engine.slice(ratioStart, ratioStart + 700) : "";
if (!ratioBlock.includes("getWindowInfo")) {
throw new Error(`${enginePath} does not resolve DPR from WeChat window info`);
}
return { loaderPath, enginePath, mode };
}
if (require.main === module) {
const [, , templateDir, mode = "webgl2"] = process.argv;
if (!templateDir) {
console.error("Usage: node validate_template_runtime.js <template-dir> [webgl2|wxglx]");
process.exit(2);
}
try {
const result = validateTemplateRuntime(templateDir, mode);
console.log(`Validated ${result.mode} template runtime: ${path.resolve(templateDir)}`);
} catch (error) {
console.error(error.message);
process.exit(1);
}
}
module.exports = { validateTemplateRuntime };
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 |