---
name: yoodel-app-builder
description: Build a web game that plays well on Yoodel (responsive 9:16 + 16:9 + fullscreen, touch + keyboard, embeddable), host it, and publish, update or check it on Yoodel (yoodel.io) via the Yoodel MCP tools or the `@yoodel/cli` CLI. Use whenever the user mentions Yoodel or wants their game on Yoodel.
---

# Yoodel App Builder Skill

Use this skill when creating a new web game for **Yoodel** (`yoodel.io`), adapting an existing web app so it plays smoothly inside Yoodel's Shorts feed (9:16 mobile), Watch page (16:9 desktop), and Fullscreen mode, or publishing/updating a game on Yoodel.

## Workflow at a glance
1. **Build** to the rules in sections 1–2.
2. **Host** it on any HTTPS static host (section 3) and confirm the deployed URL loads.
3. **Describe** it in `yoodel.json` (section 4).
4. **Connect** to Yoodel and check the account with `yoodel_whoami` (section 5).
5. **Validate** with `yoodel_validate_embed`, fix anything it reports, then **publish** with `yoodel_publish_app`.
6. **Save the returned `slug` into `yoodel.json`.** Every later publish with that slug updates the same game instead of creating a new one.
7. **Track** review with `yoodel_app_status` / `yoodel_list_my_apps`. A moderator reviews new games before they appear publicly.

Ask the user before publishing for the first time; after that, re-publishing their own game to ship an update is routine.

## 1. Responsive Viewport & Canvas Rules (Required)
Yoodel embeds your app inside a sandboxed `<iframe>` whose dimensions change dynamically across mobile Shorts (`9:16`), desktop Watch (`16:9`), Theater, and Fullscreen.

1. **Fill the iframe cleanly with zero scrollbars:**
   ```css
   html, body, #root, #app {
     margin: 0;
     padding: 0;
     width: 100vw;
     height: 100dvh;
     overflow: hidden;
     touch-action: none;
     user-select: none;
     -webkit-user-select: none;
   }
   ```
2. **Use `ResizeObserver` (or `window.addEventListener('resize', ...)`):**
   - For `<canvas>` / WebGL / Three.js / Phaser apps, update canvas backing store (`width * devicePixelRatio`, `height * devicePixelRatio`) and camera aspect ratio whenever the container resizes.
   - Never hardcode `1920x1080` or `800x600` fixed pixel containers that clip on mobile.
   - Keep HUD elements anchored to viewport edges with `env(safe-area-inset-*)` padding so overlays never clip on mobile or collide with Yoodel's top-right exit/fullscreen controls.

## 2. Input & Audio Rules
1. **Support both Touch and Pointer/Keyboard:**
   - Use Pointer Events (`pointerdown`, `pointermove`, `pointerup`) so touch and mouse work identically.
   - If the game uses keyboard controls (`WASD` / Arrow keys / `Space`), also provide optional on-screen touch controls when `(pointer: coarse)` is detected.
   - Call `e.preventDefault()` on Arrow keys and `Space` when focused so the game does not trigger unwanted page scroll.
2. **Audio Autoplay Compliance:**
   - Initialize or resume `AudioContext` only inside a user gesture (`pointerdown` / `keydown`).
   - Provide a visible mute toggle or honor browser mute states cleanly.
3. **Respond to Yoodel's volume control (recommended):**
   - The Yoodel player has a per-game mute button and volume slider. Browsers don't let the host page change a framed game's audio, so Yoodel sends your game a message instead. Apply it to your master gain/volume:
     ```js
     window.addEventListener("message", (e) => {
       if (e.data?.type !== "yoodel:volume") return;
       // e.data.volume: 0..1 (already 0 when muted), e.data.muted: boolean
       masterGain.gain.value = e.data.volume; // or Howler.volume(e.data.volume), audio.volume = …
     });
     // Optional: ask Yoodel to resend the current setting once your audio is ready.
     window.parent?.postMessage({ type: "yoodel:ready" }, "*");
     ```
   - Yoodel starts games muted and automatically unmutes on the player's first interaction (clicking Play or clicking into the game), resending the setting whenever the game loads or reloads. Games that ignore the message keep playing at their own volume.

## 3. Hosting & Embed Compatibility
Yoodel plays your game from your own HTTPS host. Any static host works; deploy with the host's CLI if the user is logged in, otherwise tell them the one command to run:

| Host | Deploy | Watch out for |
|---|---|---|
| Vercel | `npx vercel deploy --prod` | `headers` in `vercel.json` adding `X-Frame-Options` |
| Netlify | `npx netlify deploy --prod --dir <build-dir>` | `X-Frame-Options` in `_headers` / `netlify.toml` |
| Cloudflare Pages | `npx wrangler pages deploy <build-dir>` | `X-Frame-Options` in `_headers` |
| GitHub Pages | push the build to the Pages branch | `<meta http-equiv="refresh">` to a domain that blocks framing |

