
iphone-duo-games
Adapt a game to iPhone Duo — filling the screen across every device pose, orientation locking, aspect ratio versus letterboxing, keeping touch controls out of the fold, and consistent text and control sizing while resizing. Use when the project is a game or uses a game engine such as Unity, Unreal, Godot, SpriteKit or Metal.
- Installs
- 452
- Last 24h
- +22
- Trending rank
- #5576
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-games- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads iphone-duo-games automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Games on iPhone Duo
Games get a carve-out from most of this device's UI guidance — no toolbars to send vertical, no split views to adapt. What they don't get a carve-out from is resizing. The screen changes size and shape underneath a running game every time someone opens, closes, folds or rotates the device, and a game that assumed a fixed viewport will letterbox, stretch, or drop controls off the edge.
You may lock orientation. You may not stop filling the screen.
Locking to portrait or landscape is fine and supported. What is not fine is treating that lock as permission to assume a fixed size.
Two reasons it doesn't hold here:
- The device has two displays with different dimensions, and your game moves between them mid-session.
- The inner display doesn't honor supported interface orientations. An orientation lock that has held on every previous iPhone stops holding on the inner display.
UIRequiresFullScreen behaves the same way — still honored, but your game still
resizes when the device opens and closes. Plan for the resize regardless.
So: pick your orientation, then make sure the game fills the screen in every pose. That is the actual requirement.
Aspect ratio beats letterboxing
When the viewport shape changes, you have three options, in order of preference:
1. Change the aspect ratio. Show more or less of the world. This is the preferred answer: extend the camera frustum, widen the visible field, let the scene breathe into the space it has been given. The game stays full-bleed and feels native to whatever pose it's in.
2. Letterbox or pillarbox with artwork. If the design genuinely can't take a variable aspect ratio — a fixed puzzle grid, a precisely tuned platformer camera — then bars are acceptable, but fill them. Extend the background, continue the scene's artwork, or run themed framing into the padding. The goal is that it reads as a deliberate frame rather than a game that failed to fit.
3. Bare black bars. Avoid. This is what "didn't adapt" looks like.
Keep text and controls the same size
When the viewport resizes, resist the urge to scale the whole scene uniformly. Uniform scaling shrinks your HUD text and touch targets along with the world — so opening the device to the larger display can make text harder to read and buttons harder to hit, which is exactly backwards.
Scale the world; keep UI in its own layer sized in points. Text and controls should stay as close to a constant physical size as you can manage across every pose. On-screen touch controls in particular must not shrink below a comfortable target just because the aspect ratio changed.
The fold is a real problem for touch controls
This is the iPhone Duo-specific issue most likely to hurt a game.
When the device is partially folded, the inner display curves through the middle, and that region is genuinely harder to see and to tap. A virtual joystick, a fire button, or a drag target that lands in the curve becomes unreliable — not invisible, just worse, which is harder to diagnose from a bug report.
Games rarely use the system components that get fold avoidance for free, so this one is on you:
- Query reserved regions and keep interactive controls out of the division
region (the fold). See
../iphone-duo-adaptive-layout/SKILL.mdfor the API and the displacement patterns. - Anchor touch controls to the outer edges rather than centering them. Edge anchoring is more robust across every pose and costs nothing when flat.
- Watch the occlusion regions too: the outer front camera is always present, and the inner camera appears whenever it activates.
Purely visual, non-interactive content can cross the fold. It's touch targets and critical readouts that need to move.
Poses worth designing for
You don't need a bespoke layout per pose, but two are worth a thought:
Tabletop / laptop. The device stands on a surface, half the display facing up and half facing the player. This is a genuinely new play position — the lower region is a stable touch surface and the upper region is a viewing surface. A game with a board-and-controls split maps onto it naturally.
Tent. Standing on its edges, hands-free. Good for idle, spectator, ambient or turn-based games.
Treat both as bonuses. Don't tie any functionality to a pose someone might never use.
Split View
Games participate in Split View multitasking like everything else — your game can end up in half the inner display. It will be smaller and a different shape than anything you designed for. Make sure it still renders correctly and doesn't drop controls off the edge; you are not obliged to make it a great play experience at that size, but it must not break.
The hinge as an input
The hinge angle is available as a live, continuous value — coarse status plus an
angle — via onHingeChange in SwiftUI or UIHingeInteraction in UIKit. For a
game engine, bridge it the way you'd bridge any other native sensor.
It is a genuine novelty input, and worth considering for effects, camera
parallax, or a mechanic. Two cautions: guard for a nil hinge, since the same
binary runs on every non-folding iPhone, and never make it the only way to
perform an action. Details in ../iphone-duo-hinge-and-scenes/SKILL.md.
Engine notes
Most engines expose the viewport as a resize event and a safe-area inset query. Wire both, and treat resize as a first-class event rather than a startup value:
- Unity —
Screen.safeArea, and handle resolution changes at runtime rather than reading once inStart(). - Unreal — safe zone / title safe values, and re-evaluate on viewport resize.
- Godot — the safe area API plus a stretch mode that tolerates changing aspect ratios.
- SpriteKit / Metal — you already get the resize through the view; the work is making the scene respond rather than assuming the initial drawable size.
Reserved regions and the hinge angle are iOS 27.1 APIs with no engine-level
equivalent, so those need a native plugin. The bridging pattern is the same one
described in ../iphone-duo-flutter/SKILL.md and
../iphone-duo-react-native/SKILL.md.
Checklist
- Handle viewport resize as a live event — not a value read at launch.
- Fill the screen in every pose, whatever your orientation lock.
- Prefer changing aspect ratio; if you letterbox, fill the bars with artwork.
- Keep HUD text and touch targets at a consistent physical size across poses.
- Anchor interactive controls to edges, and keep them out of the fold.
- Verify the game still renders correctly in Split View.
- Test every pose in the iPhone Duo simulator in Device Hub — open, closed, folded, rotated.
FAQ
What does the iphone-duo-games skill do?
Adapt a game to iPhone Duo — filling the screen across every device pose, orientation locking, aspect ratio versus letterboxing, keeping touch controls out of the fold, and consistent text and control sizing while resizing. Use when the project is a game or uses a game engine such as Unity, Unreal, Godot, SpriteKit or Metal.
How do I install iphone-duo-games?
Run npx skills add https://github.com/mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-games in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/iphone-duo-games/ (personal) or .claude/skills/iphone-duo-games/ (project).
Which AI agents can use iphone-duo-games?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is iphone-duo-games safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains iphone-duo-games?
It is published by mirzaaghazadeh in mirzaaghazadeh/iphone-duo-skills. It has 452 recorded installs.
More from mirzaaghazadeh/iphone-duo-skills
iphone-duo-readiness
mirzaaghazadeh/iphone-duo-skills
Audit and port an iOS app to iPhone Duo, Apple's first foldable iPhone. Use when asked to support, adapt, prepare, test, or review an app for iPhone Duo, foldable iPhone, the inner/outer display, device poses, or the fold. Entry point that routes to the layout, bars, hinge/scenes, camera, and design skills.
iphone-duo-adaptive-layout
mirzaaghazadeh/iphone-duo-skills
Build layouts that adapt to the iPhone Duo fold using reserved regions, division and occlusion regions, displacement patterns, and the split and overlay ArrangementView containers. Use when content or controls land in the fold, when building a split-like or overlay layout, or when custom manually-positioned UI must avoid the hinge or the under-display camera.
iphone-duo-design-review
mirzaaghazadeh/iphone-duo-skills
Review or design an iOS interface for iPhone Duo's poses — closed, open, book-folded, tabletop and tent — covering side-mounted controls, asymmetric layouts, fold avoidance, sheets, and how to use the inner display well. Use for design critique, mockup review, or deciding what a screen should look like on a foldable iPhone rather than how to code it.
iphone-duo-vertical-bars
mirzaaghazadeh/iphone-duo-skills
Adapt toolbars, navigation bars and tab bars for the vertical axis on iPhone Duo — item ordering, symbol vs text representations, axis behavior, overflow menus, visibility priority, and when to opt out. Use when toolbar items look wrong, overflow too early, or need to move to the side on the outer display.
iphone-duo-hinge-and-scenes
mirzaaghazadeh/iphone-duo-skills
Use the iPhone Duo hinge angle for interactions and effects, support Split View multitasking and multiple app scenes, and pair UI across both displays with scene accessories including CameraCaptureAccessory. Use when building fold-driven effects, multi-window support, or dual-display experiences.
iphone-duo-camera
mirzaaghazadeh/iphone-duo-skills
Build camera capture for iPhone Duo's two front cameras — the virtual front camera, the inner under-display and outer ultra-wide devices, AVCaptureDeviceDirectionCoordinator, preview mirroring and video gravity, and dual-display capture. Use when an app captures photo or video and must handle the device opening, closing or flipping.
Popular mobile skills
design-mobile-apps
designed-by-ai/skills
Design mobile app screens with Sleek, edit Sleek projects, and implement their designs in React Native or HTML.
ios-design
uizze.sh
Design and review iOS UI/UX for iPhone apps in SwiftUI, UIKit, or React Native. Use for mobile app design, screen redesigns, navigation flows, typography, forms, keyboard and safe-area layout, and accessibility checks. Apply Apple Human Interface Guidelines and consult real product references through the optional Uizze connection.
vercel-react-native-skills
vercel-labs/agent-skills
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
animate-expo
emilkowalski/skills
Build animations in React Native and Expo, making the decisions in the order that determines whether they feel right — should it animate, which thread it runs on, which properties, spring or timing, how the gesture hands off, how it degrades. Writes the implementation with Reanimated, Gesture Handler, Expo Router and expo-haptics. Use when animating anything in an Expo app, adding gestures, sheets, screen transitions, press feedback or haptics, or fixing motion that stutters on device. For web animation use animate.
xcode-project-setup
firebase/agent-skills
Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).
firebase-remote-config-basics
firebase/agent-skills
Manages Firebase Remote Config templates, feature flags, loading strategies, and SDKs (Android, iOS). Use when downloading/deploying remoteconfig JSON templates, managing version history/feature flags, setting in-app defaults, fetchAndActivate(), real-time listeners, or SDK setup. Don't use for Firebase Hosting, Auth, Firestore, Data Connect, Crashlytics, or App Hosting.