Agent skill

Xsai

by moeru-ai in moeru-ai/airi

A skill your agent uses when the user is building with xsai or any @xsai/ package, or is evaluating xsAI for a small OpenAI-compatible workflow with text generation, streaming, tool calling…

MITAuto-check passedAI & LLM Engineering

Install Xsai

skills CLI
$ npx skills add moeru-ai/airi --skill xsai -a claude-code

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

GitHub CLI
$ gh skill install moeru-ai/airi xsai --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/moeru-ai/airi.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/xsai .claude/skills/xsai && 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
xsai
GitHub stars
50k
Used in
1 other repo
Token cost
~1.3k tokens
SKILL.md length
640 words
Files
8 (incl. references)
Skills in repo
24
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when the user is building with xsai or any @xsai/ package, or is evaluating xsAI for a small OpenAI-compatible workflow with text generation, streaming, tool calling…

  • The user is building with xsai
  • SKILL.md covers Use xsAI when, Do not use xsAI when, Default workflow and References, plus 4 more sections
  • Reaches xsai.js.org
  • Any @xsai/ package

What it does

Xsai is an agent skill from moeru-ai/airi. Use this skill when the user is building with xsai or any @xsai/ package, or is evaluating xsAI for a small OpenAI-compatible workflow with text generation, streaming, tool calling, structured output, embeddings, image generation, speech synthesis, or transcription.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files (for example `agents/openai.yaml`, `references/extensions.md` and `references/media-and-embeddings.md`).

It sits in AI & LLM Engineering, covering Structured output and tool calling, Embeddings and Text to speech and voice. It works with OpenAI. The repository describes itself as: 💖🧸 Self hosted, you-owned Grok Companion, a container of souls of waifu, cyber livings to bring them into our worlds, wishing to achieve Neuro-sama's altitude. Capable of… The licence is MIT.

When your agent uses it

  • The user is building with xsai
  • Any @xsai/ package
  • Is evaluating xsAI for a small OpenAI-compatible workflow with text generation
  • Structured output

Example prompts

  • “/xsai”

Requirements

  • Node.js

What it can do on your machine

Read from SKILL.md and the folder at commit ec682e2. 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

    No scripts in the folder and no shell commands in SKILL.md.

    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:

    • xsai.js.org

    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

Xsai loads about 1.3k tokens when it runs, and up to ~4.4k if it reads all its reference files. Until then it costs about 69 tokens; SKILL.md has 640 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.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); files beside SKILL.md are not scanned.

SKILL.md

The full file from moeru-ai/airi at commit ec682e2, republished under its MIT licence (© moeru-ai). 640 words, ~1,273 tokens.

Download SKILL.mdSave it as .claude/skills/xsai/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
xsai
description
Use this skill when the user is building with `xsai` or any `@xsai/*` package, or is evaluating xsAI for a small OpenAI-compatible workflow with text generation, streaming, tool calling, structured output, embeddings, image generation, speech synthesis, or transcription.

xsAI

Use this skill for xsai code, package selection, API selection, canonical examples, and positioning.

