
Build with AI Tools
Any capable AI coding tool can build a Game: describe the game, generate it, validate against the platform rules, iterate, and upload.
Install the Minit skill
Start by giving your AI coding agent the Minit skill and the Minit MCP server. The skill teaches it the creator workflow and platform rules; the MCP server validates, uploads, and publishes your Game. The MCP server needs a one-time browser login with your Minit Games account.
Claude Code
Install the Minit plugin, which adds both the skill and the MCP server:
/plugin marketplace add Minit-Games/minit-skills
/plugin install minit@minit
Then run /mcp, select minit, and complete the browser login.
Codex
- Add the MCP server and log in (the login opens your browser):
codex mcp add minit --url https://mcp.minit.games/mcp
codex mcp login minit
- Install the skill so it ends up at
~/.agents/skills/minit/SKILL.md: unzip the downloadedminit-skill.zipinto~/.agents/skills/, or ask Codex:
$skill-installer install the minit skill from https://github.com/Minit-Games/minit-skills/tree/main/plugins/minit/skills/minit
- Restart Codex so it picks up the skill.
Cursor and VS Code
- Download
AGENTS.mdinto your game project's root. Cursor reads it automatically; in VS Code, enable thechat.useAgentsMdFilesetting. - Add the MCP server as described in Connecting, then complete the browser login when prompted.
Source and per-client details: Minit-Games/minit-skills. Using a tool without skills or MCP support? The workflow below works in any tool.
The universal workflow
The same five steps in every tool: Claude Code, Codex/ChatGPT, Lovable, Google AI Studio (Gemini), Cursor, Copilot.
- Describe: paste the prompt below with your game concept filled in.
- Generate: the tool produces a complete Vite project that builds to a static folder with
index.htmlat its root. - Validate: with the Minit MCP server connected, ask it to fetch the live rules (
minit_get_requirements) and validate the build (minit_validate_build); otherwise see "Validate before you upload" below. - Iterate: play it on a phone, then feed back specific, concrete changes.
- Build, zip and upload:
npm run build, zip the contents ofdist/, then follow the upload step in Your First Game.
The prompt
Paste this into any AI tool and fill in the game concept:
I'm building a game for the Minit Games platform: a feed of short, instantly
playable HTML5 mini-games that run full-screen in a mobile WebView.
Read and follow every hard requirement on this page before writing code:
https://minit.studio/docs/platform-requirements
It covers the bundle format and size limit, viewport and rendering rules,
forbidden APIs, required SDK calls, controls, and gameplay rules.
Working style:
- Vite project. Any stack is fine (plain JS, TypeScript, React, Phaser,
PixiJS, ...) as long as `npm run build` emits a fully static, relative-path
bundle to dist/ with index.html at its root. Set `base: './'` in the Vite
config.
- Install the official SDK, https://www.npmjs.com/package/@minit-games/sdk,
and use it for every platform call: initializeSDK() at startup,
loadingDone() once the first frame is playable, reportResult(score) exactly
once when the game ends. Never call window.minit directly and never write
your own window.minit wrapper or mock; the SDK handles local testing.
- Completely self-contained: no CDN scripts, no Google Fonts <link>, no
external requests; bundle all assets or draw them in code.
- No backend, no routing, no accounts: a single static page.
- Touch/pointer input first (pointerdown/move/up): every action works by
touch, keyboard only as an extra, no hover; author on a 960 × 1480
surface and scale it uniformly; never derive gameplay coordinates from
the viewport.
- No title screen, no "Play" button, no game-over or replay menu, no
"result submitted" message: start straight into gameplay and end with
reportResult(). The host shows the result screen.
- Add a meta.json under public/ (Vite copies public/ verbatim into dist/ at
build time; a meta.json placed elsewhere at the project root is NOT copied)
with title, description, controls and logic fields, plus a config array
declaring the values a Post can tune (such as difficulty, seed,
background); read them with getConfigValue(key, fallback).
GAME CONCEPT:
[Describe your game: mechanics, win/loss condition, difficulty, visuals.]
Generate complete, ready-to-run files.
Start from a template
Instead of generating from nothing, hand your AI tool one of the official starter templates, with structure and SDK wiring already in place:
- minit-template-vanilla: plain Canvas/DOM, no build step, smallest possible bundle
- minit-template-pixi: PixiJS + Vite, fast 2D sprite work
- minit-template-phaser: Phaser + Vite, scenes and physics out of the box
- minit-template-three: Three.js + Vite, 3D
Clone the template (or point the tool at the repo) and say "start from this template". The prompt above still applies for everything else. Each template's npm run package produces the upload-ready ZIP.
Test locally with the SDK
Use @minit-games/sdk rather than hand-written window.minit calls or a console mock. When no host has injected window.minit, the SDK switches to its testing mode automatically:
- Every platform call is logged to the console with a
[MinitSDK]prefix instead of being sent. reportResult(score, options)renders a local result overlay showing the score, flavor text and delay.getUserData()can be seeded with?userData=...and config values with?key=valueURL params.
Run the dev server and open it in a desktop browser:
npm install
npm run dev
For a Vite-based project (generated code, or the pixi/phaser/three templates), to test on a real phone over the same Wi-Fi, expose the dev server on your network and open the printed address on the phone:
npm run dev -- --host
The minit-template-vanilla template has no build step and no Vite dev server: its npm run dev starts a plain static file server (already reachable on your network — no --host flag needed) and there is nothing to npm install.
Or upload a build and use a preview link.
Important: never ship a hand-written
window.minitwrapper or mock inside your game. On the real platform the host injectswindow.minititself, and a wrapper that guesses at the wire format will silently lose data. The SDK wraps the injected object for you, including theuserDatawire format.
Validate before you upload
With the Minit MCP server connected, ask your tool to validate the build against the live platform rules. Without it, sweep the generated code yourself:
- Search for
localStorage,sessionStorage,fetch(,XMLHttpRequest,window.open,location.href, and any externalhttp(s)://URL (Google Fonts<link>tags included). None belong in a Game. Per-player persistence goes through the SDK (see Saving User Data). - Search for
mouseover,mouseenter,wheel,:hover, andkeydown. Replace mouse and hover logic with pointer events; forkeydown, make sure a touch equivalent exists. - Confirm
initializeSDK()runs at startup,loadingDone()fires when the first frame is playable (not behind a "Start" button), andreportResult(score)is called exactly once at the end with nothing rendered afterwards. See Game Ready Signal and Reporting Results. - Recommended: confirm the viewport meta in
index.htmlincludesmaximum-scale=1, user-scalable=no; without it the game renders oversized and clipped on device. If you passinitializeSDK({ metaTags: true }), watch out — it appends its own unpinned viewport meta (width=device-width, initial-scale=1.0only), which silently resetsmaximum-scale/user-scalableon any tag that comes after it. LeavemetaTagsoff (or callinitializeSDK()with no config argument) wheneverindex.htmlalready declares its own pinned viewport meta. - Build the game —
npm run buildfor a Vite-based project (generated code, or the pixi/phaser/three templates), ornpm run packagefor the vanilla template, which has no separate build step — and confirmindex.htmlandmeta.jsonsit at the root of the built output, and later at the root of the ZIP.
Warning: upload the built output, never the source. Zip the contents of
dist/(each starter template's ownnpm run packagedoes this for you) soindex.htmlis at the top level of the ZIP. The upload validator only checks for a valid ZIP, a rootindex.html, and a<script>tag inside it — it does not scan forsrc/,package.json, orvite.config.*, so an unbuilt source tree can pass that check and still fail once it's actually played, because itsindex.htmlreferences module imports (e.g./src/main.tsx) that never resolve outside a dev server. Always uploaddist/'s contents, never the project source.
Iterate with specifics
- Ask for numeric changes ("make enemies spawn 30% faster"), not "make it better".
- Paste browser-console errors verbatim and ask for the fix.
- Re-run the validation pass after any substantial change. Regenerated code can re-introduce forbidden APIs.
Per-tool gotchas
- Lovable: React is fine, but Lovable also likes to add a router, a backend (Supabase) and Google Fonts. Insist on a single static page with no backend, no routing and no external requests.
- Google AI Studio (Gemini): put the Minit Games constraints in the system instructions so every turn honors them. Build Mode's export button downloads the source, which won't run once uploaded — its
index.htmlreferences unresolved module imports that only work behind a dev server or a real build; ask it to runnpm run buildand zipdist/, or build locally. Upload a phone screenshot and ask for specific layout fixes; multimodal iteration is fast. - Codex / ChatGPT: Codex with the Minit skill and MCP server gets the platform rules and validates its builds; ChatGPT without them does not. Either way, review the generated code: it likes to slip in
localStorageandfetch()calls, and to render its own "Game over" screen. Watch for unnecessary library imports.
Keep it small
Aim under 5 MB: AI-generated games rarely need heavy assets, and small bundles load instantly. The hard cap is 50 MB (see Platform Requirements); compress audio and images before building.
Next steps
- Run the validation pass one last time.
- Test on a real phone in portrait.
- Build it —
npm run build(Vite-based projects) ornpm run package(the vanilla template) — zip the contents ofdist/withindex.htmlat the root, and upload it. - Collect player feedback and iterate with the same loop.