Official agent skill

Azure AI Document Intelligence TS

by microsoft in microsoft/skills

Extract text, tables, and structured data from documents using Azure Document Intelligence (@azure-rest/ai-document-intelligence).

OfficialMITAuto-check passedDocuments & Office

Install Azure AI Document Intelligence TS

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

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

GitHub CLI
$ gh skill install microsoft/skills azure-ai-document-intelligence-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-document-intelligence-ts .claude/skills/azure-ai-document-intelligence-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-document-intelligence-ts
GitHub stars
3.1k
Used in
6 other repos
Token cost
~2.4k tokens
SKILL.md length
187 words
Files
1
Skills in repo
150
Repo updated
First seen
Licence
MIT

At a glance

Extract text, tables, and structured data from documents using Azure Document Intelligence (@azure-rest/ai-document-intelligence).

  • Works in 6 steps: Use getLongRunningPoller() - Document… → Check isUnexpected() - Type guard for… → Choose the right model - Use prebuilt… → …
  • Processing invoices
  • SKILL.md covers Installation, Environment Variables, Authentication and Analyze Document (URL), plus 12 more sections
  • Calls npm; reaches learn.microsoft.com; needs AZURE_TOKEN_CREDENTIALS and DOCUMENT_INTELLIGENCE_API_KEY

What it does

Azure AI Document Intelligence TS is an agent skill from microsoft/skills, published by the product's own GitHub organization. Extract text, tables, and structured data from documents using Azure Document Intelligence (@azure-rest/ai-document-intelligence). Use when processing invoices, receipts, IDs, forms, or building custom document models.

Its SKILL.md is about 2.4k 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 Documents & Office, covering Forms and invoices and Schema markup. It works with Azure AI Document Intelligence, Microsoft Azure and TypeScript. 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

  • Processing invoices
  • Building custom document models

Example prompts

  • “/azure-ai-document-intelligence-ts”

Requirements

  • Node.js
  • A credential in DOCUMENT_INTELLIGENCE_API_KEY

Workflow steps

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

  1. Use getLongRunningPoller() - Document analysis is async, always poll for results
  2. Check isUnexpected() - Type guard for proper error handling
  3. Choose the right model - Use prebuilt models when possible, custom for specialized docs
  4. Handle confidence scores - Fields have confidence values, set thresholds for your use case
  5. Use pagination - Use paginate() helper for listing models
  6. Prefer neural mode - For custom models, neural handles more variation than template

What it can do on your machine

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

    • 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
    • DOCUMENT_INTELLIGENCE_API_KEY

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

Context cost

Azure AI Document Intelligence TS loads about 2.4k tokens when it runs. Until then it costs about 63 tokens; SKILL.md has 187 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~2.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 microsoft/skills at commit 354361d, republished under its MIT licence (© microsoft). 187 words, ~2,435 tokens.

