Official agent skill

Azure AI Translation TS

by microsoft in microsoft/skills

Build translation applications using Azure Translation SDKs for JavaScript (@azure-rest/ai-translation-text, @azure-rest/ai-translation-document).

OfficialMITAuto-check passedWriting & Content

Install Azure AI Translation TS

skills CLI
$ npx skills add microsoft/skills --skill azure-ai-translation-ts -a claude-code

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

GitHub CLI
$ gh skill install microsoft/skills azure-ai-translation-ts --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/microsoft/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/plugins/azure-sdk-typescript/skills/azure-ai-translation-ts .claude/skills/azure-ai-translation-ts && 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
azure-ai-translation-ts
GitHub stars
3.1k
Token cost
~2k tokens
SKILL.md length
98 words
Files
1
Skills in repo
150
Repo updated
First seen
Licence
MIT

At a glance

Build translation applications using Azure Translation SDKs for JavaScript (@azure-rest/ai-translation-text, @azure-rest/ai-translation-document).

  • Works in 5 steps: Auto-detect source - Omit language… → Batch requests - Translate multiple… → Use SAS tokens - For document… → …
  • Implementing text translation
  • SKILL.md covers Installation, Environment Variables, Text Translation Client and Document Translation Client, plus 2 more sections
  • Calls npm; reaches api.cognitive.microsofttranslator.com and learn.microsoft.com; needs AZURE_TOKEN_CREDENTIALS and TRANSLATOR_SUBSCRIPTION_KEY

What it does

Azure AI Translation TS is an agent skill from microsoft/skills, published by the product's own GitHub organization. Build translation applications using Azure Translation SDKs for JavaScript (@azure-rest/ai-translation-text, @azure-rest/ai-translation-document). Use when implementing text translation, transliteration, language detection, or batch document translation.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Writing & Content, covering Translation. It works with Microsoft Azure, Azure AI Translator, TypeScript and JavaScript. The repository describes itself as: Skills, MCP servers, Custom Agents, Agents.md for SDKs to ground Coding Agents. The licence is MIT.

When your agent uses it

  • Implementing text translation
  • Transliteration
  • Language detection
  • Batch document translation

Example prompts

  • “/azure-ai-translation-ts”

Requirements

  • Node.js
  • A credential in TRANSLATOR_SUBSCRIPTION_KEY

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Auto-detect source - Omit language parameter to auto-detect
  2. Batch requests - Translate multiple texts in one call for efficiency
  3. Use SAS tokens - For document translation, use time-limited SAS URLs
  4. Handle errors - Always check isUnexpected(response) before accessing body
  5. Regional endpoints - Use regional endpoints for lower latency

What it can do on your machine

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

    Shell commands in SKILL.md call:

    • npm

    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:

    • api.cognitive.microsofttranslator.com
    • learn.microsoft.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • AZURE_TOKEN_CREDENTIALS
    • TRANSLATOR_SUBSCRIPTION_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Azure AI Translation TS loads about 2k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 98 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~2k

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 microsoft/skills at commit d5741a1, republished under its MIT licence (© microsoft). 98 words, ~1,967 tokens.

