AI SDK
vercel-labs/ai-facts
Answer questions about the AI SDK and help build AI-powered features.
xsAI SDK v0.4.x API reference - extra-small AI SDK with OpenAI-compatible API
$ npx skills add yusixian/moe-copy-ai --skill xsai-sdk -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install yusixian/moe-copy-ai xsai-sdk --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/yusixian/moe-copy-ai.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/xsai .claude/skills/xsai-sdk && rm -rf skills-srcUse ~/.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/
Install the "xsai-sdk" agent skill from https://github.com/yusixian/moe-copy-ai/tree/dev/.claude/skills/xsai into .claude/skills/xsai-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "xsai-sdk", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/yusixian/moe-copy-ai/tree/dev/.claude/skills/xsaiType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add yusixian/moe-copy-ai --skill xsai-sdk -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install yusixian/moe-copy-ai xsai-sdk --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/yusixian/moe-copy-ai.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/xsai .agents/skills/xsai-sdk && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "xsai-sdk" agent skill from https://github.com/yusixian/moe-copy-ai/tree/dev/.claude/skills/xsai into .agents/skills/xsai-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "xsai-sdk", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add yusixian/moe-copy-ai --skill xsai-sdk -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install yusixian/moe-copy-ai xsai-sdk --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/yusixian/moe-copy-ai.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/xsai .cursor/skills/xsai-sdk && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "xsai-sdk" agent skill from https://github.com/yusixian/moe-copy-ai/tree/dev/.claude/skills/xsai into .cursor/skills/xsai-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "xsai-sdk", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/yusixian/moe-copy-ai.git --path .claude/skills/xsai--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add yusixian/moe-copy-ai --skill xsai-sdk -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install yusixian/moe-copy-ai xsai-sdk --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/yusixian/moe-copy-ai.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/xsai .gemini/skills/xsai-sdk && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "xsai-sdk" agent skill from https://github.com/yusixian/moe-copy-ai/tree/dev/.claude/skills/xsai into .gemini/skills/xsai-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "xsai-sdk", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install yusixian/moe-copy-ai xsai-sdkInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add yusixian/moe-copy-ai --skill xsai-sdk -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/yusixian/moe-copy-ai.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/xsai .github/skills/xsai-sdk && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "xsai-sdk" agent skill from https://github.com/yusixian/moe-copy-ai/tree/dev/.claude/skills/xsai into .github/skills/xsai-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "xsai-sdk", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add yusixian/moe-copy-ai --skill xsai-sdk -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install yusixian/moe-copy-ai xsai-sdk --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/yusixian/moe-copy-ai.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/xsai .opencode/skills/xsai-sdk && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "xsai-sdk" agent skill from https://github.com/yusixian/moe-copy-ai/tree/dev/.claude/skills/xsai into .opencode/skills/xsai-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "xsai-sdk", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
xsai-sdkxsAI SDK v0.4.x API reference - extra-small AI SDK with OpenAI-compatible API
Xsai SDK is an agent skill from yusixian/moe-copy-ai. xsAI SDK v0.4.x API reference - extra-small AI SDK with OpenAI-compatible API
Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 50 other files, including reference files (for example `references/docs/Chat.md`, `references/docs/Composio.md` and `references/docs/Embeddings.md`).
It sits in Data & Analytics. It works with Vercel AI SDK, OpenAI, React and Tailwind CSS. The licence is AGPL-3.0.
Read from SKILL.md and the folder at commit 3d2834d. It shows what the files ask for, not the result of running them.
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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).
From the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
api.openai.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Xsai SDK loads about 1.1k tokens when it runs, and up to ~44k if it reads all its reference files. Until then it costs about 22 tokens; SKILL.md has 134 words of instructions outside code blocks.
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.
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); files beside SKILL.md are not scanned.
The full file from yusixian/moe-copy-ai at commit 3d2834d, republished under its AGPL-3.0 licence (© yusixian). 134 words, ~1,138 tokens.
.claude/skills/xsai-sdk/SKILL.md (or your agent's skills folder). This skill also uses 48 other files; get the full folder from GitHub.xsAI is an extra-small AI SDK with OpenAI-compatible API interface, similar to Vercel AI SDK but much smaller.
Project packages: @xsai/generate-text, @xsai/stream-text, @xsai/model
import { streamText } from "@xsai/stream-text"
// NOTE: streamText is SYNCHRONOUS (not async) in 0.4.x
const { textStream } = streamText({
apiKey: "...",
baseURL: "https://api.openai.com/v1/",
model: "gpt-4o",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Hello" },
],
streamOptions: { includeUsage: true },
})
// textStream is a ReadableStream<string>, supports async iteration
for await (const textPart of textStream) {
console.log(textPart)
}Types:
interface StreamTextResult {
textStream: ReadableStream<string>
fullStream: ReadableStream<StreamTextEvent>
reasoningTextStream: ReadableStream<string>
messages: Promise<Message[]>
steps: Promise<CompletionStep[]>
usage: Promise<undefined | Usage>
totalUsage: Promise<undefined | Usage>
}
interface StreamTextOptions extends ChatOptions {
maxSteps?: number // default: 1
onEvent?: (event: StreamTextEvent) => Promise<unknown> | unknown
onFinish?: (step?: CompletionStep) => Promise<unknown> | unknown
onStepFinish?: (step: CompletionStep) => Promise<unknown> | unknown
streamOptions?: { includeUsage?: boolean }
}
// StreamTextEvent replaces the old StreamTextChunkResult
type StreamTextEvent = /* union of stream event types */import { generateText } from "@xsai/generate-text"
const { text, usage } = await generateText({
apiKey: "...",
baseURL: "https://api.openai.com/v1/",
model: "gpt-4o",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Why is the sky blue?" },
],
})Types:
interface GenerateTextResult {
text?: string // NOTE: optional in 0.4.x (was required in 0.2.x)
usage: Usage
finishReason: FinishReason
messages: Message[]
steps: CompletionStep<true>[]
toolCalls: CompletionToolCall[]
toolResults: CompletionToolResult[]
reasoningText?: string
}import { listModels } from "@xsai/model"
const models = await listModels({
apiKey: "...",
baseURL: "https://api.openai.com/v1/",
})
// Returns Model[] with { id, object, created, owned_by }// From @xsai/shared-chat
interface ChatOptions {
apiKey?: string
baseURL: string
model: string
messages: Message[]
// ... other OpenAI-compatible options
}
interface Usage {
prompt_tokens: number
completion_tokens: number
total_tokens: number
}
type Message = SystemMessage | UserMessage | AssistantMessage | ToolMessage | DeveloperMessage| Change | 0.2.0-beta.3 | 0.4.x |
|---|---|---|
streamText call | await streamText() (async) | streamText() (sync) |
StreamTextResult | { textStream, chunkStream } | { textStream, fullStream, usage: Promise, ... } |
| Usage retrieval | Iterate chunkStream chunks | await result.usage |
StreamTextChunkResult | Exists | Removed, replaced by StreamTextEvent |
textStream type | Required as unknown as AsyncIterable cast | Native ReadableStream, supports for await and pipeThrough() |
generateText result .text | string | string | undefined |
import { smoothStream } from "@xsai/utils-stream"
const smoothed = textStream.pipeThrough(smoothStream({
delay: 20,
chunking: "line",
}))import { toAsyncIterator } from "@xsai/utils-stream"
// For browsers that don't support ReadableStream async iteration
const iterableStream = toAsyncIterator(textStream)references/index.md - Full documentation index with all examplesreferences/docs/ - Individual package documentation (27 files with complete code examples)references/type-defs/ - Deno Doc type definitions from esm.sh© yusixian, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 48 other files (references) in .claude/skills/xsai of yusixian/moe-copy-ai.
Open the folder on GitHubat commit 3d2834d
Xsai SDK 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Xsai SDK this skillyusixian/moe-copy-ai | 145 | — | ~1.1k | Automated safety check: Pass | AGPL-3.0 | |
| AI SDKvercel-labs/ai-facts | 168 | 20 repos | ~1.2k | Automated safety check: Pass | None | |
| Design StyleCastor6/tactus | 376 | 1 repos | ~2.1k | Automated safety check: Pass | Apache-2.0 | |
| Genui Integrationopentiny/genui-sdk | 172 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Update Web Assetsgarfiec/Librechat-Mobile | 111 | — | ~1.8k | Automated safety check: Notes | MIT | |
| Dashboard BuilderQwenLM/qwen-code-examples | 143 | — | ~3.3k | Automated safety check: Pass | None |
vercel-labs/ai-facts
Answer questions about the AI SDK and help build AI-powered features.
Castor6/tactus
A skill your agent uses whenever the user asks to build, create, design, develop, improve, or style any frontend interface or visual element.
opentiny/genui-sdk
genui-sdk 全方位指南:安装、配置、集成、示例。用户提到 genui-sdk、genui-sdk-server,或想构建 AI 聊天界面、动态 UI 组件、Node.js 后端 LLM 代理(OpenAI 兼容 chat/completions API)时使用。涵盖 Vue/Angular 前端(主题、物料、GenuiChat/GenuiRenderer)与 Server…
garfiec/Librechat-Mobile
Update the third-party JavaScript vendored into the app for the artifact, diagram, and math WebViews (KaTeX, mermaid, marked, highlight.js, Tailwind, Babel, React).
QwenLM/qwen-code-examples
Build full-stack dashboard applications using React/Next.js + shadcn/ui + Tailwind CSS + Recharts + Express with customizable data sources.
sickn33/agentic-awesome-skills
Expert in the Vercel AI SDK. An agent skill from sickn33/agentic-awesome-skills.
Categories
xsAI SDK v0.4.x API reference - extra-small AI SDK with OpenAI-compatible API. Xsai SDK is an agent skill from yusixian/moe-copy-ai.
Xsai SDK fits situations like: data & Analytics work in your project.
Run `npx skills add yusixian/moe-copy-ai --skill xsai-sdk -a claude-code`. Or copy the skill folder (.claude/skills/xsai in yusixian/moe-copy-ai) into .claude/skills/xsai-sdk in your project. Claude Code loads it when a task matches its description.
Run `npx skills add yusixian/moe-copy-ai --skill xsai-sdk -a codex`. Or copy the skill folder (.claude/skills/xsai in yusixian/moe-copy-ai) into .agents/skills/xsai-sdk in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add yusixian/moe-copy-ai --skill xsai-sdk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/xsai-sdk, .gemini/skills/xsai-sdk, .github/skills/xsai-sdk and .opencode/skills/xsai-sdk in your project.
SKILL.md names no scripts, command-line tools or credentials: Xsai SDK is instructions for the agent only.
SKILL.md names 1 domain. In commands or code: api.openai.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
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. Review the folder before installing.
Xsai SDK is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.1k tokens (SKILL.md is roughly 4.6k 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 43k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Xsai SDK: AI SDK (vercel-labs/ai-facts, 168 stars), Design Style (Castor6/tactus, 376 stars), Genui Integration (opentiny/genui-sdk, 172 stars) and Update Web Assets (garfiec/Librechat-Mobile, 111 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
yusixian (a GitHub user) maintains it in yusixian/moe-copy-ai, which has 145 GitHub stars. The repository was last updated on April 3, 2026.
Source: yusixian/moe-copy-ai on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.