/hinge:hingefrom hinge
Controls the hinge angle of a foldable iPhone Simulator (e.g., iPhone Duo) from the command line. Supports setting angles, animating folds, reading posture, and capturing screenshots of the active display.
Ships in hinge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Set and read the hinge angle of a booted foldable iPhone Simulator from the command line. It posts the same HID event as the hidden hinge slider in Xcode's Device Hub (hold Option).
Run the bundled script at scripts/hinge, relative to this skill's directory. A hinge on PATH works too when hinge -v prints the same version as scripts/hinge -v; an older install lacks screenshot and --json.
scripts/hinge 120 # set angle: 0 = closed, 180 = flat
scripts/hinge open # 180°
scripts/hinge close # 0°
scripts/hinge half # 90°
scripts/hinge sweep 180 0 2 # animate from 180° to 0° over 2 seconds
scripts/hinge get # print current angle, e.g. 130.0
scripts/hinge posture # angle, orientation, and which integrated display is active
scripts/hinge posture --json # the same as JSON; also works with get, orientation, screenshot
scripts/hinge screenshot out.png # capture the display that hosts the UI
scripts/hinge rotate left # rotate 90°, like Device Hub's Controls > Rotate Left; prints the new orientation
scripts/hinge rotate right
scripts/hinge orient landscape-left # portrait, landscape-left, landscape-right, or portrait-upside-down
scripts/hinge orientation # print current orientation, e.g. landscape-left
scripts/hinge -d "iPhone Duo" 90 # target a simulator by name or UDID (default: $HINGE_DEVICE, else the only booted iPhone Duo)
scripts/hinge -t 0 90 # set without waiting for the angle to be confirmed
open, close and half also accept unfolded/flat, closed/folded and half-open.
xcrun simctl list devices booted. Without -d, hinge picks the only booted iPhone Duo; with several, it lists them and exits — pass -d <udid> or set HINGE_DEVICE instead of guessing.get to check it.scripts/hinge posture tells which display hosts the UI (active) after a fold. Use --json when you parse it: activeDisplay names that display.scripts/hinge screenshot out.png. It captures the active display, so the wait in step 3 still applies. Plain simctl io … screenshot fails with Invalid argument on a foldable unless it gets --display=LCD (cover) or --display=LCD-1 (inner).~/.cache/hinge. It takes a few seconds.sweep runs at 60 Hz in one process. For a smooth animation, use it instead of many set calls. It does not confirm the final angle.sweep can keep the previous display until the end), and sometimes the simulator stops following the hinge altogether while still reporting new angles. Always check with posture instead of assuming; a simulator that stopped following the hinge keeps reporting correct angles, and a shutdown and boot clears it.active, not the backlight: a folded Duo lights its cover as inactiveOn, and the backlight lags a fold by up to 3 s.get settles a few degrees away from the angle you set: 129 reads back as 127-130°, or about 122° when opening from closed. That isn't a failure, so don't retry the set.orient, orientation and rotate use device orientations (the devicectl names), not interface orientations: a device in landscape-right shows a landscape-left interface.xcrun devicectl device orientation set reports success there but is reverted. rotate/orient send Device Hub's event and fall back to devicectl on simulators that ignore it.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub artemnovichkov/hinge --plugin hingeOther plugins' skills for the same job