Use the stable production address (e.g. `https://my-game.vercel.app`), not a per-deploy preview URL, so updates don't need a new `embedUrl`. Preview URLs behind host login (e.g. Vercel Deployment Protection) fail the embed check.

Rules for every host:
- Serve strictly over **HTTPS**.
- Do **not** send `X-Frame-Options: DENY` or `SAMEORIGIN`, and do **not** send `Content-Security-Policy: frame-ancestors 'none'` or `'self'`.
- Do not rely on `window.top` navigation or third-party cookies inside the iframe.
- Include `<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover" />` and Open Graph tags (`og:title`, `og:description`, `og:image`) so Yoodel's poster scraper can capture metadata automatically.

## 4. Generate `yoodel.json`
Create a `yoodel.json` file at the root of the project (or in `public/yoodel.json` for external hosting):

```json
{
  "schemaVersion": 1,
  "slug": "my-game-title",
  "title": "My Game Title",
  "description": "One-sentence pitch of how to play.",
  "hostingMode": "external",
  "embedUrl": "https://my-game.vercel.app",
  "tags": ["casual", "puzzle"],
  "responsive": true,
  "preferredAspect": "responsive",
  "verticalFriendly": false,
  "controls": ["touch", "mouse", "keyboard"],
  "visibility": "unlisted",
  "remixAllowed": true,
  "links": {
    "youtube": "https://youtube.com/watch?v=...",
    "github": "https://github.com/you/my-game"
  },
  "authorSocials": {
    "x": "https://x.com/yourhandle"
  }
}
```

- `slug` (lowercase kebab-case) identifies the game. On first publish Yoodel may assign a different slug if yours is taken; always write the returned slug back into `yoodel.json`.
- `poster` (optional) is an https link to a PNG/JPG/WebP/GIF, 16:9 works best. Without it Yoodel uses your page's `og:image`.
- `visibility` and `authorSocials` are not applied on publish: new games start unlisted until a moderator approves them, and social links live on the creator's Yoodel profile. Publishing reports these under `ignoredFields`.
- `tags` (up to 3) must come from the Yoodel tag list below. Use the slug (e.g. `"tower-defense"`); the label (`"Tower defense"`) is also accepted and stored as the slug. Pick the 1–3 genres that best describe the game.
- Set `"verticalFriendly": true` only if the game is fully playable on a phone held upright (portrait viewport, no sideways scrolling or rotating). Only vertical-friendly games appear in the Yoodel Shorts feed; everything else still appears on Home, Search and the Watch page.

### Yoodel tag list
- **Action:** `action` Action · `platformer` Platform games · `shooter` Shooter games · `fps` First-person shooters · `third-person-shooter` Third-person shooters · `hero-shooter` Hero shooters · `light-gun-shooter` Light gun shooters · `shmup` Shoot 'em ups · `fighting` Fighting games · `beat-em-up` Beat 'em up games · `stealth` Stealth games · `survival` Survival games · `rhythm` Rhythm games · `battle-royale` Battle royale games · `action-adventure` Action-adventure · `survival-horror` Survival horror · `metroidvania` Metroidvania
- **Adventure:** `adventure` Adventure · `text-adventure` Text adventures · `graphic-adventure` Graphic adventures · `visual-novel` Visual novels · `interactive-movie` Interactive movie
- **Puzzle:** `puzzle` Puzzle · `breakout` Breakout clone game · `logic` Logical game · `physics` Physics game · `programming` Programming game · `puzzle-platformer` Puzzle-platform game · `hidden-object` Hidden object game · `reveal-the-picture` Reveal the picture game · `tile-matching` Tile-matching game · `traditional-puzzle` Traditional puzzle game
- **Role-playing:** `rpg` Role-playing · `action-rpg` Action RPG · `crpg` CRPG · `mmorpg` MMORPG · `roguelike` Roguelikes · `tactical-rpg` Tactical RPG · `sandbox-rpg` Sandbox RPG · `first-person-party-rpg` First-person party-based RPG · `monster-taming` Monster-taming
- **Simulation:** `simulation` Simulation · `construction-management-sim` Construction and management simulation · `life-sim` Life simulation · `vehicle-sim` Vehicle simulation
- **Strategy:** `strategy` Strategy · `4x` 4X game · `artillery` Artillery game · `auto-battler` Auto battler (Auto chess) · `moba` Multiplayer online battle arena (MOBA) · `rts` Real-time strategy (RTS) · `rtt` Real-time tactics (RTT) · `tower-defense` Tower defense · `turn-based-strategy` Turn-based strategy (TBS) · `turn-based-tactics` Turn-based tactics (TBT) · `wargame` Wargame · `grand-strategy-wargame` Grand strategy wargame
- **Sports:** `sports` Sports · `racing` Racing · `sports-game` Sports game
- **More genres:** `mmo` MMO · `board-or-card` Board game or card game · `casino` Casino game · `collectible-card` Digital collectible card game · `digital-therapeutic` Digital therapeutic video game · `gacha` Gacha game · `horror` Horror game · `idle` Idle game · `party` Party game · `photography` Photography game · `social-deduction` Social deduction game · `trivia` Trivia game · `typing` Typing game
- **Purpose:** `advergame` Advergame · `art-game` Art game · `casual` Casual game · `christian` Christian game · `educational` Educational game · `esports` Esports · `exergame` Exergame (Fitness Game) · `personalized` Personalized game · `serious-game` Serious game · `live-interactive` Live Interactive Game
- **World:** `sandbox` Sandbox · `creative` Creative · `open-world` Open world

