swiftui

swiftui is a skill for Claude Code from rshankras/claude-code-apple-skills. It costs 70 tokens per session (626 once invoked), scanned A, original, MIT.

A collection of guides for building SwiftUI apps, Apple's system for describing app screens in Swift code. It covers state and rendering, custom layouts, alarms, charts, rich text, toolbars, and embedded web content.

In plain words
What is it for?
Use it when building or debugging SwiftUI interfaces, including layouts, scrolling, state, toolbars, styled text, alarms, charts, and web views.
Why use it?
It gives one place to choose focused guidance for common SwiftUI tasks instead of searching across unrelated examples. The included topics cover both everyday interface work and newer platform APIs.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the apple-skills plugin — 182 skills shipped together , and of apple-skills

Good fit Use it when building or debugging SwiftUI interfaces, including layouts, scrolling, state, toolbars, styled text, alarms, charts, and web views.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rshankras/claude-code-apple-skills/swiftui
Install

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.

Any agent
npx skills add rshankras/claude-code-apple-skills --skill swiftui
Clone the repo
git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills

Made for: Claude Code.

Or install apple-skills, the plugin that ships this one along with the rest of its 182 skills.

Wrote 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.

agentmods badge for swiftui

README.md
[![agentmods](https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/swiftui/github.svg)](https://agentmods.dev/skills/rshankras/claude-code-apple-skills/swiftui)
Your own site
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/swiftui"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/swiftui/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.

agentmods 80×15 button for swiftui

Your own site · 80×15
<a href="https://agentmods.dev/skills/rshankras/claude-code-apple-skills/swiftui"><img src="https://agentmods.dev/badge/skills/rshankras/claude-code-apple-skills/swiftui.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 626 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00070 $0.00626
Opus 5.5 $0.00028 $0.00250
Sonnet 5.5 $0.00014 $0.00125
Haiku 4.5 $0.00007 $0.00063

Measured 2d ago against content hash a78b1b2ed3a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

swiftui 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.

skills/swiftui/SKILL.md · 46 lines

How it starts

The opening of the file, as written. The whole thing — 46 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SwiftUI Skills

Focused SwiftUI framework skills — each sub-skill covers one API area in depth.

When This Skill Activates

Use this skill when the user:

  • Has state/rendering bugs: state resets, over-rendering, flashing lists, animation crossfades (data-flow)
  • Is choosing @State vs @Bindable vs @Environment or migrating to Observation (data-flow)
  • Builds custom layouts or containers, or fights lazy-stack/scroll performance (layout)
  • Wants alarms or timers with AlarmKit (custom UI, Live Activities, snooze)
  • Is creating 3D data visualizations with Swift Charts (Chart3D, SurfacePlot)
  • Needs styled text or rich text editing (Text, AttributedString, TextEditor)
  • Is implementing or customizing toolbars (customizable toolbars, search integration)
  • Wants to embed web content (WebView, WebPage, JavaScript interop)

Available Skills

Paths are relative to THIS file's directory — skills run with cwd set to the user's project, so resolve each path from this SKILL.md's own location.

Skill Read Covers
data-flow data-flow/SKILL.md View identity/lifetime/dependencies, Observation, state ownership, body discipline, main-actor contract
layout layout/SKILL.md Layout protocol, Grid decisions, custom containers, lazy-stack + scrolling performance rules
alarmkit alarmkit/SKILL.md Alarms and timers with custom UI, Live Activities, snooze (iOS 18+)
charts-3d charts-3d/SKILL.md Chart3D, SurfacePlot, interactive pose control, surface styling
text-editing text-editing/SKILL.md Text, AttributedString, TextEditor with formatting controls
toolbars toolbars/SKILL.md Customizable toolbars, search integration, transition effects, platform behavior
webkit webkit/SKILL.md WebView and WebPage embedding, navigation, JavaScript interop

How to Route

  1. Match the request to a row above.
  2. Read that SKILL.md (relative to this file) plus any reference files it lists.
  3. Apply the guidance to the user's code.

Read the full file on GitHub · 46 lines

Changes

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.

  1. 2d ago First seen · 46 lines · 70 tokens per session scan A a78b1b2ed3a4

Subscribe to this mod's changes

swiftui is a skill published in the GitHub repository rshankras/claude-code-apple-skills (864 stars, last pushed 2d ago), licensed MIT. It adds 70 tokens to every session and 626 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.

Related

swiftui compared with skills from other repositories

swiftui next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
swiftuirshankras/claude-code-apple-skillsSkill8642d agoMITA70Claude Code
swift-expertpersonamanagmentlayer/pclSkill4411d agoApache-2.0A76Claude Code
ios-expertpersonamanagmentlayer/pclSkill4411d agoApache-2.0A64Claude Code
ios-swiftui-productJasonColapietro/ios-app-dev-skillsSkill92mo agoMITA67Codex
swiftui-maxDev869/swift-tothemaxSkill74mo agoMITA271Claude Code
apple-dev-conductorDev869/swift-tothemaxSkill74mo agoMITA156Claude Code
kotlin-patternssoftspark/ai-toolkitSkill17910d agoApache-2.0A51Claude Code