Download SKILL.mdSave it as .claude/skills/azure-ai-document-intelligence-ts/SKILL.md (or your agent's skills folder).
name
azure-ai-document-intelligence-ts
description
Extract text, tables, and structured data from documents using Azure Document Intelligence (@azure-rest/ai-document-intelligence). Use when processing invoices, receipts, IDs, forms, or building custom document models.
license
MIT
metadata.author
Microsoft
metadata.version
1.0.0
metadata.package
@azure-rest/ai-document-intelligence

Azure Document Intelligence REST SDK for TypeScript

Extract text, tables, and structured data from documents using prebuilt and custom models.

Installation

bash
npm install @azure-rest/ai-document-intelligence @azure/identity

Environment Variables

bash
DOCUMENT_INTELLIGENCE_ENDPOINT=https://<resource>.cognitiveservices.azure.com
DOCUMENT_INTELLIGENCE_API_KEY=<api-key>
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production

Authentication

Important: This is a REST client. DocumentIntelligence is a function, not a class.

DefaultAzureCredential
typescript
import DocumentIntelligence from "@azure-rest/ai-document-intelligence";
import { DefaultAzureCredential, ManagedIdentityCredential } from "@azure/identity";

// 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();

const client = DocumentIntelligence(
  process.env.DOCUMENT_INTELLIGENCE_ENDPOINT!,
  credential
);
API Key
typescript
import DocumentIntelligence from "@azure-rest/ai-document-intelligence";

const client = DocumentIntelligence(
  process.env.DOCUMENT_INTELLIGENCE_ENDPOINT!,
  { key: process.env.DOCUMENT_INTELLIGENCE_API_KEY! }
);

Analyze Document (URL)

typescript
import DocumentIntelligence, {
  isUnexpected,
  getLongRunningPoller,
  AnalyzeOperationOutput
} from "@azure-rest/ai-document-intelligence";

const initialResponse = await client
  .path("/documentModels/{modelId}:analyze", "prebuilt-layout")
  .post({
    contentType: "application/json",
    body: {
      urlSource: "https://example.com/document.pdf"
    },
    queryParameters: { locale: "en-US" }
  });

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

const poller = getLongRunningPoller(client, initialResponse);
const result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;

console.log("Pages:", result.analyzeResult?.pages?.length);
console.log("Tables:", result.analyzeResult?.tables?.length);

Analyze Document (Local File)

typescript
import { readFile } from "node:fs/promises";

const fileBuffer = await readFile("./document.pdf");
const base64Source = fileBuffer.toString("base64");

const initialResponse = await client
  .path("/documentModels/{modelId}:analyze", "prebuilt-invoice")
  .post({
    contentType: "application/json",
    body: { base64Source }
  });

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

const poller = getLongRunningPoller(client, initialResponse);
const result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;

Prebuilt Models

Model IDDescription
prebuilt-readOCR - text and language extraction
prebuilt-layoutText, tables, selection marks, structure
prebuilt-invoiceInvoice fields
prebuilt-receiptReceipt fields
prebuilt-idDocumentID document fields
prebuilt-tax.us.w2W-2 tax form fields
prebuilt-healthInsuranceCard.usHealth insurance card fields
prebuilt-contractContract fields
prebuilt-bankStatement.usBank statement fields

Extract Invoice Fields

typescript
const initialResponse = await client
  .path("/documentModels/{modelId}:analyze", "prebuilt-invoice")
  .post({
    contentType: "application/json",
    body: { urlSource: invoiceUrl }
  });

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

const poller = getLongRunningPoller(client, initialResponse);
const result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;

const invoice = result.analyzeResult?.documents?.[0];
if (invoice) {
  console.log("Vendor:", invoice.fields?.VendorName?.content);
  console.log("Total:", invoice.fields?.InvoiceTotal?.content);
  console.log("Due Date:", invoice.fields?.DueDate?.content);
}

Extract Receipt Fields

typescript
const initialResponse = await client
  .path("/documentModels/{modelId}:analyze", "prebuilt-receipt")
  .post({
    contentType: "application/json",
    body: { urlSource: receiptUrl }
  });

const poller = getLongRunningPoller(client, initialResponse);
const result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;

const receipt = result.analyzeResult?.documents?.[0];
if (receipt) {
  console.log("Merchant:", receipt.fields?.MerchantName?.content);
  console.log("Total:", receipt.fields?.Total?.content);
  
  for (const item of receipt.fields?.Items?.values || []) {
    console.log("Item:", item.properties?.Description?.content);
    console.log("Price:", item.properties?.TotalPrice?.content);
  }
}

List Document Models

typescript
import DocumentIntelligence, { isUnexpected, paginate } from "@azure-rest/ai-document-intelligence";

const response = await client.path("/documentModels").get();

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

for await (const model of paginate(client, response)) {
  console.log(model.modelId);
}

Build Custom Model

typescript
const initialResponse = await client.path("/documentModels:build").post({
  body: {
    modelId: "my-custom-model",
    description: "Custom model for purchase orders",
    buildMode: "template",  // or "neural"
    azureBlobSource: {
      containerUrl: process.env.TRAINING_CONTAINER_SAS_URL!,
      prefix: "training-data/"
    }
  }
});

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

const poller = getLongRunningPoller(client, initialResponse);
const result = await poller.pollUntilDone();
console.log("Model built:", result.body);

Build Document Classifier

typescript
import { DocumentClassifierBuildOperationDetailsOutput } from "@azure-rest/ai-document-intelligence";

const containerSasUrl = process.env.TRAINING_CONTAINER_SAS_URL!;

const initialResponse = await client.path("/documentClassifiers:build").post({
  body: {
    classifierId: "my-classifier",
    description: "Invoice vs Receipt classifier",
    docTypes: {
      invoices: {
        azureBlobSource: { containerUrl: containerSasUrl, prefix: "invoices/" }
      },
      receipts: {
        azureBlobSource: { containerUrl: containerSasUrl, prefix: "receipts/" }
      }
    }
  }
});

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

const poller = getLongRunningPoller(client, initialResponse);
const result = (await poller.pollUntilDone()).body as DocumentClassifierBuildOperationDetailsOutput;
console.log("Classifier:", result.result?.classifierId);

Classify Document

typescript
const initialResponse = await client
  .path("/documentClassifiers/{classifierId}:analyze", "my-classifier")
  .post({
    contentType: "application/json",
    body: { urlSource: documentUrl },
    queryParameters: { split: "auto" }
  });

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

const poller = getLongRunningPoller(client, initialResponse);
const result = await poller.pollUntilDone();
console.log("Classification:", result.body.analyzeResult?.documents);

Get Service Info

typescript
const response = await client.path("/info").get();

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

console.log("Custom model limit:", response.body.customDocumentModels.limit);
console.log("Custom model count:", response.body.customDocumentModels.count);

Polling Pattern

typescript
import DocumentIntelligence, {
  isUnexpected,
  getLongRunningPoller,
  AnalyzeOperationOutput
} from "@azure-rest/ai-document-intelligence";

// 1. Start operation
const initialResponse = await client
  .path("/documentModels/{modelId}:analyze", "prebuilt-layout")
  .post({ contentType: "application/json", body: { urlSource } });

// 2. Check for errors
if (isUnexpected(initialResponse)) {
  throw initialResponse.body.error;
}

// 3. Create poller
const poller = getLongRunningPoller(client, initialResponse);

// 4. Optional: Monitor progress
poller.onProgress((state) => {
  console.log("Status:", state.status);
});

// 5. Wait for completion
const result = (await poller.pollUntilDone()).body as AnalyzeOperationOutput;

Key Types

typescript
import DocumentIntelligence, {
  isUnexpected,
  getLongRunningPoller,
  paginate,
  parseResultIdFromResponse,
  AnalyzeOperationOutput,
  DocumentClassifierBuildOperationDetailsOutput
} from "@azure-rest/ai-document-intelligence";

Best Practices

  1. Use getLongRunningPoller() - Document analysis is async, always poll for results
  2. Check isUnexpected() - Type guard for proper error handling
  3. Choose the right model - Use prebuilt models when possible, custom for specialized docs
  4. Handle confidence scores - Fields have confidence values, set thresholds for your use case
  5. Use pagination - Use paginate() helper for listing models
  6. Prefer neural mode - For custom models, neural handles more variation than template

© 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-document-intelligence-ts of microsoft/skills.

Open the folder on GitHubat commit 354361d

Used in 6 other repositories

We found 17 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 6 other GitHub owners. This page covers the copy in microsoft/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Azure AI Document Intelligence 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 Document Intelligence TS compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Azure AI Document Intelligence TS this skillmicrosoft/skills3.1k6 repos~2.4kAutomated safety check: PassMIT
Extracting Structured DataGAIK-project/gaik-toolkit100—~3.2kAutomated safety check: PassMIT
Azure AImicrosoft/GitHub-Copilot-for-Azure2552 repos~852Automated safety check: PassMIT
PDF Generation, Forms and Extractionpipeshub-ai/pipeshub-ai3.8k—~2.9kAutomated safety check: PassApache-2.0
React PDFtrailofbits/skills-curated512—~3.1kAutomated safety check: NotesCC-BY-SA-4.0
Doc ProcessLeoYeAI/openclaw-master-skills2.2k—~5.2kAutomated safety check: NotesMIT

Similar skills

  • Extracting Structured Data

    GAIK-project/gaik-toolkit

    Extracts structured data — fields, tables, line items — out of documents into a validated schema using the gaik toolkit, and designs schemas that stay inside provider limits and produce checkable…

    100 GitHub stars~3.2k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Azure AI

    microsoft/GitHub-Copilot-for-Azure

    Official

    A skill your agent uses for Azure AI: Search, Speech, OpenAI, Document Intelligence.

    255 GitHub starsUsed in 2 repos~852 tokens
    Media & CreativeAuto-check passed
  • Picks the right library for generating a new PDF, filling an existing PDF form, or extracting text and tables, defaulting to Node where possible.

    3.8k GitHub stars~2.9k tokensUpdated today
    Documents & OfficeAuto-check passed
  • React PDF

    trailofbits/skills-curated

    Official

    Generates PDF documents using the React-PDF library (@react-pdf/renderer) with TypeScript and JSX.

    512 GitHub stars~3.1k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check: notes
  • Doc Process

    LeoYeAI/openclaw-master-skills

    Document intelligence: categorize, autofill forms, analyze contracts, scan receipts/invoices, analyze bank statements, parse resumes/CVs, scan IDs/passports (MRZ), summarize medical records, redact…

    2.2k GitHub stars~5.2k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check: notes
  • Form Filling

    platonai/Browser4

    Automatically fills web forms using provided field data and can optionally submit the form.

    1.2k GitHub stars~1.1k tokensUpdated today
    Documents & OfficeAuto-check passed

More from microsoft/skills

All 150 skills in this repo
  • 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 starsUsed in 6 repos~2.8k tokens
    Auto-check passed
  • Official

    Python guidance for the Azure AI Search SDK covering vector, hybrid and semantic search, index management and indexers, with Entra ID authentication preferred over keys.

    3.1k GitHub starsUsed in 6 repos~4.4k tokens
    Auto-check passed
  • 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
  • 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 6 repos~496 tokens
    Auto-check passed
  • DebugView CLI

    microsoft/skills

    Official

    Captures and filters Windows user-mode and kernel debug output from the command line with the Sysinternals DebugView CLI, including bounded runs suited to agents.

    3.1k GitHub starsUsed in 1 repo~2.7k 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

Questions about Azure AI Document Intelligence TS

What does Azure AI Document Intelligence TS do?

Extract text, tables, and structured data from documents using Azure Document Intelligence (@azure-rest/ai-document-intelligence). Azure AI Document Intelligence TS is an agent skill from microsoft/skills, published by the product's own GitHub organization. Extract text, tables, and structured data from documents using Azure Document Intelligence (@azure-rest/ai-document-intelligence).

When should I use Azure AI Document Intelligence TS?

Azure AI Document Intelligence TS fits situations like: processing invoices; building custom document models.

How do I install Azure AI Document Intelligence TS in Claude Code?

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

How do I install Azure AI Document Intelligence TS in Codex?

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

Can I use Azure AI Document Intelligence 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-document-intelligence-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-document-intelligence-ts, .gemini/skills/azure-ai-document-intelligence-ts, .github/skills/azure-ai-document-intelligence-ts and .opencode/skills/azure-ai-document-intelligence-ts in your project.

What does Azure AI Document Intelligence TS need to run?

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

Does Azure AI Document Intelligence TS access the network?

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

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

Azure AI Document Intelligence 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 Document Intelligence TS use?

About 2.4k tokens (SKILL.md is roughly 9.7k 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 Document Intelligence TS?

Skills that share tags, products or a category with Azure AI Document Intelligence TS: Extracting Structured Data (GAIK-project/gaik-toolkit, 100 stars), Azure AI (microsoft/GitHub-Copilot-for-Azure, 255 stars), PDF Generation, Forms and Extraction (pipeshub-ai/pipeshub-ai, 3.8k stars) and React PDF (trailofbits/skills-curated, 512 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Azure AI Document Intelligence TS?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/skills, which has 3,091 GitHub stars. The repository holds 150 skills in this directory. The repository was last updated on October 6, 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.