
Agent skill for designing iOS apps for iPhone Duo
An agent skill and toolkit for building iOS apps that work well on iPhone Duo, across the compact outer display and the large inner one. It covers:
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
An agent skill and toolkit for building iOS apps that work well on iPhone Duo, across the compact outer display and the large inner one. It covers:
Everything here is grounded in Apple's own pages: the Designing for iPhone Duo HIG, Preparing your app for iPhone Duo, the Design for iPhone Duo Tech Talk, and the Apple pages they link to. references/sources.md lists each source and which claims are verified or still unverified.
Independent project by belweave. Not made or endorsed by Apple. "iPhone" and "iPhone Duo" are Apple trademarks.
Path What it's for
SKILL.md The skill entry point: principles, checklist, and a routing table that points the agent to the right tool or file for each task
scripts/duo-lint A dependency-free Swift scanner (Python 3 stdlib). It flags UIScreen.main, fixed widths, orientation and idiom layout, custom bars, ignoresSafeArea on controls, symmetric insets, odd grid columns, manually placed controls that ignore reserved regions, custom ellipsis menus, title-only toolbar items, fixed bar spacers, and arrangements nested in scroll views. It prints file:line, the rule, and the fix
tests/ unittest suite for duo-lint, with good and bad Swift fixtures (python3 -m unittest discover -s tests)
templates/swiftui/ SwiftUI templates: size-class root, split-view collapse, split and overlay arrangements, fold-aware controls and grid, single-button sheet opt-out, game fill, vertical bar organization, and the preview matrix (DuoPreviewMatrix.swift)
templates/uikit/ UIKit equivalents of the templates above (no preview matrix)
tools/duo-preview.html Offline visual previewer. It drops a screenshot into outer and inner display frames at Apple's screenshot aspect ratios, with portrait and landscape, a half-folded overlay, side-control and safe-area guides, a 50/50 Split View, and split and overlay arrangement diagrams
references/hig-summary.md Condensed Apple guidance with a source tag on every point
references/api-index.md Every API this skill names, linked to its Apple doc page
references/patterns.md Layout patterns mapped to templates
references/migration-guide.md A step-by-step migration of an existing app
references/test-plan.md A pose-by-pose test plan for the Device Hub simulator or a device
references/review-rubric.md A scored review rubric with ship bar and report template
references/design-review-checklist.md Designer pre-ship checklist (the rubric scores its sections)
references/sources.md Apple sources and the claim ledger (verified, corrected, unverified)
prompts/review-screen.md Copy-paste prompt for an agent reviewing a screen with the linter, rubric and test plan
.claude-plugin/ Claude Code plugin manifest and marketplace file
install/ AGENTS.md snippet (Codex and Cursor) and a Cursor project rule
evals/ Behavior evals and trigger evals for the skill
docs/images/ Screenshots of the preview tool
Related: FoyerKit A separate Swift package for a first-launch intro or welcome screen in Liquid Glass. Add it with .package(url: "https://github.com/Belweave/FoyerKit.git", from: "0.1.0")
Install
Each method below was checked against the agent's current official docs on 2026-10-17. The doc links are listed with each method.
This repository is a Claude Code marketplace (.claude-plugin/marketplace.json) containing one plugin (.claude-plugin/plugin.json, with SKILL.md at the plugin root).
claude plugin marketplace add Belweave/iphone-duo-design claude plugin install iphone-duo-design@belweave
Inside a session, /plugin marketplace add Belweave/iphone-duo-design does the same thing. Docs: Create a marketplace and Plugin manifest reference. The manifests pass claude plugin validate ..
git clone https://github.com/Belweave/iphone-duo-design.git ~/.claude/skills/iphone-duo-design
Use .claude/skills/iphone-duo-design instead for a single project. Docs: Skills.
Cursor loads skills from .agents/skills/, .cursor/skills/, ~/.agents/skills/ and ~/.cursor/skills/, and also from ~/.claude/skills/ and ~/.codex/skills/. The folder name must match the skill name.
git clone https://github.com/Belweave/iphone-duo-design.git ~/.cursor/skills/iphone-duo-design
You can also add project instructions in one of two ways:
Docs: Agent Skills and Rules / AGENTS.md.
Codex reads skills from .agents/skills (in the repo, from your working directory up to the repo root) and from $HOME/.agents/skills.
git clone https://github.com/Belweave/iphone-duo-design.git ~/.agents/skills/iphone-duo-design
Mention it with $iphone-duo-design, or let Codex pick it from the description. To make it standing project guidance, paste install/AGENTS.md into your repo's AGENTS.md. Docs: Build skills and AGENTS.md.
npx skills add Belweave/iphone-duo-design # project install, pick agents interactively npx skills add Belweave/iphone-duo-design -g -a claude-code -a codex -a cursor -y
The CLI discovers a SKILL.md at the repository root and also reads .claude-plugin/ manifests. Docs: vercel-labs/skills (npm package skills). In our check, version 1.7.2 wouldn't start on Node.js 20, so use a current Node.js release.
Lint a project (exit code 1 on warnings/errors; --strict also fails on info)
scripts/duo-lint path/to/YourApp scripts/duo-lint path/to/YourApp --format json > duo-lint.json scripts/duo-lint --list-rules
Run the linter's tests
python3 -m unittest discover -s tests -v
To suppress a finding, add // duo-lint:disable=DUO002 on the line or the line above it, or // duo-lint:disable-file=DUO008 anywhere in the file. duo-lint is a line-based heuristic, not a compiler, so confirm each finding.
Two helpers for reviewing designs, both independent and not made or endorsed by Apple.
A single offline HTML file with no dependencies. Open it in any modern browser.
For code-level previews, templates/swiftui/DuoPreviewMatrix.swift renders a view under each size-class configuration Apple names. It doesn't invent display sizes. The fold, cameras and vertical bars only appear in the Device Hub simulator.
A short pre-ship checklist covering size classes, vertical controls, the fold and reserved regions, arrangements, sheets, Split View, and review assets. Each section links back to Apple's source pages, and review-rubric.md scores it.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。