ai-sdk
使用最新文件建置 AI SDK 功能
AI SDK API 變動很快,這可能會讓產生的程式碼過時。這項技能會引導 Claude、Codex 和 Claude Code 使用最新文件與遷移模式。
使用我的智慧代理安裝
將此請求複製給你的智慧代理,其中包含權威 Skill 頁面和清單。
Review the Skillstore skill "ai-sdk" from https://skillstore.io/skills/vercel-ai-sdk.md and its manifest at https://skillstore.io/api/skills/vercel-ai-sdk/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智慧代理仍應顯示其計畫,並依安全政策請求必要確認。
Agent 可讀資源
當 AI Agent、爬蟲或腳本需要乾淨脈絡、而不是讀取完整頁面時,請使用這些連結。
測試它
正在使用「ai-sdk」。 我需要一個使用 AI SDK 的 Next.js 聊天頁面。
預期結果:
簡短的實作計畫、目前的 useChat 指引、伺服器串流注意事項,以及變更後執行型別檢查的提醒。
正在使用「ai-sdk」。 我應該透過 AI Gateway 使用哪個 Anthropic 模型?
預期結果:
取得目前提供者模型清單、選擇最新且合適的模型,並避免依賴記憶中的模型 ID 的指示。
正在使用「ai-sdk」。 升級 useChat 後,我的工具結果轉譯失敗。
預期結果:
針對具型別工具片段、重新命名的狀態值,以及讀取工具輸入或輸出前所需正確檢查的診斷。
安全審計
安全Static analysis flagged hardcoded documentation URLs, placeholder environment-file examples, TypeScript relative imports, and Markdown backtick text. Review found no prompt injection, secret exfiltration, user-controlled command execution, or malicious intent in the scanned files.
風險因素
🌐 網路存取 (7)
🔑 環境變數 (1)
⚙️ 外部命令 (34)
分享與引用此報告
分享版本化評估報告、中性徽章、嵌入卡片與引用。Skillstore 只報告證據,不判斷該 Skill 是否安全。
複製報告連結
https://skillstore.io/skills/vercel-ai-sdk/audits/6?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/vercel-ai-sdk?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/vercel-ai-sdk?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/vercel-ai-sdk/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/vercel-ai-sdk.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>學術引用 (APA · BibTeX · CFF)
APA 引用
vercel. (2026). ai-sdk security audit report (audit version 6) [Author version unspecified]. Skillstore. https://skillstore.io/skills/vercel-ai-sdk/audits/6BibTeX 引用
@techreport{vercel-vercel-ai-sdk-2026,
author = {vercel},
title = {ai-sdk security audit report (audit version 6)},
institution = {Skillstore},
year = {2026},
number = {6},
url = {https://skillstore.io/skills/vercel-ai-sdk/audits/6},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "ai-sdk security audit report (audit version 6)"
version: "unspecified"
type: report
authors:
- name: "vercel"
date-released: "2026-07-09"
url: "https://skillstore.io/skills/vercel-ai-sdk/audits/6"
identifiers:
- type: other
value: "skillstore:vercel-ai-sdk:audit:6"
description: "Skillstore immutable audit report identifier"
Skillstore 評分
評分依據 證據置信度: 高你可以打造什麼
建置串流聊天
建立使用目前 useChat 和串流回應模式的聊天體驗。
標準化 AI Gateway 使用方式
選擇目前的提供者模型 ID,並在專案中設定 AI Gateway 模式。
遷移較舊的 AI SDK 程式碼
將已棄用的選項、訊息格式和工具片段處理更新為目前的 API。
試試這些提示
在進行變更之前,先驗證我任務所需的目前 AI SDK API。優先使用本機文件,必要時再使用 ai-sdk.dev。
使用目前的 AI SDK 模式建置串流聊天功能。撰寫用戶端程式碼前,先檢查常見的 useChat 錯誤。
檢閱這段 AI SDK 程式碼是否使用已棄用的 API,並將其更新為目前的模式。簡要說明每個遷移決策。
設計具型別安全 useChat 轉譯的 ToolLoopAgent。包含代理檔案、工具檔案和 UI 訊息型別應該放置的位置。
最佳實務
- 變更程式碼前,先在本機文件或 ai-sdk.dev 中驗證目前的 API。
- 選擇提供者模型前,先檢查目前的 AI Gateway 模型 ID。
- 實作 AI SDK 變更後,執行型別檢查。
避免
- 未查閱文件就依賴記憶中的 AI SDK API 名稱。
- 使用已棄用的 useChat 輸入處理常式或通用 tool-invocation 片段。
- 在專案實際需要之前就加入提供者套件。
常見問題
這項技能會撰寫 AI SDK 程式碼嗎?
它需要網際網路存取嗎?
它會自動安裝套件嗎?
哪些 AI 工具支援這項技能?
涵蓋哪些 AI SDK 主題?
它包含真實密鑰嗎?
開發者詳細資訊
作者
vercel授權
MIT
Skillstore 修訂
r1
版本提示
作者未聲明版本。
引用
0519034dad657fb1f7706e0550e962beeda73fdf
維護新鮮度
2026/7/18
使用量
10 次下載 · 202 次瀏覽
檔案結構