Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add rshankras/claude-code-apple-skills --skill layoutgit clone --depth 1 https://github.com/rshankras/claude-code-apple-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/layout)<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/layout"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/layout/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/layout"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/layout.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00078 | $0.01716 |
| Opus 5.5 | $0.00031 | $0.00686 |
| Sonnet 5.5 | $0.00016 | $0.00343 |
| Haiku 4.5 | $0.00008 | $0.00172 |
Grade A, and why
layout scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 118 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SwiftUI Layout & Containers
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.
When This Skill Activates
- "Make these buttons equal width" / measurement-dependent layout
- Building a reusable container (custom List/board/carousel) that should accept ForEach + sections
- Lazy stack jank, memory growth, scroll-position bugs, broken scroll targeting
- Programmatic scrolling, paging/snapping, scroll-linked effects
- GeometryReader causing layout loops or mangled sizing
Custom Layout protocol (not GeometryReader)
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.unspecifiedto 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) — usebounds.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).- Respect spacing preferences:
subviews[i].spacing.distance(to:along:), taking the larger of conflicting preferences — matching built-in containers. No hardcoded 8s. - Per-subview data via
LayoutValueKey(+ alayoutValueconvenience modifier), read assubview[Key.self]. - Cache only after Instruments shows layout cost — it's an optimization, not a requirement.
- Switch layouts without killing identity:
AnyLayout(HStackLayout())↔ custom layout with.animation(_:value:)— SwiftUI sees one changing view, so state survives and it animates. - Don't build fallbacks into the layout — wrap alternatives in
ViewThatFits.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 118 lines · 78 tokens per session scan A b25bce8fc57b
layout is a skill published in the GitHub repository rshankras/claude-code-apple-skills (864 stars, last pushed 2d ago), licensed MIT. It adds 78 tokens to every session and 1,716 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-05.
layout compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| layoutrshankras/claude-code-apple-skills | Skill | 864 | 2d ago | MIT | A | 78 | Claude Code |
| swift-expertpersonamanagmentlayer/pcl | Skill | 44 | 11d ago | Apache-2.0 | A | 76 | Claude Code |
| ios-expertpersonamanagmentlayer/pcl | Skill | 44 | 11d ago | Apache-2.0 | A | 64 | Claude Code |
| ios-swiftui-productJasonColapietro/ios-app-dev-skills | Skill | 9 | 2mo ago | MIT | A | 67 | Codex |
| swiftui-maxDev869/swift-tothemax | Skill | 7 | 4mo ago | MIT | A | 271 | Claude Code |
| apple-dev-conductorDev869/swift-tothemax | Skill | 7 | 4mo ago | MIT | A | 156 | Claude Code |
| kotlin-patternssoftspark/ai-toolkit | Skill | 179 | 10d ago | Apache-2.0 | A | 51 | Claude Code |