Official agent skill

Azure Search Documents TS

by microsoft in microsoft/skills

Build search applications using Azure AI Search SDK for JavaScript (@azure/search-documents).

OfficialMITAuto-check passedKnowledge Management

Install Azure Search Documents TS

skills CLI
$ npx skills add microsoft/skills --skill azure-search-documents-ts -a claude-code

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

GitHub CLI
$ gh skill install microsoft/skills azure-search-documents-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-search-documents-ts .claude/skills/azure-search-documents-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-search-documents-ts
GitHub stars
3.1k
Token cost
~1.8k tokens
SKILL.md length
109 words
Files
3 (incl. references)
Skills in repo
150
Repo updated
First seen
Licence
MIT

At a glance

Build search applications using Azure AI Search SDK for JavaScript (@azure/search-documents).

  • Works in 6 steps: Use hybrid search - Combine vector +… → Enable semantic ranking - Improves… → Batch document uploads - Use… → …
  • Creating/managing indexes
  • SKILL.md covers Installation, Environment Variables, Authentication and Core Workflow, plus 5 more sections
  • Calls npm; reaches learn.microsoft.com; needs AZURE_TOKEN_CREDENTIALS and AZURE_SEARCH_ADMIN_KEY

What it does

Azure Search Documents TS is an agent skill from microsoft/skills, published by the product's own GitHub organization. Build search applications using Azure AI Search SDK for JavaScript (@azure/search-documents). Use when creating/managing indexes, implementing vector/hybrid search, semantic ranking, or building agentic retrieval with knowledge bases.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/semantic-ranking.md` and `references/vector-search.md`).

It sits in Knowledge Management, covering Retrieval-augmented generation and Knowledge bases. It works with Azure AI Search, 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

  • Creating/managing indexes
  • Implementing vector/hybrid search
  • Semantic ranking
  • Building agentic retrieval with knowledge bases

Example prompts

  • “/azure-search-documents-ts”

Requirements

  • Node.js
  • A credential in AZURE_SEARCH_ADMIN_KEY

Workflow steps

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

  1. Use hybrid search - Combine vector + text for best results
  2. Enable semantic ranking - Improves relevance for natural language queries
  3. Batch document uploads - Use uploadDocuments with arrays, not single docs
  4. Use filters for security - Implement document-level security with filters
  5. Index incrementally - Use mergeOrUploadDocuments for updates
  6. Monitor query performance - Use includeTotalCount: true sparingly in production

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

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

Context cost

Azure Search Documents TS loads about 1.8k tokens when it runs, and up to ~7.2k if it reads all its reference files. Until then it costs about 65 tokens; SKILL.md has 109 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~65
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.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 354361d, republished under its MIT licence (© microsoft). 109 words, ~1,809 tokens.

Download SKILL.mdSave it as .claude/skills/azure-search-documents-ts/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
azure-search-documents-ts
description
Build search applications using Azure AI Search SDK for JavaScript (@azure/search-documents). Use when creating/managing indexes, implementing vector/hybrid search, semantic ranking, or building agentic retrieval with knowledge bases.
license
MIT
metadata.author
Microsoft
metadata.version
1.0.0
metadata.package
@azure/search-documents

Azure AI Search SDK for TypeScript

Build search applications with vector, hybrid, and semantic search capabilities.

Installation

bash
npm install @azure/search-documents @azure/identity

Environment Variables

bash
AZURE_SEARCH_ENDPOINT=https://<service-name>.search.windows.net
AZURE_SEARCH_INDEX_NAME=my-index
AZURE_SEARCH_ADMIN_KEY=<admin-key>  # Optional if using Entra ID
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production

Authentication

typescript
import { SearchClient, SearchIndexClient } from "@azure/search-documents";
import { DefaultAzureCredential, ManagedIdentityCredential } from "@azure/identity";

const endpoint = process.env.AZURE_SEARCH_ENDPOINT!;
const indexName = process.env.AZURE_SEARCH_INDEX_NAME!;
// 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();

// For searching
const searchClient = new SearchClient(endpoint, indexName, credential);

// For index management
const indexClient = new SearchIndexClient(endpoint, credential);

Core Workflow

Create Index with Vector Field
typescript
import { SearchIndex, SearchField, VectorSearch } from "@azure/search-documents";

