Agent skill

Swift AI SDK Upstream

by teunlao in teunlao/swift-ai-sdk

A skill your agent uses for Swift AI SDK upstream parity management: refresh or inspect Vercel AI SDK baselines, scan upstream package coverage, classify drift, plan provider/core/docs audits, land…

Apache-2.0Auto-check passedMobile

Install Swift AI SDK Upstream

skills CLI
$ npx skills add teunlao/swift-ai-sdk --skill swift-ai-sdk-upstream -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install teunlao/swift-ai-sdk swift-ai-sdk-upstream --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/teunlao/swift-ai-sdk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/swift-ai-sdk-upstream .claude/skills/swift-ai-sdk-upstream && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
swift-ai-sdk-upstream
GitHub stars
154
Token cost
~1.6k tokens
SKILL.md length
607 words
Files
8 (incl. scripts, references)
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses for Swift AI SDK upstream parity management: refresh or inspect Vercel AI SDK baselines, scan upstream package coverage, classify drift, plan provider/core/docs audits, land…

  • Works in 4 steps: Read upstream/UPSTREAM.md for the pinned… → Run or inspect the local component scan → Open… → …
  • Swift AI SDK upstream parity management: refresh
  • SKILL.md covers Authority Model, When This Skill Applies, Required First Steps and Scope Rules, plus 6 more sections
  • Runs JavaScript scripts from its folder; calls git, node and rg; reaches github.com

What it does

Swift AI SDK Upstream is an agent skill from teunlao/swift-ai-sdk. Use for Swift AI SDK upstream parity management: refresh or inspect Vercel AI SDK baselines, scan upstream package coverage, classify drift, plan provider/core/docs audits, land parity fixes with tests, and maintain generated local artifacts under .upstream/ plus durable evidence in upstream/.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including scripts and reference files (for example `agents/openai.yaml`, `references/artifacts.md` and `references/audit-slices.md`).

It sits in Mobile, covering iOS development. It works with Vercel AI SDK, Model Context Protocol, OpenAI and Vercel. The repository describes itself as: Unified AI SDK for Swift, bringing the power of Vercel AI SDK to Apple platforms. The licence is Apache-2.0.

When your agent uses it

  • Swift AI SDK upstream parity management: refresh
  • Inspect Vercel AI SDK baselines
  • Scan upstream package coverage
  • Plan provider/core/docs audits

Example prompts

  • “/swift-ai-sdk-upstream”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read upstream/UPSTREAM.md for the pinned baseline.
  2. Run or inspect the local component scan
  3. Open .upstream/current/component-catalog.md for the current coverage map.
  4. Pick exactly one audit scope before editing

What it can do on your machine

Read from SKILL.md and the folder at commit c82deb2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • node
    • rg
    • swift
    • pnpm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Swift AI SDK Upstream loads about 1.6k tokens when it runs, and up to ~3.4k if it reads all its reference files. Until then it costs about 79 tokens; SKILL.md has 607 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from teunlao/swift-ai-sdk at commit c82deb2, republished under its Apache-2.0 licence (© teunlao). 607 words, ~1,552 tokens.

