swiftui-layout-components — Claude Code skill: setup and features
Guides SwiftUI screen layouts built from stacks, grids, lists, forms, and controls. Use it for settings, collections, and scrollable views.
npx skills add dpearson2699/swift-ios-skills --skill swiftui-layout-components -a claude-codeWhat swiftui-layout-components does
The skill explains when to choose regular stacks and when lazy containers fit large or changing collections. It also covers adaptive grids and List sections with row actions. Regular stacks create their children at once, so that choice matters for dynamic content.
Other topics include ScrollView, programmatic movement with ScrollPosition, forms using Toggle, Picker, and Slider, search with .searchable, and overlay patterns. The material targets iOS 26+ and Swift 6.3; many patterns work back to iOS 17 unless a section says otherwise. A GeometryReader inside a lazy container forces eager measurement, defeating lazy loading; .onGeometryChange is offered for reading dimensions instead.
What it helps with
- choose a container for fixed content or a changing collection
- build an adaptive grid for a gallery
- create a settings list with sections and row actions
- scroll programmatically to an item or edge
- compose an input form with toggles and selection controls
Example prompts for the agent
- Build an adaptive SwiftUI gallery grid from
items. - Create a settings screen with sections, toggles, and a theme picker.
- Add programmatic scrolling to the latest message in this list.
How to install swiftui-layout-components
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swiftui-layout-components -a claude-code2Manually: put the files in place
~/.claude/skills/swiftui-layout-components/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/swiftui-layout-components/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swiftui-layout-components -a codex2Manually: put the files in place
.agents/skills/swiftui-layout-components/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swiftui-layout-components -a cursor2Manually: put the files in place
.cursor/skills/swiftui-layout-components/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install dpearson2699/swift-ios-skills swiftui-layout-components2Manually: put the files in place
.github/skills/swiftui-layout-components/SKILL.md1Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swiftui-layout-components -a gemini-cli2Platform CLI
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/swiftui-layout-componentsManually: put the files in place
.devin/skills/swiftui-layout-components/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add dpearson2699/swift-ios-skills --skill swiftui-layout-components -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about swiftui-layout-components
How do I install swiftui-layout-components in Claude Code?
Run npx skills add dpearson2699/swift-ios-skills --skill swiftui-layout-components -a claude-code. The skill file is at ~/.claude/skills/swiftui-layout-components/SKILL.md.
What does swiftui-layout-components do?
It provides guidance for SwiftUI layouts, including stacks, grids, lists, forms, search, and overlays.
Why avoid GeometryReader inside a lazy container?
It makes the container measure content eagerly, undermining lazy loading. The skill suggests .onGeometryChange for reading dimensions.