xsai

xsai is a skill for Codex from moeru-ai/alint. It costs 61 tokens per session (1,113 once invoked), scanned A, a copy of xsai, MIT.

A guide for building small applications with xsAI and its related packages. xsAI provides an OpenAI-compatible way to add text generation, streaming, tool calls, structured results, embeddings, image generation, speech, and transcription.

In plain words
What is it for?
Use it when a project already uses xsAI, when evaluating it for an OpenAI-compatible service, or when adding supported AI features with a small package footprint. It covers imports, package selection, examples, and trade-offs.
Why use it?
It helps choose the right xsAI package and API without adding a larger application framework. It also clarifies when xsAI fits and when another approach is more suitable.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when a project already uses xsAI, when evaluating it for an OpenAI-compatible service, or when adding supported AI features with a small package footprint. It covers imports, package selection, examples, and trade-offs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/moeru-ai/alint/xsai
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add moeru-ai/alint --skill xsai
Clone the repo
git clone --depth 1 https://github.com/moeru-ai/alint

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 xsai

README.md
[![agentmods](https://agentmods.dev/badge/skills/moeru-ai/alint/xsai/github.svg)](https://agentmods.dev/skills/moeru-ai/alint/xsai)
Your own site
<a href="https://agentmods.dev/skills/moeru-ai/alint/xsai"><img src="https://agentmods.dev/badge/skills/moeru-ai/alint/xsai/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 xsai

Your own site · 80×15
<a href="https://agentmods.dev/skills/moeru-ai/alint/xsai"><img src="https://agentmods.dev/badge/skills/moeru-ai/alint/xsai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,113 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.00061 $0.01113
Opus 5.5 $0.00024 $0.00445
Sonnet 5.5 $0.00012 $0.00223
Haiku 4.5 $0.00006 $0.00111

Measured 1mo ago against content hash a892f787bee5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

xsai scanned grade A with 0 findings 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 1mo ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to xsai — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/xsai/SKILL.md · 75 lines

How it starts

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

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.

Read the full file on GitHub · 75 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. 1mo ago First seen · 75 lines · 61 tokens per session scan A a892f787bee5

Subscribe to this mod's changes

xsai is a skill published in the GitHub repository moeru-ai/alint (118 stars, last pushed 26d ago), licensed MIT. It adds 61 tokens to every session and 1,113 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to xsai, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

v4-best-practices

Use when working with deepseek-v4-pro or deepseek-v4-flash in thinking mode on multi-step or plan-driven tasks. Provides rules to prevent stale references, unverified plan assumptions, and vague plan output.

Hmbown/CodeWhale · 51 tokens

kv-cache-design

A guide to arranging an AI agent's conversation so previously processed text can be reused. A KV cache stores intermediate results for earlier tokens, while a prompt cache reuses a stable beginning across requests.

bojieli/ai-agent-book · 91 tokens

reward-design

A guide to defining the scores that an AI agent receives during trial-and-error training. It covers checks based on rules, human preferences, or another model, and distinguishes rewarding the final result from rewarding the steps taken.

bojieli/ai-agent-book · 131 tokens

agent-evolution

A guide to making an AI agent improve from its past runs. It covers how to judge results, extract reusable lessons, and decide whether to store them as knowledge, instructions, code, or model training.

bojieli/ai-agent-book · 126 tokens

bad-case-to-dpo

A guide to turning failed production agent runs into training and evaluation data. It explains how to find the first mistake, create preference examples for DPO (Direct Preference Optimization), and check that a fix does not damage other tasks.

bojieli/ai-agent-book · 168 tokens

knowledge-org

A guide to organising large bodies of knowledge so an AI system can navigate relationships, summaries, and layers instead of searching only flat text chunks. It covers tree indexes, knowledge graphs, file-like structures, incremental updates, and long-term memory layouts.

bojieli/ai-agent-book · 96 tokens