Skip to content
Agentmart
Submit a tool

xsai-text

Generate or stream text with xsAI.

Skill by moeru-ai

IndexedMIT★ 664
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/moeru-ai-xsai-text

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Generate or stream text with xsAI. Use for tool calls, structured output, conversations, or protocol adapter selection.

Use cases: model-inference

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/xsai-text

What's inside

Skill name
xsai-text
Description
Generate or stream text with xsAI. Use for tool calls, structured output, conversations, or protocol adapter selection.
License
MIT
Instructions
34 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • openai.yaml · agents/

SKILL.md (first lines)

# xsAI text

Read only the pages needed for the task. The URLs below return Markdown. Make sure that the API matches the installed xsAI version.

An adapter connects a model to an HTTP protocol.

| Task | Page |
| --- | --- |
| First request, install | https://xsai.js.org/getting-started.md |
| One reply | https://xsai.js.org/text/generating.md |
| Incremental output | https://xsai.js.org/text/streaming.md |
| Tools, the tool loop, and its hooks | https://xsai.js.org/text/tools.md |
| Structured output | https://xsai.js.org/text/structured-output.md |
| Multi-turn input, images, Parts | https://xsai.js.org/text/messages.md |
| Event types, the terminal event, event listeners | https://xsai.js.org/text/events.md |
| Adapter choice and provider options | https://xsai.js.org/text/adapters.md |
| Options, results, errors | https://xsai.js.org/text/api.md |
| Cancellation | https://xsai.js.org/text/generating.md |
| Failures | https://xsai.js.org/text/troubleshooting.md |
| Custom models, typed provider options | https://xsai.js.org/advanced/custom-models.md, https://xsai.js.org/advanced/module-augmentation.md |
| Schemas for tools without native JSON Schema support | https://xsai.js.org/xsschema.md |

Use these API rules:

- Pick the adapter by endpoint protocol: `responses()` from `@xsai/text-responses`, `chat()` from `@xsai/text-chat`, or `messages()` from `@xsai/text-messages`. Use the project's endpoint and model configuration.
- Operations take the model first: `generateText(model, { input })`. Import from `@xsai/text` or the existing `xsai` package.
- `generateText` returns a result object. Before you parse `result.text`, make sure that the output is complete and contains no refusal. Then parse the JSON and make sure that it matches the schema.
- If you consume `stream`, also handle the `result` promise from `streamText`. Failures that the provider reports reject `result`. Network errors or errors in the response data can also make the stream throw.
- Messages requires `maxOutputTokens`.
- Preserve the returned assistant messages and their metadata. After a tool loop, send each step's message and tool results in the next request.

For code changes, make sure that the installed types accept the code. Test the affected behavior with existing tests or mock responses.

From moeru-ai/xsai, MIT.

More from moeru-ai/xsai

Signals

Stars
664
Forks
62
Open issues
4
Last commit (this folder)
Oct 10, 2026 (17 days ago)
Last release
Sep 30, 2026 (28 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from moeru-ai

Cite this page

xsai-text skill. Agent Mart. https://agentmart.dev/skills/moeru-ai-xsai-text (last updated 2026-10-24)