Borrowing it
Nothing to install: this file belongs to teunlao/swift-ai-sdk. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/teunlao/swift-ai-sdk/main/.agents/skills/swift-ai-sdk-upstream/SKILL.mdgit clone --depth 1 https://github.com/teunlao/swift-ai-sdkWrote 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/teunlao/swift-ai-sdk/swift-ai-sdk-upstream)<a href="https://agentmods.dev/skills/teunlao/swift-ai-sdk/swift-ai-sdk-upstream"><img src="https://agentmods.dev/badge/skills/teunlao/swift-ai-sdk/swift-ai-sdk-upstream/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/teunlao/swift-ai-sdk/swift-ai-sdk-upstream"><img src="https://agentmods.dev/badge/skills/teunlao/swift-ai-sdk/swift-ai-sdk-upstream.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.00047 | $0.00470 |
| Opus 5.5 | $0.00019 | $0.00188 |
| Sonnet 5.5 | $0.00009 | $0.00094 |
| Haiku 4.5 | $0.00005 | $0.00047 |
Grade A, and why
swift-ai-sdk-upstream 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 20d 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.
What it actually says
Porting upstream into Swift
The goal is behavioral parity with vercel/ai: request shape, response and stream parsing, errors, options, defaults, callback order. Names and types follow Swift idiom; TypeScript layout is not copied.
Reading upstream
external/vercel-ai-sdk is a read-only clone. Never check it out or edit it; read a commit directly:
U=external/vercel-ai-sdk
git -C $U show <sha>:packages/<pkg>/src/<file>
git -C $U ls-tree -r --name-only <sha> packages/<pkg>/src
git -C $U diff <from>..<to> -- packages/<pkg>/src
git -C $U log --no-merges --oneline <from>..<to> -- packages/<pkg>/src
A commit missing from the clone is fetched with git -C $U fetch origin <sha>.
Porting a package
- Read upstream's exported surface (
src/index.ts) and the implementation behind it at the target commit. - Read the Swift target that owns it (
Sources/AISDKProvider,AISDKProviderUtils,SwiftAISDK,<Name>Provider). - Port every observable difference at its owner. Skip upstream code serving only JS frameworks, workflow, harness or code mode.
- Test the boundary each change moves: the HTTP request, the parsed response, the stream order, the thrown error. Fixtures live in
Tests/**/Fixtures; nothing inSourcesorTestsreadsexternal/. - Run the target's tests, then
swift test --num-workers 3before handing off.
Where the record lives
The Tagma graph: the task carries what was ported and skipped, a #note on the Swift code records a deliberate departure from upstream and its reason. upstream/UPSTREAM.md holds only the pinned commit; it moves when a whole refresh lands.
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.
- 20d ago Changed · -144 lines · -15 tokens per session scan C → A 5edc2cc92080
- 2mo ago First seen · 179 lines · 62 tokens per session scan C 02f5a34cfebd
swift-ai-sdk-upstream is a skill published in the GitHub repository teunlao/swift-ai-sdk (156 stars, last pushed 20d ago), licensed Apache-2.0. It adds 47 tokens to every session and 470 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.
swift-ai-sdk-upstream compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| swift-ai-sdk-upstreamteunlao/swift-ai-sdk | Skill | 156 | 20d ago | Apache-2.0 | A | 47 | Codex |
| kotlin-exposed-patternshashgraph-online/awesome-codex-plugins | Skill | 1.5k | yesterday | Apache-2.0 | A | 36 | Claude Code, Codex |
| kotlin-ktor-patternshashgraph-online/awesome-codex-plugins | Skill | 1.5k | yesterday | Apache-2.0 | A | 34 | Claude Code, Codex |
| android-clean-architecturehashgraph-online/awesome-codex-plugins | Skill | 1.5k | yesterday | Apache-2.0 | A | 34 | Claude Code, Codex |
| kotlin-coroutines-flowshashgraph-online/awesome-codex-plugins | Skill | 1.5k | yesterday | Apache-2.0 | A | 35 | Claude Code, Codex |
| swift-concurrencyAvdLee/Swift-Concurrency-Agent-Skill | Skill | 1.7k | 1mo ago | MIT | A | 56 | Claude Code, Codex |
| vapor-backendj4flmao/agent-skills | Skill | 38 | 3d ago | MIT | A | 75 | Claude Code, Codex |