Download SKILL.mdSave it as .claude/skills/azure-ai-translation-ts/SKILL.md (or your agent's skills folder).
name
azure-ai-translation-ts
description
Build translation applications using Azure Translation SDKs for JavaScript (@azure-rest/ai-translation-text, @azure-rest/ai-translation-document). Use when implementing text translation, transliteration, language detection, or batch document translation.
license
MIT
metadata.author
Microsoft
metadata.version
1.0.0
metadata.package
@azure-rest/ai-translation-text, @azure-rest/ai-translation-document

Azure Translation SDKs for TypeScript

Text and document translation with REST-style clients.

Installation

bash
# Text translation
npm install @azure-rest/ai-translation-text @azure/identity

# Document translation
npm install @azure-rest/ai-translation-document @azure/identity

Environment Variables

bash
TRANSLATOR_ENDPOINT=https://api.cognitive.microsofttranslator.com
TRANSLATOR_SUBSCRIPTION_KEY=<your-api-key>
TRANSLATOR_REGION=<your-region>  # e.g., westus, eastus
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production

Text Translation Client

Authentication
typescript
import TextTranslationClient, { TranslatorCredential } from "@azure-rest/ai-translation-text";

// API Key + Region
const credential: TranslatorCredential = {
  key: process.env.TRANSLATOR_SUBSCRIPTION_KEY!,
  region: process.env.TRANSLATOR_REGION!,
};
const client = TextTranslationClient(process.env.TRANSLATOR_ENDPOINT!, credential);

// Or just credential (uses global endpoint)
const client2 = TextTranslationClient(credential);
Translate Text
typescript
import TextTranslationClient, { isUnexpected } from "@azure-rest/ai-translation-text";

const response = await client.path("/translate").post({
  body: {
    inputs: [
      {
        text: "Hello, how are you?",
        language: "en",  // source (optional, auto-detect)
        targets: [
          { language: "es" },
          { language: "fr" },
        ],
      },
    ],
  },
});

if (isUnexpected(response)) {
  throw response.body.error;
}

for (const result of response.body.value) {
  for (const translation of result.translations) {
    console.log(`${translation.language}: ${translation.text}`);
  }
}
Translate with Options
typescript
const response = await client.path("/translate").post({
  body: {
    inputs: [
      {
        text: "Hello world",
        language: "en",
        textType: "Plain",  // or "Html"
        targets: [
          {
            language: "de",
            profanityAction: "NoAction",  // "Marked" | "Deleted"
            tone: "formal",  // LLM-specific
          },
        ],
      },
    ],
  },
});
Get Supported Languages
typescript
const response = await client.path("/languages").get();

if (isUnexpected(response)) {
  throw response.body.error;
}

// Translation languages
for (const [code, lang] of Object.entries(response.body.translation || {})) {
  console.log(`${code}: ${lang.name} (${lang.nativeName})`);
}
Transliterate
typescript
const response = await client.path("/transliterate").post({
  body: { inputs: [{ text: "这是个测试" }] },
  queryParameters: {
    language: "zh-Hans",
    fromScript: "Hans",
    toScript: "Latn",
  },
});

if (!isUnexpected(response)) {
  for (const t of response.body.value) {
    console.log(`${t.script}: ${t.text}`);  // Latn: zhè shì gè cè shì
  }
}
Detect Language
typescript
const response = await client.path("/detect").post({
  body: { inputs: [{ text: "Bonjour le monde" }] },
});

if (!isUnexpected(response)) {
  for (const result of response.body.value) {
    console.log(`Language: ${result.language}, Score: ${result.score}`);
  }
}

Document Translation Client

Authentication
typescript
import DocumentTranslationClient from "@azure-rest/ai-translation-document";
import { DefaultAzureCredential, ManagedIdentityCredential } from "@azure/identity";

const endpoint = "https://<translator>.cognitiveservices.azure.com";

// Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>
const credential = new DefaultAzureCredential({requiredEnvVars: ["AZURE_TOKEN_CREDENTIALS"]});
// Or use a specific credential directly in production:
// See https://learn.microsoft.com/javascript/api/overview/azure/identity-readme?view=azure-node-latest#credential-classes
// const credential = new ManagedIdentityCredential();

// TokenCredential
const client = DocumentTranslationClient(endpoint, credential);

// API Key
const client2 = DocumentTranslationClient(endpoint, { key: "<api-key>" });
Single Document Translation
typescript
import DocumentTranslationClient from "@azure-rest/ai-translation-document";
import { writeFile } from "node:fs/promises";

const response = await client.path("/document:translate").post({
  queryParameters: {
    targetLanguage: "es",
    sourceLanguage: "en",  // optional
  },
  contentType: "multipart/form-data",
  body: [
    {
      name: "document",
      body: "Hello, this is a test document.",
      filename: "test.txt",
      contentType: "text/plain",
    },
  ],
}).asNodeStream();

if (response.status === "200") {
  await writeFile("translated.txt", response.body);
}
Batch Document Translation
typescript
import { ContainerSASPermissions, BlobServiceClient } from "@azure/storage-blob";

// Generate SAS URLs for source and target containers
const sourceSas = await sourceContainer.generateSasUrl({
  permissions: ContainerSASPermissions.parse("rl"),
  expiresOn: new Date(Date.now() + 24 * 60 * 60 * 1000),
});

const targetSas = await targetContainer.generateSasUrl({
  permissions: ContainerSASPermissions.parse("rwl"),
  expiresOn: new Date(Date.now() + 24 * 60 * 60 * 1000),
});

// Start batch translation
const response = await client.path("/document/batches").post({
  body: {
    inputs: [
      {
        source: { sourceUrl: sourceSas },
        targets: [
          { targetUrl: targetSas, language: "fr" },
        ],
      },
    ],
  },
});

// Get operation ID from header
const operationId = new URL(response.headers["operation-location"])
  .pathname.split("/").pop();
Get Translation Status
typescript
import { isUnexpected, paginate } from "@azure-rest/ai-translation-document";

const statusResponse = await client.path("/document/batches/{id}", operationId).get();

if (!isUnexpected(statusResponse)) {
  const status = statusResponse.body;
  console.log(`Status: ${status.status}`);
  console.log(`Total: ${status.summary.total}`);
  console.log(`Success: ${status.summary.success}`);
}

// List documents with pagination
const docsResponse = await client.path("/document/batches/{id}/documents", operationId).get();
const documents = paginate(client, docsResponse);

for await (const doc of documents) {
  console.log(`${doc.id}: ${doc.status}`);
}
Get Supported Formats
typescript
const response = await client.path("/document/formats").get();

if (!isUnexpected(response)) {
  for (const format of response.body.value) {
    console.log(`${format.format}: ${format.fileExtensions.join(", ")}`);
  }
}

Key Types

typescript
// Text Translation
import type {
  TranslatorCredential,
  TranslatorTokenCredential,
} from "@azure-rest/ai-translation-text";

// Document Translation
import type {
  DocumentTranslateParameters,
  StartTranslationDetails,
  TranslationStatus,
} from "@azure-rest/ai-translation-document";

Best Practices

  1. Auto-detect source - Omit language parameter to auto-detect
  2. Batch requests - Translate multiple texts in one call for efficiency
  3. Use SAS tokens - For document translation, use time-limited SAS URLs
  4. Handle errors - Always check isUnexpected(response) before accessing body
  5. Regional endpoints - Use regional endpoints for lower latency

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .github/plugins/azure-sdk-typescript/skills/azure-ai-translation-ts of microsoft/skills.

Open the folder on GitHubat commit d5741a1

Compare with similar skills

Azure AI Translation TS 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.

Azure AI Translation TS compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Azure AI Translation TS this skillmicrosoft/skills3.1k—~2kAutomated safety check: PassMIT
Azure AI Translation Text Pyaiskillstore/marketplace4334 repos~1.9kAutomated safety check: PassNone
Code TranslationArabelaTso/Skills-4-SE253—~3.1kAutomated safety check: PassApache-2.0
Azure Immersive ReaderMicrosoftDocs/Agent-Skills776—~1.4kAutomated safety check: PassCC-BY-4.0
Azure TranslatorMicrosoftDocs/Agent-Skills776—~4.4kAutomated safety check: PassCC-BY-4.0
Install Anti Sloptrycompai/crm11k1 repos~881Automated safety check: PassMIT

Similar skills

  • Azure AI Translation Text Py

    aiskillstore/marketplace

    Azure AI Text Translation SDK for real-time text translation, transliteration, language detection, and dictionary lookup.

    433 GitHub starsUsed in 4 repos~1.9k tokens
    Writing & ContentAuto-check passed
  • Code Translation

    ArabelaTso/Skills-4-SE

    Convert code between programming languages while preserving functionality and semantics.

    253 GitHub stars~3.1k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed
  • Azure Immersive Reader

    MicrosoftDocs/Agent-Skills

    Official

    Expert knowledge for Azure AI Immersive Reader development including best practices, limits & quotas, security, configuration, and integrations & coding patterns.

    776 GitHub stars~1.4k tokensUpdated 5 days ago
    Writing & ContentAuto-check passed
  • Azure Translator

    MicrosoftDocs/Agent-Skills

    Official

    Expert knowledge for Azure Translator development including troubleshooting, best practices, decision making, limits & quotas, security, configuration, integrations & coding patterns, and deployment.

    776 GitHub stars~4.4k tokensUpdated 5 days ago
    DevOps & CloudAuto-check passed
  • Install Anti Slop

    trycompai/crm

    Install and configure the anti-slop Oxlint plugin in a local TypeScript or JavaScript repository.

    11k GitHub starsUsed in 1 repo~881 tokens
    Writing & ContentAuto-check passed
  • Translate

    tagspaces/tagspaces

    Translate new or untranslated i18n strings from the English locale files (core.json + peri.json) into all other locales, maintaining consistency with each language's existing translations.

    5.3k GitHub stars~2.2k tokensUpdated today
    Writing & ContentAuto-check passed

More from microsoft/skills

All 150 skills in this repo
  • Official

    Covers producer, consumer, and checkpoint-store setup for Azure Event Hubs streaming in Python, with Entra ID auth and partition targeting.

    3.1k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Official

    Builds podcast-style audio narration from text with Azure OpenAI's GPT Realtime Mini over WebSocket, from a Python FastAPI backend to a React player.

    3.1k GitHub starsUsed in 1 repo~947 tokens
    Auto-check passed
  • Frontend UI Dark TS

    microsoft/skills

    Official

    Build dark-themed React applications using Tailwind CSS with custom theming, glassmorphism effects, and Framer Motion animations.

    3.1k GitHub starsUsed in 5 repos~3.6k tokens
    Auto-check passed
  • Pydantic Models Py

    microsoft/skills

    Official

    Create Pydantic models following the multi-model pattern with Base, Create, Update, Response, and InDB variants.

    3.1k GitHub starsUsed in 5 repos~496 tokens
    Auto-check passed
  • Official

    Reference for building on Microsoft Foundry with the azure-ai-projects Python SDK: project clients, versioned agents, evaluations, connections, datasets and indexes.

    3.1k GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Skill Creator

    microsoft/skills

    Official

    Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services.

    3.1k GitHub starsUsed in 5 repos~17k tokens
    Auto-check passed

Questions about Azure AI Translation TS

What does Azure AI Translation TS do?

Build translation applications using Azure Translation SDKs for JavaScript (@azure-rest/ai-translation-text, @azure-rest/ai-translation-document). Azure AI Translation TS is an agent skill from microsoft/skills, published by the product's own GitHub organization. Build translation applications using Azure Translation SDKs for JavaScript (@azure-rest/ai-translation-text, @azure-rest/ai-translation-document).

When should I use Azure AI Translation TS?

Azure AI Translation TS fits situations like: implementing text translation; transliteration; language detection; batch document translation.

How do I install Azure AI Translation TS in Claude Code?

Run `npx skills add microsoft/skills --skill azure-ai-translation-ts -a claude-code`. Or copy the skill folder (.github/plugins/azure-sdk-typescript/skills/azure-ai-translation-ts in microsoft/skills) into .claude/skills/azure-ai-translation-ts in your project. Claude Code loads it when a task matches its description.

How do I install Azure AI Translation TS in Codex?

Run `npx skills add microsoft/skills --skill azure-ai-translation-ts -a codex`. Or copy the skill folder (.github/plugins/azure-sdk-typescript/skills/azure-ai-translation-ts in microsoft/skills) into .agents/skills/azure-ai-translation-ts in your project. Codex loads it when a task matches its description.

Can I use Azure AI Translation TS 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 microsoft/skills --skill azure-ai-translation-ts -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/azure-ai-translation-ts, .gemini/skills/azure-ai-translation-ts, .github/skills/azure-ai-translation-ts and .opencode/skills/azure-ai-translation-ts in your project.

What does Azure AI Translation TS need to run?

Going by SKILL.md and its folder, Azure AI Translation TS needs the command-line tools its instructions call (npm) and credentials named AZURE_TOKEN_CREDENTIALS and TRANSLATOR_SUBSCRIPTION_KEY. Our summary lists: Node.js; A credential in TRANSLATOR_SUBSCRIPTION_KEY.

Does Azure AI Translation TS access the network?

SKILL.md names 2 domains. In commands or code: api.cognitive.microsofttranslator.com and learn.microsoft.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.

Is Azure AI Translation TS 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 Azure AI Translation TS use?

Azure AI Translation TS is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Azure AI Translation TS use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Azure AI Translation TS?

Skills that share tags, products or a category with Azure AI Translation TS: Azure AI Translation Text Py (aiskillstore/marketplace, 433 stars), Code Translation (ArabelaTso/Skills-4-SE, 253 stars), Azure Immersive Reader (MicrosoftDocs/Agent-Skills, 776 stars) and Azure Translator (MicrosoftDocs/Agent-Skills, 776 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Azure AI Translation TS?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/skills, which has 3,097 GitHub stars. The repository holds 150 skills in this directory. The repository was last updated on October 9, 2026.

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