jperezdelreal/firstframestudios/web-game-deployment
Claude Code and agent skill by jperezdelreal/firstframestudios
- community
Checking that the SKILL.md file is still in the repository.
Patterns for deploying web games — GitHub Pages, Vite build optimization, mobile viewport/touch, and PWA basics for offline play
Install
npx vskill@latest install jperezdelreal/firstframestudios/web-game-deploymentSKILL.md
The same SKILL.md was published earlier as jperezdelreal/firstframestudios/web-game-deployment.
Context
Use this skill when shipping a web game to players. Covers the full path from npm run build to a playable URL — static hosting on GitHub Pages, Vite build optimization, mobile viewport/touch setup, and PWA configuration for offline play. Applies to any Vite-bundled web game (Canvas 2D, PixiJS, Phaser).
Core Patterns
GitHub Pages Deployment
Deploy from dist/ via GitHub Actions using actions/upload-pages-artifact@v3 and actions/deploy-pages@v4. Set repository Pages source to GitHub Actions (not branch). Always set base: './' in vite.config.ts — default base: '/' breaks on repo subdirectories. Place a CNAME file in public/ for custom domains.
Vite Build Optimization
- Tree-shaking: Use named exports, not default-export objects. Import selectively (
{ Sprite, Container }not* as PIXI). - Chunk splitting: Isolate large deps (
pixi.js, audio libs) viamanualChunksso game code updates don't bust framework cache. - Asset hashing: Vite auto-hashes filenames. Never reference built filenames directly. Set long cache on everything except
index.html. - Size budgets: JS < 500KB gzipped, images < 5MB (use spritesheets), audio < 10MB (OGG/MP3, not WAV), total initial load < 15MB.
Mobile Viewport & Touch
Set viewport meta: width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover. Apply touch-action: none on body/canvas. Use { passive: false } + preventDefault() on touch events. Convert touch coordinates from screen space to logical game space. Listen for both resize and orientationchange (delay for iOS).
PWA for Offline Play
Add manifest.json with display: "fullscreen" and orientation: "landscape". Register a service worker with cache-first strategy — ideal for static game assets. Bump CACHE_NAME version on each release to invalidate old caches.
Key Examples
Minimal Deploy Workflow
Fullscreen Game HTML
Anti-Patterns
- `base: '/'` on GitHub Pages — blank screen; assets resolve to domain root instead of repo subdirectory. Use
'./'. - Missing viewport meta / `touch-action: none` — mobile browsers zoom and intercept swipes, making the game unplayable.
- Skipping `npm run preview` — dev server and production build differ (paths, env, modules). Always test built output.
- Caching `index.html` — entry point must stay fresh so browsers discover new hashed assets. Cache everything else aggressively.
- WAV audio files — a single WAV can be 50MB. Use OGG with MP3 fallback; keep total audio under 10MB.
- No loading screen — players see black for 3–10s during asset download. Show a progress bar.
- Hardcoded paths in service worker — Vite hashes change every build. Use cache-on-first-fetch, not pre-cached filenames.
- No `orientationchange` handler — phone rotation leaves canvas at wrong size.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.squad/skills/web-game-deployment/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jperezdelreal/firstframestudios/web-game-deployment)