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.5 | $0.00024 | $0.00224 |
| Sonnet 5.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 2mo 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.
- 2mo 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,100 stars, last pushed 4mo ago), licensed MIT. It adds 60 tokens to every session and 559 once invoked, about $0.0002 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-08-30.
swiftui-backports compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| swiftui-backportsshaps80/SwiftUIBackports | Skill | 1.1k | 4mo ago | MIT | A | 60 | Claude Code, Codex |
| 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-agent-skillNagarjuna2997/ios-agent-skill | Skill | 40 | 8d ago | MIT | A | 167 | Claude Code |
| ios-builderNagarjuna2997/ios-agent-skill | Skill | 40 | 8d ago | MIT | A | 53 | Claude Code, Codex |
| swift-architecture-skillefremidze/swift-architecture-skill | Skill | 81 | 1mo ago | MIT | A | 65 | Claude Code |
| using-xtool2389-research/xtool | Skill | 5 | 4d ago | MIT | A | 100 | Claude Code |