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 62 tokens per session (1,458 once invoked), scanned C, 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 →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node tools/test-runner.js --config tools/test-runner.default.config.json.

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 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,458 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00062 $0.01458
Opus 5 $0.00031 $0.00729
Sonnet 5 $0.00012 $0.00292
Haiku 4.5 $0.00006 $0.00146

Measured 11d ago against content hash 02f5a34cfebd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade C, and why

swift-ai-sdk-upstream scanned grade C with 1 finding 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 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/scan-upstream.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf external/vercel-ai-sdk
.agents/skills/swift-ai-sdk-upstream/SKILL.md · 179 lines

How it starts

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

Swift AI SDK Upstream Parity

This skill is the operating protocol for keeping Swift AI SDK aligned with the Vercel AI SDK. It is not only a "refresh upstream" helper; it manages intake, coverage mapping, drift triage, audits, fixes, tests, and evidence.

Authority Model

  • Tracked process source: this skill directory.
  • Durable parity evidence: upstream/UPSTREAM.md, upstream/PROGRESS.md, and upstream/providers/*.md.
  • Generated working artifacts: .upstream/**. These are local scratch artifacts and must stay gitignored.
  • Upstream reference checkout: external/vercel-ai-sdk. Treat it as read-only during audits.

Use generated .upstream/** files to decide what to inspect next. Do not cite a generated artifact as final proof unless it is backed by source paths, tests, and durable evidence.

When This Skill Applies

Use this skill when the user asks to:

  • update or refresh upstream Vercel AI SDK;
  • understand current upstream drift;
  • audit provider/core/docs parity;
  • add or repair provider behavior;
  • update upstream/* evidence;
  • generate or read upstream package coverage/status reports.

Required First Steps

  1. Read upstream/UPSTREAM.md for the pinned baseline.
  2. Run or inspect the local component scan:
    node .agents/skills/swift-ai-sdk-upstream/scripts/scan-upstream.js --out .upstream/current
    
  3. Open .upstream/current/component-catalog.md for the current coverage map.
  4. Pick exactly one audit scope before editing:
    • core:<package>
    • provider:<package>
    • docs:<section>
    • intake:<baseline>

Scope Rules

  • Prefer provider-first vertical slices.
  • Touch core only when a provider or public API contract requires it.
  • Match observable behavior contracts: request shape, response parsing, streaming order, errors, tools, provider options, usage, defaults, and tests.
  • Do not chase line-by-line TypeScript diffs for their own sake.
  • Do not use parity/*; this repo tracks parity through upstream/*.
  • Do not store generated reports, work queues, or scan snapshots in git.

Read the full file on GitHub · 179 lines

Files

What ships with it

7 files 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. 11d 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 (151 stars, last pushed yesterday), licensed Apache-2.0. It adds 62 tokens to every session and 1,458 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

kotlin-exposed-patterns

JetBrains Exposed ORM patterns including DSL queries, DAO pattern, transactions, HikariCP connection pooling, Flyway migrations, and repository pattern.

hashgraph-online/awesome-codex-plugins · 36 tokens

kotlin-ktor-patterns

Ktor server patterns including routing DSL, plugins, authentication, Koin DI, kotlinx.serialization, WebSockets, and testApplication testing.

hashgraph-online/awesome-codex-plugins · 34 tokens

kotlin-coroutines-flows

Kotlin Coroutines and Flow patterns for Android and KMP — structured concurrency, Flow operators, StateFlow, error handling, and testing.

hashgraph-online/awesome-codex-plugins · 35 tokens

swift-concurrency

Diagnose Swift Concurrency issues, refactor callback-based code to async/await, and guide Swift 6 migration when working with tasks, actors, @MainActor, Sendable, data races, thread safety, or concurrency-related compiler and linter warnings.

AvdLee/Swift-Concurrency-Agent-Skill · 56 tokens

swift-testing-expert

Expert guidance for Swift Testing: test structure, #expect/#require macros, traits and tags, parameterized tests, test plans, parallel execution, async waiting patterns, and XCTest migration. Use when writing new Swift tests, modernizing XCTest suites, debugging flaky tests, or improving test quality and…

AvdLee/Swift-Testing-Agent-Skill · 73 tokens

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.

personamanagmentlayer/pcl · 76 tokens