Use xsAI when

  • The user is already using xsai or any @xsai/* package.
  • The user is evaluating xsAI for an OpenAI-compatible integration.
  • The target API is OpenAI-compatible.
  • The user wants a small runtime or package footprint.
  • The user needs text generation, streaming, structured output, or tool calling without a broad framework.
  • The user is comparing xsai with larger SDKs such as ai or pi and wants the tradeoffs framed clearly.

Do not use xsAI when

  • The user needs a universal provider abstraction beyond OpenAI-compatible APIs.
  • The user wants a batteries-included AI application framework.
  • The task depends on provider-specific APIs that are not exposed through an OpenAI-compatible surface.

Default workflow

  • First inspect the existing dependency and import style in the repo. Preserve xsai versus granular @xsai/* imports unless the user asks to change them.
  • If the user has not chosen xsAI yet, confirm the task fits an OpenAI-compatible surface before recommending it.
  • Prefer the smallest package that solves the task. Use the umbrella xsai package only when the user needs several features at once or explicitly wants one dependency.
  • When writing or editing code, read references/recipes.md first and start from the closest canonical example.
  • Keep examples minimal and runnable. Include baseURL and model explicitly. For hosted providers, show apiKey wired from process.env in Node.js and from localStorage in the browser; omit it only when the target endpoint truly does not need one. Do not recommend hardcoding secrets.
  • Preserve the project's existing schema library and provider wiring unless there is a clear reason to change them.
  • Keep recommendations aligned with xsAI's scope: OpenAI-compatible, Fetch-based, runtime-portable, and intentionally narrow.
  • If the user is optimizing for bundle or install size, explicitly prefer granular packages such as @xsai/generate-text over xsai.
  • If the user asks for broader provider abstraction, say xsAI intentionally does not optimize for that.

References

  • Read references/recipes.md when the user wants code, edits xsAI code, or needs a canonical minimal example.
  • Read references/package-selection.md when the user needs help choosing between xsai and granular packages.
  • Read references/text-stream-tools.md for generateText, streamText, tool calling, and common chat options.
  • Read references/structured-output.md for generateObject, streamObject, tool(), rawTool(), or schema guidance.
  • Read references/media-and-embeddings.md for embeddings, image generation, speech, or transcription.
  • Read references/extensions.md only when the user explicitly needs xsAI extensions such as predefined providers, the OpenAI Responses API, or OTEL telemetry.
Show full SKILL.md (243 more words)Show less

API selection rules

  • Use generateText for unary text generation.
  • Use streamText for incremental text, reasoning deltas, tool events, or lightweight agent loops.
  • Use generateObject for validated structured output.
  • Use streamObject when the user needs incremental object parsing.
  • Use tool() when the user has a Standard Schema library such as Zod or Valibot.
  • Use rawTool() when the user already has raw JSON Schema.
  • Use a plain Tool object only when the repo already uses that shape or when avoiding tool()'s async setup matters.

Key constraints

  • baseURL and model are usually required in practice for xsAI calls.
  • apiKey is provider-dependent. Most hosted providers need it; local or proxy endpoints may not. In Node.js, prefer process.env. In browsers, prefer reading from localStorage. Do not recommend hardcoding API keys.
  • xsAI is OpenAI-compatible-first. Do not imply support for non-compatible provider APIs.
  • streamText() returns immediately; callers consume textStream, fullStream, and result promises asynchronously.
  • streamObject() is async because schema conversion happens before streaming starts.
  • stopWhen controls repeated tool-use loops with explicit stop predicates such as stepCountAtLeast() and hasToolCall().
  • generateObject(), streamObject(), and tool() rely on xsschema; some schema vendors need extra JSON Schema converter packages.
  • xsAI is designed to stay small. Avoid recommending the umbrella package when a smaller package is enough.

Positioning

  • Describe xsAI as an extra-small OpenAI-compatible runtime, not as a universal AI SDK.
  • When comparing with ai or pi, focus on size, runtime portability, OpenAI-compatible scope, and simpler primitives. Do not oversell feature breadth.

Docs

  • Public docs: https://xsai.js.org/docs

© moeru-ai, MIT. 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 (references) in .agents/skills/xsai of moeru-ai/airi.

  • SKILL.md
  • agents/openai.yaml
  • references/extensions.md
  • references/media-and-embeddings.md
  • references/package-selection.md
  • references/recipes.md
  • references/structured-output.md
  • references/text-stream-tools.md

Open the folder on GitHubat commit ec682e2

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in moeru-ai/airi, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Xsai 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.

Xsai compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Xsai this skillmoeru-ai/airi50k1 repos~1.3kAutomated safety check: PassMIT
Local AI App Integrationamd/skills408—~6kAutomated safety check: PassMIT
Fastllm Gatewayazrtydxb/Fastllm-proxy108—~926Automated safety check: PassApache-2.0
AI SDK Developmenttrypostit/trypost6921 repos~3.5kAutomated safety check: PassMIT
Local AI Useamd/skills408—~5kAutomated safety check: NotesMIT
Azure AI Openai Dotnetmicrosoft/skills3.1k5 repos~3.4kAutomated safety check: PassMIT

Similar skills

  • Integrates local AI capabilities into applications using Embeddable Lemonade.

    408 GitHub stars~6k tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Fastllm Gateway

    azrtydxb/Fastllm-proxy

    Send inference requests through the FastLLM OpenAI-compatible gateway — chat completions, completions, embeddings, rerank, score, responses, moderations, audio speech and transcription, image…

    108 GitHub stars~926 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • AI SDK Development

    trypostit/trypost

    TRIGGER when working with ai-sdk which is Laravel official first-party AI SDK.

    692 GitHub starsUsed in 1 repo~3.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Local AI Use

    amd/skills

    Makes this agent generate images, transcribe audio, and synthesize speech on the user's own machine through a local Lemonade Server instead of a paid cloud API.

    408 GitHub stars~5k tokensUpdated yesterday
    Media & CreativeAuto-check: notes
  • Azure AI Openai Dotnet

    microsoft/skills

    Official

    Azure OpenAI SDK for .NET. An agent skill from microsoft/skills.

    3.1k GitHub starsUsed in 5 repos~3.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Ax Audio

    dosco/aithy

    This skill helps an LLM generate correct audio code with @ax-llm/ax.

    107 GitHub stars~2.5k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed

More from moeru-ai/airi

All 24 skills in this repo
  • Simple English

    moeru-ai/airi

    Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.

    50k GitHub starsUsed in 2 repos~4.6k tokens
    Auto-check passed
  • Review pending AIRI translations on Crowdin in a batch, then sync them into the repository.

    50k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Upload a local image or file to GitHub's user-attachments storage and return a URL suitable for issue, pull request, discussion, or comment Markdown.

    50k GitHub stars~554 tokensUpdated today
    Auto-check passed
  • Create PR

    moeru-ai/airi

    Prepare and create an AIRI pull request with verifiable change context, architecture evidence, and required visual evidence.

    50k GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts.

    50k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • A skill your agent uses when Codex needs to inspect, debug, or automate an Electron app through agent-browser and Chrome DevTools Protocol, especially when the app has multiple BrowserWindow…

    50k GitHub stars~3.1k tokensUpdated today
    Auto-check passed

Works with

Questions about Xsai

What does Xsai do?

A skill your agent uses when the user is building with xsai or any @xsai/ package, or is evaluating xsAI for a small OpenAI-compatible workflow with text generation, streaming, tool calling…. Xsai is an agent skill from moeru-ai/airi. Use this skill when the user is building with xsai or any @xsai/ package, or is evaluating xsAI for a small OpenAI-compatible workflow with text generation, streaming, tool calling, structured output, embeddings, image generation, speech synthesis, or transcription.

When should I use Xsai?

Xsai fits situations like: the user is building with xsai; any @xsai/ package; is evaluating xsAI for a small OpenAI-compatible workflow with text generation; structured output.

How do I install Xsai in Claude Code?

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

How do I install Xsai in Codex?

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

Can I use Xsai 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 moeru-ai/airi --skill xsai -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, .gemini/skills/xsai, .github/skills/xsai and .opencode/skills/xsai in your project.

What does Xsai need to run?

SKILL.md names no scripts, command-line tools or credentials: Xsai is instructions for the agent only. Our summary lists: Node.js.

Does Xsai access the network?

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

Is Xsai 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. Review the folder before installing.

What licence does Xsai use?

Xsai is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Xsai use?

About 1.3k tokens (SKILL.md is roughly 5.1k 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 3.1k tokens, read only when the agent opens those files.

What are the alternatives to Xsai?

Skills that share tags, products or a category with Xsai: Local AI App Integration (amd/skills, 408 stars), Fastllm Gateway (azrtydxb/Fastllm-proxy, 108 stars), AI SDK Development (trypostit/trypost, 692 stars) and Local AI Use (amd/skills, 408 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Xsai?

moeru-ai (a GitHub organization) maintains it in moeru-ai/airi, which has 50,267 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 11, 2026.

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