const index: SearchIndex = {
  name: "products",
  fields: [
    { name: "id", type: "Edm.String", key: true },
    { name: "title", type: "Edm.String", searchable: true },
    { name: "description", type: "Edm.String", searchable: true },
    { name: "category", type: "Edm.String", filterable: true, facetable: true },
    {
      name: "embedding",
      type: "Collection(Edm.Single)",
      searchable: true,
      vectorSearchDimensions: 1536,
      vectorSearchProfileName: "vector-profile",
    },
  ],
  vectorSearch: {
    algorithms: [
      { name: "hnsw-algorithm", kind: "hnsw" },
    ],
    profiles: [
      { name: "vector-profile", algorithmConfigurationName: "hnsw-algorithm" },
    ],
  },
};

await indexClient.createOrUpdateIndex(index);
Index Documents
typescript
const documents = [
  { id: "1", title: "Widget", description: "A useful widget", category: "Tools", embedding: [...] },
  { id: "2", title: "Gadget", description: "A cool gadget", category: "Electronics", embedding: [...] },
];

const result = await searchClient.uploadDocuments(documents);
console.log(`Indexed ${result.results.length} documents`);
typescript
const results = await searchClient.search("widget", {
  select: ["id", "title", "description"],
  filter: "category eq 'Tools'",
  orderBy: ["title asc"],
  top: 10,
});

for await (const result of results.results) {
  console.log(`${result.document.title}: ${result.score}`);
}
typescript
const queryVector = await getEmbedding("useful tool"); // Your embedding function

const results = await searchClient.search("*", {
  vectorSearchOptions: {
    queries: [
      {
        kind: "vector",
        vector: queryVector,
        fields: ["embedding"],
        kNearestNeighborsCount: 10,
      },
    ],
  },
  select: ["id", "title", "description"],
});

for await (const result of results.results) {
  console.log(`${result.document.title}: ${result.score}`);
}
Hybrid Search (Text + Vector)
typescript
const queryVector = await getEmbedding("useful tool");

const results = await searchClient.search("tool", {
  vectorSearchOptions: {
    queries: [
      {
        kind: "vector",
        vector: queryVector,
        fields: ["embedding"],
        kNearestNeighborsCount: 50,
      },
    ],
  },
  select: ["id", "title", "description"],
  top: 10,
});
typescript
// Index must have semantic configuration
const index: SearchIndex = {
  name: "products",
  fields: [...],
  semanticSearch: {
    configurations: [
      {
        name: "semantic-config",
        prioritizedFields: {
          titleField: { name: "title" },
          contentFields: [{ name: "description" }],
        },
      },
    ],
  },
};

// Search with semantic ranking
const results = await searchClient.search("best tool for the job", {
  queryType: "semantic",
  semanticSearchOptions: {
    configurationName: "semantic-config",
    captions: { captionType: "extractive" },
    answers: { answerType: "extractive", count: 3 },
  },
  select: ["id", "title", "description"],
});

for await (const result of results.results) {
  console.log(`${result.document.title}`);
  console.log(`  Caption: ${result.captions?.[0]?.text}`);
  console.log(`  Reranker Score: ${result.rerankerScore}`);
}

Filtering and Facets

typescript
// Filter syntax
const results = await searchClient.search("*", {
  filter: "category eq 'Electronics' and price lt 100",
  facets: ["category,count:10", "brand"],
});

// Access facets
for (const [facetName, facetResults] of Object.entries(results.facets || {})) {
  console.log(`${facetName}:`);
  for (const facet of facetResults) {
    console.log(`  ${facet.value}: ${facet.count}`);
  }
}

Autocomplete and Suggestions

typescript
// Create suggester in index
const index: SearchIndex = {
  name: "products",
  fields: [...],
  suggesters: [
    { name: "sg", sourceFields: ["title", "description"] },
  ],
};

// Autocomplete
const autocomplete = await searchClient.autocomplete("wid", "sg", {
  mode: "twoTerms",
  top: 5,
});

// Suggestions
const suggestions = await searchClient.suggest("wid", "sg", {
  select: ["title"],
  top: 5,
});

Batch Operations

typescript
// Batch upload, merge, delete
const batch = [
  { upload: { id: "1", title: "New Item" } },
  { merge: { id: "2", title: "Updated Title" } },
  { delete: { id: "3" } },
];

const result = await searchClient.indexDocuments({ actions: batch });

Key Types

