speckit.game-embedded
Skill3 starsChanged 3 months agoMITView on GitHub
Embedded Game & WASM Bridge Specialist - Unity WebGL, Godot 4 Web/WASM, PlayCanvas, 2-Way JS Bridge, COOP/COEP Headers, Brotli Streaming, and Shell UI Integration.
In this repository65 other files it gives its agents.
- .agents/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/bro-skills.mdcCursor rule
- .agents/skills/llms.txtllms.txt
- brandkitSkill
- bro-mcp-loopSkill
- ci-security-scanning-with-strixSkill
- design-taste-frontendSkill
- fix-security-vulnerabilities-with-strixSkill
- full-output-enforcementSkill
- gpt-tasteSkill
- high-end-visual-designSkill
- imagegen-frontend-mobileSkill
- imagegen-frontend-webSkill
- image-to-codeSkill
- industrial-brutalist-uiSkill
- managed-pentesting-with-strixSkill
- minimalist-uiSkill
- penetration-testing-with-strixSkill
- ponytailSkill
- redesign-existing-projectsSkill
- speckit.ai-engineerSkill
- speckit.analyzeSkill
- speckit.architectureSkill
- speckit.backendSkill
- speckit.backlogSkill
- speckit.checkerSkill
- speckit.checklistSkill
- speckit.clarifySkill
- speckit.constitutionSkill
- speckit.contentSkill
- speckit.databaseSkill
- speckit.dddSkill
- speckit.debugSkill
- speckit.devopsSkill
- speckit.diffSkill
- speckit.event-realtimeSkill
- speckit.frontendSkill
- speckit.game-native-jsSkill
- speckit.geoSkill
- speckit.identity-accessSkill
- speckit.identitySkill
- speckit.implementSkill
- speckit.mapSkill
- speckit.migrateSkill
- speckit.payment-fintechSkill
- speckit.planSkill
- speckit.quizmeSkill
- speckit.reviewerSkill
- speckit.roadmapSkill
- speckit.securitySkill
- speckit.seoSkill
- speckit.specifySkill
- speckit.sre-observabilitySkill
- speckit.statusSkill
- speckit.tasksSkill
- speckit.taskstoissuesSkill
- speckit.testerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Read .agents/specs/[feature]/spec.md, plan.md, tasks.md, target engine export artifacts, bridge event schemas, and platform SDK …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
Mission
Architect, optimize, and integrate embedded game engines (Unity WebGL, Godot 4 HTML5/WASM, PlayCanvas, Defold, or Iframe sandboxes) into modern Web Platforms (React, Next.js, Vue, Vanilla TS). Ensure seamless 2-way communication, optimal WASM loading performance, proper security headers for multi-threading, and responsive container scaling.
Inputs and Outputs
- Read
.agents/specs/[feature]/spec.md,plan.md,tasks.md, target engine export artifacts, bridge event schemas, and platform SDK specifications. - Produce typed bridge dispatcher (
GameBridge.ts), responsive shell container component (GameContainer.tsx/vue), loading screen with lifecycle hooks, server headers (COOP/COEP, Brotli), and platform connectors.
Protocol
1. Two-Way Bridge Architecture (Web ⇋ Engine)
- Type-Safe Dispatcher: Define strict TypeScript interfaces for all outbound actions and inbound events.
- Web ➔ Engine (Call into Game):
- Unity: Use
unityInstance.SendMessage(gameObjectName, methodName, jsonPayload). - Godot: Use
JavaScriptBridge.eval()or trigger registered callback handlers. - Iframe / Web Worker: Use
window.postMessagewith stricttargetOriginverification (never use*in production).
- Unity: Use
- Engine ➔ Web (Game Events to Shell):
- Unity: Implement C#
.jslibplugins calling global bridge functions:window.dispatchGameEvent(eventName, data). - Godot: Use
JavaScriptBridge.get_interface("window").dispatchGameEvent(eventName, data).
- Unity: Implement C#
- Validation: Validate all incoming event payloads using schemas (e.g. Zod) before updating Web state.
2. Web Shell & Responsive Container Management
- Aspect Ratio Locking: Wrap game canvas in a responsive container with aspect-ratio preservation (
16:9,4:3,9:16for mobile vertical) using CSS Letterbox / Pillarbox. - Orientation & Fullscreen:
- Implement Fullscreen API handler with fallback for iOS Safari.
- Listen to
ScreenOrientationchange events; show rotate device overlay when orientation is incompatible.
- Focus & Input Trapping:
- Automatically manage Canvas focus/blur to capture keyboard game inputs (Arrow keys, Spacebar) while preventing unwanted page scrolling.
- Release focus when user interacts with Web DOM overlays (modals, chat inputs).
3. Loading, Preloading & Asset Streaming
- Granular Loading Screen: Parse engine loading lifecycle hooks:
- Engine Runtime Fetching (
.wasm,.framework.js) - Asset Data Downloading (
.data,.pck) - WASM Compilation & Instantiation
- Game Scene Ready
- Engine Runtime Fetching (
- Persistent Caching: Configure Service Worker or IndexedDB caching for large WASM blobs and asset packages to enable instant subsequent loads and offline play.
4. Server & DevOps Infrastructure
- SharedArrayBuffer & Multi-Threading (COOP / COEP):
For Godot 4 / Unity multi-threaded builds, enforce HTTP response headers in Nginx/Caddy/Vite:
Cross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: require-corp - Compression: Pre-compress build outputs (
.wasm,.data,.pck) using Brotli (.br) and Gzip (.gz), serving with properContent-EncodingandContent-Type: application/wasm.
5. Platform SDKs & Monetization Hooks
- Platform Integrations:
- Telegram Mini Apps: Integrate
@twa-dev/sdk(BackButton, MainButton, CloudStorage, HapticFeedback). - Discord Activities: Integrate
@discord/embedded-app-sdk.
- Telegram Mini Apps: Integrate
- Monetization & Ads: Implement interstitial / rewarded video ad lifecycle (pause game loop & audio during ad, resume on completion).
Completion Gate
Two-way bridge messages typed and validated, loading screen lifecycle verified with error fallback, COOP/COEP headers configured for multi-threaded WASM, and audio suspends on document visibility change.
Guard Rails
- FORBIDDEN: Using
postMessage('*')without origin validation. - FORBIDDEN: Hardcoding asset paths or API endpoints inside game exports (must be injected via bridge or ENV query params).
- FORBIDDEN: Omitting COOP/COEP headers when the engine requires
SharedArrayBuffer(causes silent black screens or crashes). - FORBIDDEN: Leaving audio playing in background when user navigates away or tab is hidden (
document.hidden).
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
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.

