Swift Expert
Jeffallan/claude-skills
Builds Swift apps for Apple platforms with SwiftUI, protocol-oriented design, async/await, actors and Sendable checks, verified with swift build and swift test.
SwiftUI layout beyond stacks — the Layout protocol (when custom layout beats GeometryReader), Grid vs lazy grids, custom containers with sections and container values, and lazy-stack/ScrollView…
$ npx skills add rshankras/claude-code-apple-skills --skill layout -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rshankras/claude-code-apple-skills layout --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/swiftui/layout .claude/skills/layout && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "layout" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/layout into .claude/skills/layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "layout", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/layoutType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add rshankras/claude-code-apple-skills --skill layout -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rshankras/claude-code-apple-skills layout --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/swiftui/layout .agents/skills/layout && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "layout" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/layout into .agents/skills/layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "layout", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rshankras/claude-code-apple-skills --skill layout -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rshankras/claude-code-apple-skills layout --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/swiftui/layout .cursor/skills/layout && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "layout" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/layout into .cursor/skills/layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "layout", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/rshankras/claude-code-apple-skills.git --path skills/swiftui/layout--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add rshankras/claude-code-apple-skills --skill layout -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rshankras/claude-code-apple-skills layout --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/swiftui/layout .gemini/skills/layout && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "layout" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/layout into .gemini/skills/layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "layout", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install rshankras/claude-code-apple-skills layoutInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add rshankras/claude-code-apple-skills --skill layout -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/swiftui/layout .github/skills/layout && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "layout" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/layout into .github/skills/layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "layout", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rshankras/claude-code-apple-skills --skill layout -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install rshankras/claude-code-apple-skills layout --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/swiftui/layout .opencode/skills/layout && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "layout" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/swiftui/layout into .opencode/skills/layout/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "layout", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
layoutSwiftUI layout beyond stacks — the Layout protocol (when custom layout beats GeometryReader), Grid vs lazy grids, custom containers with sections and container values, and lazy-stack/ScrollView…
Layout is an agent skill from rshankras/claude-code-apple-skills. SwiftUI layout beyond stacks — the Layout protocol (when custom layout beats GeometryReader), Grid vs lazy grids, custom containers with sections and container values, and lazy-stack/ScrollView performance rules (what breaks laziness, prefetch discipline, scroll APIs). Use when building custom layouts or containers, fixing lazy-stack jank or memory growth, or wiring programmatic/snapping scrolling.
Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Mobile, covering iOS development and Mobile performance. It works with SwiftUI. The repository describes itself as: Claude Code skills for Apple platform development (iOS, macOS, iPadOS) — product validation, code generation, App Store optimization, and more. The licence is MIT.
Read from SKILL.md and the folder at commit 9ffb831. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditGlobGrepFrom allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
developer.apple.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Layout loads about 1.8k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 734 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from rshankras/claude-code-apple-skills at commit 9ffb831, republished under its MIT licence (© rshankras). 734 words, ~1,791 tokens.
.claude/skills/layout/SKILL.md (or your agent's skills folder).The layer between "stacks and spacers" and "it scrolls like butter with 100k rows" — Apple's
Layout protocol, container composition, and the lazy-stack rules from the WWDC26 deep dive.
View identity/data-flow questions route to swiftui/data-flow.
Reach for a custom Layout whenever you must measure subviews and feed the measurement back
into layout — GeometryReader only measures its container and can't influence the engine.
Canonical case: equal-width buttons.
sizeThatFits: propose .unspecified to read each subview's ideal size
(subviews.map { $0.sizeThatFits(.unspecified) }); guard empty subviews;
replacingUnspecifiedDimensions() for nil proposal dimensions.placeSubviews: never assume origin (0,0) — use bounds.minX/midX (non-zero origins are
what make layouts composable); place(at:anchor:proposal:) with a proposal that may differ
from the ideal size (that's how equal widths happen).subviews[i].spacing.distance(to:along:), taking the larger
of conflicting preferences — matching built-in containers. No hardcoded 8s.LayoutValueKey (+ a layoutValue convenience modifier), read as
subview[Key.self].AnyLayout(HStackLayout()) ↔ custom layout with
.animation(_:value:) — SwiftUI sees one changing view, so state survives and it animates.ViewThatFits.| Need | Use |
|---|---|
| Static 2D with cross-row alignment | Grid/GridRow (+ gridCellColumns to span, gridColumnAlignment per column) |
| Scrollable, large content | LazyVGrid/LazyHGrid (only visible views load; one axis fixed up front) |
| "First arrangement that fits" | ViewThatFits |
Make containers that compose like List does:
@ViewBuilder var content: Content — callers can then mix static
views, ForEach, and conditionals.ForEach(subviews: content); need the whole collection
(count/chunking)? Group(subviews: content) { subviews in … }.if conditionally. Counting declared views is a bug.ForEach(sections: content), reading section.header /
section.content; check header.isEmpty before rendering the slot.extension ContainerValues { @Entry var … },
set with a convenience modifier, read via subview.containerValues. Scoping model:
Environment flows down · Preferences flow up · container values reach only the direct
container. Setting one on a Section styles the whole section.LazyVStack builds views only until the viewport fills; totals and offsets are estimated from average placed-view size and corrected as you scroll. Everything below follows from that:
if inside a row (0-or-1 views) forces the
stack to keep off-screen views + their @State alive to preserve indices — and environment
changes then re-evaluate off-screen bodies. Filter at the data layer (@Query predicate);
gate auth-type conditions outside the stack.onScrollGeometryChange sees
estimates) — use onScrollTargetVisibilityChange(threshold: 0.8) for visibility triggers.init, not onAppear (_model = State(initialValue:)): body runs during
prefetch; onAppear fires only on-screen, throwing prefetch work away and causing
post-appearance size jumps. Start async loads in init/task.@State — off-screen views are eventually
released. Hoist (@State var highlighted: Set<ID> outside, @Binding down).scrollTransition transforms must stay inside the original frame (scale ✅; rotations
escaping the frame make views vanish early).onGeometryChange height feedback (content shoves, targeting
breaks) — that's the custom Layout case above.LazyHStack inside LazyVStack freely (unscrolled rows stay unloaded) — but fix child
heights (lineLimit, explicit frames) in the horizontal stacks.pinnedViews: [.sectionHeaders] pins headers; infinite scroll = trailing
ProgressView().onAppear { fetchNextPage() } after the ForEach.scrollTargetLayout() + scrollTargetBehavior(.viewAligned/.paging).scrollPosition binding; programmatic ScrollPosition +
scrollTo(id:) — works for unloaded targets if IDs map to stable one-subview elements.scrollTransition (enter/leave viewport) and visualEffect
(geometry without GeometryReader) — details in design/animation-patterns.onScrollGeometryChange (fine outside lazy estimation),
onScrollVisibilityChange (autoplay/analytics).ScrollView+LazyVStack; profile with the
SwiftUI instrument (performance/swiftui-debugging).Layout review: Symptom | Rule violated | Fix — check the one-subview-per-element rule first
in any lazy-stack complaint; it explains most jank, memory growth, and targeting bugs.
swiftui/data-flow (identity/ForEach IDs), performance/swiftui-debugging, design/animation-patterns (scroll-linked effects)© rshankras, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/swiftui/layout of rshankras/claude-code-apple-skills.
Open the folder on GitHubat commit 9ffb831
Layout next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Layout this skillrshankras/claude-code-apple-skills | 781 | — | ~1.8k | Automated safety check: Pass | MIT | |
| Swift ExpertJeffallan/claude-skills | 12k | — | ~1.5k | Automated safety check: Pass | MIT | |
| Senior Mobileborghei/Claude-Skills | 874 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Swiftui Protwostraws/SwiftUI-Agent-Skill | 5k | 2 repos | ~1k | Automated safety check: Pass | MIT | |
| Swiftui UI PatternsAFK-surf/OpenBridge | 430 | 4 repos | ~887 | Automated safety check: Pass | MIT | |
| Swiftui Performance Auditharperreed/dotfiles | 334 | 8 repos | ~1.4k | Automated safety check: Pass | None |
Jeffallan/claude-skills
Builds Swift apps for Apple platforms with SwiftUI, protocol-oriented design, async/await, actors and Sendable checks, verified with swift build and swift test.
borghei/Claude-Skills
A skill your agent uses when the user asks to "build a mobile app", "scaffold React Native project", "create SwiftUI views", "set up Jetpack Compose", "optimize mobile performance", "configure Expo…
twostraws/SwiftUI-Agent-Skill
Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance.
AFK-surf/OpenBridge
Best practices and example-driven guidance for building SwiftUI views and components.
harperreed/dotfiles
Audit and improve SwiftUI runtime performance from code review and architecture.
raintree-technology/hig-doctor
Create or update a shared Apple design context document that other HIG skills use to tailor guidance.
rshankras/claude-code-apple-skills
Generate accessibility infrastructure for VoiceOver, Dynamic Type, and accessibility features.
rshankras/claude-code-apple-skills
SwiftUI animation patterns including springs, transitions, PhaseAnimator, KeyframeAnimator, SF Symbol effects, scroll-driven effects, mesh gradients, text renderers, and shader effects.
rshankras/claude-code-apple-skills
Generate compelling App Store descriptions that convert browsers into users.
rshankras/claude-code-apple-skills
Generates an app icon for macOS or iOS — a fast CoreGraphics placeholder and/or flat layered source art to finish in Icon Composer (the Liquid Glass / iOS 26+ standard).
rshankras/claude-code-apple-skills
Turn an app idea into validated, App-Store-ready name candidates.
rshankras/claude-code-apple-skills
Revenue beyond the single-app price tag — own-app bundles, Family Sharing as a conversion lever, cross-developer bundles & suites, and institutional licensing via Group Purchases / Apple School &…
Works with
Categories
SwiftUI layout beyond stacks — the Layout protocol (when custom layout beats GeometryReader), Grid vs lazy grids, custom containers with sections and container values, and lazy-stack/ScrollView…. Layout is an agent skill from rshankras/claude-code-apple-skills. SwiftUI layout beyond stacks — the Layout protocol (when custom layout beats GeometryReader), Grid vs lazy grids, custom containers with sections and container values, and lazy-stack/ScrollView performance rules (what breaks laziness, prefetch discipline, scroll APIs).
Layout fits situations like: building custom layouts; fixing lazy-stack jank; wiring programmatic/snapping scrolling.
Run `npx skills add rshankras/claude-code-apple-skills --skill layout -a claude-code`. Or copy the skill folder (skills/swiftui/layout in rshankras/claude-code-apple-skills) into .claude/skills/layout in your project. Claude Code loads it when a task matches its description.
Run `npx skills add rshankras/claude-code-apple-skills --skill layout -a codex`. Or copy the skill folder (skills/swiftui/layout in rshankras/claude-code-apple-skills) into .agents/skills/layout in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rshankras/claude-code-apple-skills --skill layout -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/layout, .gemini/skills/layout, .github/skills/layout and .opencode/skills/layout in your project.
SKILL.md names no scripts, command-line tools or credentials: Layout is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Glob, Grep.
SKILL.md names 1 domain. As links in the text: developer.apple.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Layout is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Layout: Swift Expert (Jeffallan/claude-skills, 12k stars), Senior Mobile (borghei/Claude-Skills, 874 stars), Swiftui Pro (twostraws/SwiftUI-Agent-Skill, 5k stars) and Swiftui UI Patterns (AFK-surf/OpenBridge, 430 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
rshankras (a GitHub user) maintains it in rshankras/claude-code-apple-skills, which has 781 GitHub stars. The repository holds 46 skills in this directory. The repository was last updated on July 24, 2026.
Source: rshankras/claude-code-apple-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.