Skip to content
Back to skills

Ai

ASecurity

Call LLMs through @nia-teams/ai: one ILLMClient over Anthropic Messages, OpenAI Chat Completions, OpenAI Responses and Gemini, plus withFallback, generateImage and createDecisionClient. Use when code imports @nia-teams/ai or connects an official or compatible endpoint (DeepSeek, Qwen, Kimi, GLM).

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 27, 2026
ai-agentstypescriptnodeapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned December 4, 2026

npx -y skills add nia-teams/cloud-agent --skill ai --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ai?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ai
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nia-teams-cloud-agent/badge)](https://www.skillsdirectory.com/skills/nia-teams-cloud-agent)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ai
description: Call LLMs through @nia-teams/ai: one ILLMClient over Anthropic Messages, OpenAI Chat Completions, OpenAI Responses and Gemini, plus withFallback, generateImage and createDecisionClient. Use when code imports @nia-teams/ai or connects an official or compatible endpoint (DeepSeek, Qwen, Kimi, GLM).
---

Call `createClient({ protocol, model, apiKey, baseURL, ... })` from `@nia-teams/ai`. The client does not read API key or `baseURL` environment variables.
Supported protocols: `anthropic`, `openai-completions`, `openai-responses`, and `gemini`.
OpenAI-compatible endpoints differ in reasoning parameters; set `supportsThinking: true` and `reasoningFormat` (`'thinking_object' | 'enable_thinking' | 'reasoning_object' | 'openai'`) per provider, or thinking options are not sent. Compatible Anthropic endpoints (such as DeepSeek) may ignore `cache_control` and `defer_loading`.
Import message types from `@nia-teams/ai/protocol` and wire formatters from `@nia-teams/ai/adapters` when you do not want to load the Anthropic or OpenAI SDKs.
Wrap clients or lazy factories with `withFallback(primary, { network, policyViolation, refusal })`. After any stream delta has been emitted, `withFallback` does not retry; it rethrows the original error.
Use `createDecisionClient({ client })` for structured JSON answers and `generateImage` with `protocol: 'openai-images' | 'chat-multimodal'`.
Native tool media lives in `OutboundAgentMessage.resolvedMedia` on tool messages and interleaved tool-result events in requests. Chat Completions supports image/audio/video, Responses supports image/audio/video/PDF, and Anthropic supports image/PDF; check model-specific capabilities separately. For Chat Completions audio URLs, `audioUrlFormat` defaults to inferring the format from the path extension; set it to `'omit'` for endpoints that expect only the URL in `input_audio.data`.

Exact signatures: `node_modules/@nia-teams/ai/dist/**/*.d.ts`. Reference manual & TypeScript examples: `node_modules/@nia-teams/ai/README.md` (run `.ts` snippets with `npx tsx`).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.