Azure Document Intelligence for TypeScript
Extract document text, tables, and structured fields in TypeScript applications.
The skill exposes the data flows for API keys, DefaultAzureCredential, managed identity, endpoints, document URLs, and training-data SAS URLs, and it recommends managed identity; no credential theft, covert exfiltration, or destructive default is evident. However, it does not state that secrets must not be hard-coded, explain handling or retention for potentially sensitive personal documents, or provide confirmation, least-privilege, rollback, or external-impact controls, so points are deducted.
Installation, authentication, analysis, polling, pagination, and error-checking patterns are broadly coherent, with isUnexpected and long-running polling used repeatedly. Still, the supplied material contains no skill-specific tests or reproducible results; some examples such as receipt analysis omit error checking, and empty results, timeouts, service errors, version drift, and input validation are not covered. Under the static ceiling, the score cannot exceed 10, so points are deducted.
The name, description, and examples clearly target TypeScript users and cover invoices, receipts, IDs, forms, URL/local-file inputs, custom models, and classification. Boundaries for non-fit cases, service-version requirements, input/output contracts, semantic triggers, and Chinese-language support are not stated. The core function also depends on Azure services, with no mainland-China reachability or regional limitation guidance, so points are deducted.
The SKILL.md is readable and progressively organized around installation, authentication, task examples, models, polling, types, and best practices. It includes MIT licensing, Microsoft authorship, version 1.0.0, and the package name in metadata. It lacks a pinned SDK/API version, changelog, explicit maintenance owner and update path, FAQ, troubleshooting, known limitations, and complete prerequisites, so points are deducted.
The examples are directly reusable TypeScript starting points and cover common prebuilt models, URL/file input, custom models, classification, and pagination, providing clear value over starting manually. However, no executed evidence is supplied; output shapes and service-version compatibility are unverified, while secure document handling, retries, timeouts, confidence thresholds, and production integration remain for the user to add. Under the static ceiling, the score cannot exceed 7, so points are deducted.
The skill provides auditable code, package names, environment variables, and one official documentation reference; the repository materials also show generic CI and test infrastructure. They do not provide skill-specific tests, execution logs, pinned versions, or independent corroboration, and this review did not execute the code. Under the static ceiling, the score cannot exceed 5, so points are deducted.
- Do not hard-code or log API keys, SAS URLs, or document contents; prefer least-privilege managed identity and add rotation, retention, and access controls for production.
- Before adoption, verify paths, model IDs, output fields, and polling behavior against the current @azure-rest/ai-document-intelligence version, and add handling for timeouts, retries, empty results, and sensitive documents.
- The skill does not address mainland-China reachability, Azure regional restrictions, or Chinese locale/documentation support; verify these separately before deployment.
What it does & when to use it
This skill shows developers how to use the Azure Document Intelligence REST SDK for TypeScript to process documents. It covers OCR, layout, invoice, receipt, and identity-document prebuilt models, along with custom models and document classifiers. Authentication examples use either API keys or DefaultAzureCredential. Because analysis is asynchronous, the examples rely on long-running pollers, making the skill suitable for Node.js teams integrating document processing into applications.
Installs @azure-rest/ai-document-intelligence and @azure/identity, creates a DocumentIntelligence REST client, submits analysis requests from URLs or Base64-encoded local files, polls asynchronous operations, and reads text, tables, pages, fields, and related confidence information. It also demonstrates invoice and receipt field extraction, paginated model listing, custom model building, classifier building and classification, and service-information queries.
- A TypeScript developer extracting vendor names, totals, and due dates from invoices.
- A business application team processing receipts and their merchant, total, and line-item fields.
- An engineering team extracting text, tables, and selection marks from forms or layout-heavy PDFs.
- A developer building a custom purchase-order model from Azure Blob training data.
- An application that classifies incoming documents before routing them to different workflows.
Pros & cons
- Provides both URL and local-file input patterns.
- Covers text, tables, invoices, receipts, IDs, custom models, and classifiers.
- Shows both DefaultAzureCredential and API-key authentication.
- Includes error checking, asynchronous polling, progress monitoring, and pagination.
- Requires an Azure Document Intelligence resource, endpoint, and credentials.
- Document analysis is asynchronous, so callers must handle polling.
- Custom model and classifier examples require an Azure Blob SAS URL and training data.
- Does not include pricing, resource provisioning, or permission setup guidance.
How to install
Run npx skills add microsoft/skills and select this skill in the installation wizard. The README says skills are installed in the selected agent directory, such as .github/skills/ for GitHub Copilot, and can be shared across agents with symlinks. Install the application packages with npm install @azure-rest/ai-document-intelligence @azure/identity. The source does not document Azure resource provisioning or pricing.
How to use
After installation, ask an coding Agent something like: "Use the Azure Document Intelligence TypeScript REST SDK to extract VendorName, InvoiceTotal, and DueDate from an invoice URL, using DefaultAzureCredential, long-running polling, and error handling." Configure DOCUMENT_INTELLIGENCE_ENDPOINT, plus either DOCUMENT_INTELLIGENCE_API_KEY or AZURE_TOKEN_CREDENTIALS=prod depending on the authentication method. Submit the analysis, check errors with isUnexpected(), and wait for completion with getLongRunningPoller().
Compared to similar skills
The skill distinguishes prebuilt models from custom models and presents API-key and DefaultAzureCredential authentication paths. It does not compare other SDKs or competing services.