swift-ai-sdk: Skill for Codex

.agents/skills/swift-ai-sdk-upstream/SKILL.md

swift-ai-sdk-upstream is a skill for Codex from teunlao/swift-ai-sdk. It costs 47 tokens per session (470 once invoked), scanned A, original, Apache-2.0.

A workflow for keeping a Swift AI SDK aligned with the Vercel AI SDK, a JavaScript and TypeScript toolkit for AI applications. It covers comparing upstream changes, finding missing behavior, auditing providers and documentation, and recording evidence.

In plain words
What is it for?
Use it to refresh upstream references, inspect package coverage, classify differences, audit providers or core code, implement parity fixes, and run related tests.
Why use it?
It helps identify where the Swift implementation has drifted from the upstream project and keeps the review process traceable. It also separates temporary generated files from durable audit records.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

This is teunlao/swift-ai-sdk's own configuration. It tells Codex how to work on swift-ai-sdk itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything swift-ai-sdk configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/teunlao/swift-ai-sdk/main/.agents/skills/swift-ai-sdk-upstream/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/teunlao/swift-ai-sdk

Made for: Codex.

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 swift-ai-sdk-upstream

README.md
[![agentmods](https://agentmods.dev/badge/skills/teunlao/swift-ai-sdk/swift-ai-sdk-upstream/github.svg)](https://agentmods.dev/skills/teunlao/swift-ai-sdk/swift-ai-sdk-upstream)
Your own site
<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.

agentmods 80×15 button for swift-ai-sdk-upstream

Your own site · 80×15
<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>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 470 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.00047 $0.00470
Opus 5.5 $0.00019 $0.00188
Sonnet 5.5 $0.00009 $0.00094
Haiku 4.5 $0.00005 $0.00047

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

Security

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.

.agents/skills/swift-ai-sdk-upstream/SKILL.md · 35 lines

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

  1. Read upstream's exported surface (src/index.ts) and the implementation behind it at the target commit.
  2. Read the Swift target that owns it (Sources/AISDKProvider, AISDKProviderUtils, SwiftAISDK, <Name>Provider).
  3. Port every observable difference at its owner. Skip upstream code serving only JS frameworks, workflow, harness or code mode.
  4. Test the boundary each change moves: the HTTP request, the parsed response, the stream order, the thrown error. Fixtures live in Tests/**/Fixtures; nothing in Sources or Tests reads external/.
  5. Run the target's tests, then swift test --num-workers 3 before 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.

Files

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.

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. 20d ago Changed · -144 lines · -15 tokens per session scan C → A 5edc2cc92080
  2. 2mo ago First seen · 179 lines · 62 tokens per session scan C 02f5a34cfebd

Subscribe to this mod's changes

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.

Related

swift-ai-sdk-upstream compared with skills from other repositories

swift-ai-sdk-upstream next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
swift-ai-sdk-upstreamteunlao/swift-ai-sdkSkill15620d agoApache-2.0A47Codex
kotlin-exposed-patternshashgraph-online/awesome-codex-pluginsSkill1.5kyesterdayApache-2.0A36Claude Code, Codex
kotlin-ktor-patternshashgraph-online/awesome-codex-pluginsSkill1.5kyesterdayApache-2.0A34Claude Code, Codex
android-clean-architecturehashgraph-online/awesome-codex-pluginsSkill1.5kyesterdayApache-2.0A34Claude Code, Codex
kotlin-coroutines-flowshashgraph-online/awesome-codex-pluginsSkill1.5kyesterdayApache-2.0A35Claude Code, Codex
swift-concurrencyAvdLee/Swift-Concurrency-Agent-SkillSkill1.7k1mo agoMITA56Claude Code, Codex
vapor-backendj4flmao/agent-skillsSkill383d agoMITA75Claude Code, Codex