## 5. Publishing to Yoodel
Yoodel has a **Remote MCP server** (`https://yoodel.io/api/mcp`, Streamable HTTP) and a **CLI** (`npx @yoodel/cli`). Both use the same Personal Access Token.

### Connect (one-time, done by the user)
1. The user signs in at `https://yoodel.io/auth` and creates a token (`ydl_...`) on the **Agent & CLI access** page (`https://yoodel.io/auth/tokens`). You cannot create accounts or tokens for them.
2. Connect Claude Code (keep the token out of files you commit):
   ```bash
   export YOODEL_TOKEN=ydl_...
   claude mcp add --transport http yoodel https://yoodel.io/api/mcp --header "Authorization: Bearer ${YOODEL_TOKEN}"
   ```
   With the Yoodel plugin installed the server is already configured and reads `YOODEL_TOKEN` from the environment.
3. Call `yoodel_whoami` to confirm which account you're publishing as.

### MCP tools
| Tool | Auth | Use |
|---|---|---|
| `yoodel_whoami` | token | Check the connection and the account. |
| `yoodel_validate_embed` | none | Validate a manifest and check the live `embedUrl` can be embedded. Fix every reported problem before publishing. |
| `yoodel_publish_app` | token | Publish `yoodel.json`. If you already have a game with that slug it is **updated** (only fields present in the manifest change); otherwise a new game is **created** and queued for review. Returns `action`, `app.slug`, `app.watchUrl`, `ignoredFields` and `notes`. |
| `yoodel_update_app` | token | Change specific fields of one of your games by `slug` (title, description, embedUrl, poster, tags, responsive, preferredAspect, verticalFriendly, controls, remixAllowed, links). `tags` and `links` replace the existing values. |
| `yoodel_list_my_apps` | token | List your games with slug, review status, moderator notes, plays and likes. |
| `yoodel_app_status` | optional | Status of one game by slug. |
| `yoodel_search_apps` | none | Search public games. |

Review rules:
- New games start **pending + unlisted**. Their page is visible only to the owner (signed in to Yoodel in a browser) until a moderator approves them.
- Changing `embedUrl` on an approved game sends it back to review. Title, description, thumbnail, tags and links can change without re-review.
- If a game is rejected, read `modNotes`, fix the problem, and publish again.

### CLI
```bash
npx @yoodel/cli init                 # Create starter yoodel.json
npx @yoodel/cli login ydl_...        # Save token to ~/.yoodel/config.json (or set YOODEL_TOKEN)
npx @yoodel/cli whoami               # Check the token's account
npx @yoodel/cli validate             # Schema + live embed check
npx @yoodel/cli publish              # Create or update; saves the slug into yoodel.json
npx @yoodel/cli list                 # Your games and their review status
npx @yoodel/cli status <slug>        # One game's status
```
Add `--json` for machine-readable output.

## 6. Verification Checklist
Before publishing to Yoodel:
- [ ] Loads cleanly at `390x844` (mobile portrait), `1280x720` (desktop 16:9), and `1920x1080` (fullscreen) with no scrollbars or clipped UI.
- [ ] Works with a single tap/drag on mobile and mouse/keyboard on desktop.
- [ ] Returns HTTP `200` over HTTPS without blocking iframe headers (`X-Frame-Options` / restrictive `frame-ancestors`).
- [ ] `yoodel.json` passes validation (`yoodel_validate_embed` or `npx @yoodel/cli validate`).
- [ ] After publishing, `yoodel.json` contains the returned `slug`.