Download SKILL.mdSave it as .claude/skills/swift-ai-sdk-upstream/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
swift-ai-sdk-upstream
description
Use for Swift AI SDK upstream parity management: refresh or inspect Vercel AI SDK baselines, scan upstream package coverage, classify drift, plan provider/core/docs audits, land parity fixes with tests, and maintain generated local artifacts under .upstream/ plus durable evidence in upstream/*.

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:
    bash
    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.

Refresh Protocol

Only refresh when the user asks for a refresh or the task requires a newer baseline.

Latest main:

bash
rm -rf external/vercel-ai-sdk
git clone --depth 1 https://github.com/vercel/ai external/vercel-ai-sdk
git -C external/vercel-ai-sdk rev-parse HEAD

Pinned tag or branch:

bash
rm -rf external/vercel-ai-sdk
git clone --branch <tag-or-branch> --depth 1 https://github.com/vercel/ai external/vercel-ai-sdk
git -C external/vercel-ai-sdk rev-parse HEAD

Specific commit:

bash
rm -rf external/vercel-ai-sdk
git clone --depth 1 https://github.com/vercel/ai external/vercel-ai-sdk
git -C external/vercel-ai-sdk fetch --depth 1 origin <sha>
git -C external/vercel-ai-sdk checkout <sha>
git -C external/vercel-ai-sdk rev-parse HEAD

After a refresh, update upstream/UPSTREAM.md, regenerate .upstream/current, and add a short upstream/PROGRESS.md note only when the baseline or shipped parity state meaningfully changed.

Audit Workflows

Provider Audit
  1. Read the upstream provider implementation, tests, and fixtures under external/vercel-ai-sdk/packages/<provider>/.
  2. Read the matching Swift implementation and tests.
  3. Use references/audit-slices.md as the checklist.
  4. Add or tighten Swift regressions near the changed boundary.
  5. Fix the minimal owner-level Swift code required for parity.
  6. Run targeted tests, then AGENT=1 swift test unless the user explicitly narrows verification.
  7. Update upstream/providers/<provider>.md with:
    • audited commit;
    • verified contracts;
    • Swift and upstream evidence paths;
    • gaps or intentional deviations.
Show full SKILL.md (221 more words)Show less
Core Audit

Use only for packages/ai, packages/provider, packages/provider-utils, or core contracts required by a provider.

  1. Define the exact upstream contract.
  2. Read upstream implementation and nearest tests.
  3. Read Swift owner code and tests.
  4. Add or tighten tests under the matching Swift test target.
  5. Fix the owner-level contract.
  6. Record evidence in upstream/PROGRESS.md; if provider-driven, also update the relevant provider page.
Docs Audit

Use only when the task is docs work or a behavior change needs docs.

  1. Copy from external/vercel-ai-sdk/content/**.
  2. Adapt for Swift and Starlight in apps/docs/src/content/docs/**.
  3. Update navigation in apps/docs/astro.config.mjs when needed.
  4. Run pnpm run docs:check and pnpm run docs:build.

Status Vocabulary

Use the statuses from references/component-taxonomy.md:

  • unknown
  • mapped
  • partial
  • verified
  • stale
  • drift
  • n/a

Do not mark a component verified without an audited commit and concrete Swift test/source evidence.

Bundled References

  • references/component-taxonomy.md: areas, priorities, status meanings, and package classification.
  • references/audit-slices.md: provider/core/docs audit checklist.
  • references/artifacts.md: generated artifact contract for .upstream/**.
  • templates/component-status.md: durable component/provider status template.
  • templates/work-item.md: generated work queue item template.

Fast Commands

bash
node .agents/skills/swift-ai-sdk-upstream/scripts/scan-upstream.js --out .upstream/current
rg -n "<symbol>" external/vercel-ai-sdk/packages -S
rg -n "<symbol>" Sources Tests -S
AGENT=1 swift test
node tools/test-runner.js --config tools/test-runner.default.config.json

Done Criteria

  • The selected scope has a named owner.
  • The audited upstream commit is explicit.
  • Swift behavior matches the intended upstream contract or a deviation is documented.
  • Tests cover the contract.
  • Generated .upstream/** artifacts were used only as local working state.
  • Durable evidence in upstream/* was updated when parity state changed.

© teunlao, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts, references) in .agents/skills/swift-ai-sdk-upstream of teunlao/swift-ai-sdk.

  • SKILL.md
  • agents/openai.yaml
  • references/artifacts.md
  • references/audit-slices.md
  • references/component-taxonomy.md
  • scripts/scan-upstream.js
  • templates/component-status.md
  • templates/work-item.md

Open the folder on GitHubat commit c82deb2

Compare with similar skills

Swift AI SDK Upstream next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Swift AI SDK Upstream compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Swift AI SDK Upstream this skillteunlao/swift-ai-sdk154—~1.6kAutomated safety check: PassApache-2.0
AgentSquad for Swift2FastLabs/agent-squad7.8k—~3.5kAutomated safety check: PassApache-2.0
AI SDKvercel-labs/ai-facts16820 repos~1.2kAutomated safety check: PassNone
Neurolink Guidejuspay/neurolink145—~1.4kAutomated safety check: PassMIT
Agent Inspectrajudandigam/agent-inspect165—~424Automated safety check: PassMIT
GitHub Commentingjuspay/neurolink145—~698Automated safety check: PassMIT

Similar skills

  • AgentSquad for Swift

    2FastLabs/agent-squad

    Guides building on-device multi-agent apps in Swift with the AgentSquad framework: which agent, orchestrator, classifier, storage or voice type fits each situation.

    7.8k GitHub stars~3.5k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • AI SDK

    vercel-labs/ai-facts

    Official

    Answer questions about the AI SDK and help build AI-powered features.

    168 GitHub starsUsed in 20 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Neurolink Guide

    juspay/neurolink

    Guide for using the NeuroLink SDK and CLI. An agent skill from juspay/neurolink.

    145 GitHub stars~1.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Agent Inspect

    rajudandigam/agent-inspect

    Local evidence debugger and trajectory-test toolkit for TypeScript AI agents.

    165 GitHub stars~424 tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • GitHub Commenting

    juspay/neurolink

    How to post clean, rich, deduplicated GitHub PR review comments — suggestion blocks, multi-line anchors, markers, formatting rules.

    145 GitHub stars~698 tokensUpdated today
    DevelopmentAuto-check passed
  • Repo Conventions

    juspay/neurolink

    NeuroLink's review standards — the critical rules to enforce, what NOT to comment on, the security bar, hot paths.

    145 GitHub stars~1.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

Categories

Questions about Swift AI SDK Upstream

What does Swift AI SDK Upstream do?

A skill your agent uses for Swift AI SDK upstream parity management: refresh or inspect Vercel AI SDK baselines, scan upstream package coverage, classify drift, plan provider/core/docs audits, land…. Swift AI SDK Upstream is an agent skill from teunlao/swift-ai-sdk.upstream/ plus durable evidence in upstream/.

When should I use Swift AI SDK Upstream?

Swift AI SDK Upstream fits situations like: swift AI SDK upstream parity management: refresh; inspect Vercel AI SDK baselines; scan upstream package coverage; plan provider/core/docs audits.

How do I install Swift AI SDK Upstream in Claude Code?

Run `npx skills add teunlao/swift-ai-sdk --skill swift-ai-sdk-upstream -a claude-code`. Or copy the skill folder (.agents/skills/swift-ai-sdk-upstream in teunlao/swift-ai-sdk) into .claude/skills/swift-ai-sdk-upstream in your project. Claude Code loads it when a task matches its description.

How do I install Swift AI SDK Upstream in Codex?

Run `npx skills add teunlao/swift-ai-sdk --skill swift-ai-sdk-upstream -a codex`. Or copy the skill folder (.agents/skills/swift-ai-sdk-upstream in teunlao/swift-ai-sdk) into .agents/skills/swift-ai-sdk-upstream in your project. Codex loads it when a task matches its description.

Can I use Swift AI SDK Upstream in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add teunlao/swift-ai-sdk --skill swift-ai-sdk-upstream -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swift-ai-sdk-upstream, .gemini/skills/swift-ai-sdk-upstream, .github/skills/swift-ai-sdk-upstream and .opencode/skills/swift-ai-sdk-upstream in your project.

What does Swift AI SDK Upstream need to run?

Going by SKILL.md and its folder, Swift AI SDK Upstream needs JavaScript for the scripts in its folder and the command-line tools its instructions call (git, node, rg, swift and pnpm). Our summary lists: Node.js.

Does Swift AI SDK Upstream access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Swift AI SDK Upstream safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Swift AI SDK Upstream use?

Swift AI SDK Upstream is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Swift AI SDK Upstream use?

About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Swift AI SDK Upstream?

Skills that share tags, products or a category with Swift AI SDK Upstream: AgentSquad for Swift (2FastLabs/agent-squad, 7.8k stars), AI SDK (vercel-labs/ai-facts, 168 stars), Neurolink Guide (juspay/neurolink, 145 stars) and Agent Inspect (rajudandigam/agent-inspect, 165 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Swift AI SDK Upstream?

teunlao (a GitHub user) maintains it in teunlao/swift-ai-sdk, which has 154 GitHub stars. The repository was last updated on October 5, 2026.

Source: teunlao/swift-ai-sdk on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.