SwiftUIBackports is a Swift package that recreates selected newer SwiftUI APIs for older versions of Apple’s operating systems, using familiar names and behavior where practical. Swift developers use it to adopt newer interface patterns while keeping applications compatible with earlier iOS, macOS, tvOS, and watchOS releases. The catalogue entries include agents, instructions, and a discovery skill that help coding agents locate and use the available backports.
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 shaps80/SwiftUIBackports --skill swiftui-backportsgit clone --depth 1 https://github.com/shaps80/SwiftUIBackportsWrote 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/shaps80/swiftuibackports/swiftui-backports)<a href="https://agentmods.dev/skills/shaps80/swiftuibackports/swiftui-backports"><img src="https://agentmods.dev/badge/skills/shaps80/swiftuibackports/swiftui-backports/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/shaps80/swiftuibackports/swiftui-backports"><img src="https://agentmods.dev/badge/skills/shaps80/swiftuibackports/swiftui-backports.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00060 | $0.00559 |
| Opus 5 | $0.00030 | $0.00280 |
| Sonnet 5 | $0.00012 | $0.00112 |
| Haiku 4.5 | $0.00006 | $0.00056 |
Grade A, and why
swiftui-backports 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 13d 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 — 50 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SwiftUI Backports
When SwiftUI API is newer than the deployment target, check the bundled backport index before hand-rolling compatibility code or raising the target.
Workflow
-
Confirm the availability need.
- Use this for compiler availability errors, planned use of modern SwiftUI APIs, or user requests to support older OS versions.
- Find deployment target in
Package.swift,.xcodeproj/project.pbxproj,.xcconfig, or target settings.
-
Check whether
SwiftUIBackportsis available.- Search for
SwiftUIBackports,SwiftBackports, or existing.backportusage. - If absent, suggest adding
https://github.com/shaps80/SwiftUIBackportsonly when it fits the project. Do not add it unless asked.
- Search for
-
Search the index.
- Use
rg -i "<api-name>|<related-term>" references/Backports.jsonlfirst. - Read only matching JSONL records when possible; the first line is metadata, remaining lines are backport records.
- Match by
namefirst, then bykindandnamespace. - If the project has an installed
SwiftUIBackportscheckout, you may confirm against its source when uncertain.
- Use
-
Decide native vs backport.
- If target platform is marked
unavailable, do not suggest that backport. - If deployment target is lower than the entry's
deprecatedversion, use or suggest the backport. - If deployment target is at or above
deprecated, prefer native SwiftUI.
- If target platform is marked
-
Use the discovered API.
- View modifiers:
.backport.foo(...) - Types/views: usually
Backport.Foo; useBackport<Any>.Fooif the compiler needs the fully qualified namespace. - Environment values: use the indexed environment key, such as
@Environment(\.backportRequestReview).
- View modifiers:
-
If no index match exists, say no backport was found and choose another compatibility path.
Do not implement new SwiftUIBackports APIs from this skill. This is for consuming the library.
Example
sheetContent
.backport.presentationDetents([.medium, .large])
Backport.LabeledContent("", value: 0)
@Environment(\.backportRequestReview) private var requestReview
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 13d ago First seen · 50 lines · 60 tokens per session scan A 42501de2ccbc
swiftui-backports is a skill published in the GitHub repository shaps80/SwiftUIBackports (1,092 stars, last pushed 3mo ago), licensed MIT. It adds 60 tokens to every session and 559 once invoked, about $0.0003 per session on Opus 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-08-30.
Other skills, from other repositories
swift-expert
Expert-level Swift development for iOS, macOS with SwiftUI, Combine, and modern Swift 5.9+. Use when the user mentions iOS, macOS, SwiftUI, Combine, async await, or Apple platforms, or when the task involves Modern Swift Features, Basics and Optionals, Functions and Closures, or Structs and Classes.
ios-expert
Expert in iOS development with SwiftUI, UIKit, Combine, and Apple ecosystem integration. Use when the user mentions mobile, Swift, SwiftUI, UIKit, Apple platforms, or Xcode, or when the task involves iOS App Architecture, SwiftUI Fundamentals, UIKit Essentials, or Combine Framework.
ios-agent-skill
Expert iOS/Swift developer behavior for AI coding agents. Use when writing, reviewing, or refactoring Swift, SwiftUI, UIKit, or SwiftData code; when designing iOS app architecture (MVVM, Clean Architecture, coordinators, routing); when building UI that must meet Apple's Human Interface Guidelines, contrast, dark-mode…
ios-builder
Turn an Apple app idea into a concrete implementation using Swift, Apple technology references, release notes, and separately editable Icon Composer layers. Use for creating or extending native Apple apps; requires a coding environment for file edits and Xcode for iOS builds.
swift-architecture-skill
Swift iOS architecture guidance and playbooks for MVVM, MVI, TCA, Clean Architecture, VIPER, MVP, Coordinator, and Reactive patterns. Use when designing, implementing, refactoring, or reviewing the architecture of a SwiftUI or UIKit feature, module, or codebase.
antigravity-root
Enterprise-grade iOS development workflow for TTBaseUIKit-powered apps. Cross-functional product analysis | MVVM-C Architecture | UIKit + SwiftUI | TTViewCodable | TTBaseSUI | xcodebuild CLI Verification | Zero Regression | iOS 14+.