typescript
import {
  SearchClient,
  SearchIndexClient,
  SearchIndexerClient,
  SearchIndex,
  SearchField,
  SearchOptions,
  VectorSearch,
  SemanticSearch,
  SearchIterator,
} from "@azure/search-documents";

Best Practices

  1. Use hybrid search - Combine vector + text for best results
  2. Enable semantic ranking - Improves relevance for natural language queries
  3. Batch document uploads - Use uploadDocuments with arrays, not single docs
  4. Use filters for security - Implement document-level security with filters
  5. Index incrementally - Use mergeOrUploadDocuments for updates
  6. Monitor query performance - Use includeTotalCount: true sparingly in production

© 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

SKILL.md and 2 other files (references) in .github/plugins/azure-sdk-typescript/skills/azure-search-documents-ts of microsoft/skills.

  • SKILL.md
  • references/semantic-ranking.md
  • references/vector-search.md

Open the folder on GitHubat commit 354361d

Compare with similar skills

Azure Search Documents 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 Search Documents TS compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Azure Search Documents TS this skillmicrosoft/skills3.1k—~1.8kAutomated safety check: PassMIT
Gnogmickel/gno1151 repos~1.6kAutomated safety check: PassMIT
Gnogmickel/gno115—~11kAutomated safety check: PassMIT
Azure AImicrosoft/GitHub-Copilot-for-Azure2552 repos~852Automated safety check: PassMIT
Bedrock Agentsmajiayu000/claude-skill-registry6661 repos~10kAutomated safety check: NotesMIT
Qmd 4sundial-org/awesome-openclaw-skills663—~699Automated safety check: PassNone

Similar skills

  • Gno

    gmickel/gno

    Search local documents, files, notes, and knowledge bases. An agent skill from gmickel/gno.

    115 GitHub starsUsed in 1 repo~1.6k tokens
    Knowledge ManagementAuto-check passed
  • Gno

    gmickel/gno

    Search local documents, files, notes, and knowledge bases. An agent skill from gmickel/gno.

    115 GitHub stars~11k tokensUpdated today
    Knowledge ManagementAuto-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
  • Bedrock Agents

    majiayu000/claude-skill-registry

    Amazon Bedrock Agents for building autonomous AI agents with foundation model orchestration, action groups, knowledge bases, and session management.

    666 GitHub starsUsed in 1 repo~10k tokens
    Knowledge ManagementAuto-check: notes
  • Qmd 4

    sundial-org/awesome-openclaw-skills

    Search and retrieve markdown documents from local knowledge bases using qmd.

    663 GitHub stars~699 tokensUpdated 7 mo ago
    Knowledge ManagementAuto-check passed
  • Logseq Plugin SDK

    logseq/logseq

    Build, debug, or review Logseq plugins with the @logseq/libs SDK (TypeScript/JavaScript, iframe/shadow sandboxed).

    45k GitHub stars~2.3k tokensUpdated today
    Knowledge ManagementAuto-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 Search Documents TS

What does Azure Search Documents TS do?

Build search applications using Azure AI Search SDK for JavaScript (@azure/search-documents). Azure Search Documents TS is an agent skill from microsoft/skills, published by the product's own GitHub organization. Build search applications using Azure AI Search SDK for JavaScript (@azure/search-documents).

When should I use Azure Search Documents TS?

Azure Search Documents TS fits situations like: creating/managing indexes; implementing vector/hybrid search; semantic ranking; building agentic retrieval with knowledge bases.

How do I install Azure Search Documents TS in Claude Code?

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

How do I install Azure Search Documents TS in Codex?

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

Can I use Azure Search Documents 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-search-documents-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-search-documents-ts, .gemini/skills/azure-search-documents-ts, .github/skills/azure-search-documents-ts and .opencode/skills/azure-search-documents-ts in your project.

What does Azure Search Documents TS need to run?

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

Does Azure Search Documents 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 Search Documents 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 Search Documents TS use?

Azure Search Documents 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 Search Documents TS use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.3k tokens, read only when the agent opens those files.

What are the alternatives to Azure Search Documents TS?

Skills that share tags, products or a category with Azure Search Documents TS: Gno (gmickel/gno, 115 stars), Gno (gmickel/gno, 115 stars), Azure AI (microsoft/GitHub-Copilot-for-Azure, 255 stars) and Bedrock Agents (majiayu000/claude-skill-registry, 666 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Azure Search Documents 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.