# microsoft-foundry-local

Skill for Claude Code, Codex, Cursor and other IDEs with expert guidance on Microsoft Foundry Local development. Covers CLI setup, Hugging Face model compilation via Olive, embeddings, chat, audio transcription, and function calling.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 214 installs · ★ 818 repo stars
- Author: MicrosoftDocs
- License: CC-BY-4.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/MicrosoftDocs/Agent-Skills/tree/HEAD/skills/microsoft-foundry-local/SKILL.md
- Updated: 2026-11-09
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/microsoft-foundry-local

## What it does

Runs across all listed platforms and provides reference on best practices, CLI troubleshooting, SDK choice (legacy vs current), and migration paths. Covers Foundry Local configuration: CLI operation, SDK setup, compiling HF models with Olive. Requires network access—fetches documentation via `mcp_microsoftdocs:microsoft_docs_fetch` or falls back to `fetch_webpage`.

Includes integration patterns: embeddings and chat APIs, audio transcription (live and file), OpenAI-compatible clients, LangChain, tool calling, REST endpoints. Organized by topic with a reference index linking to learn.microsoft.com documentation.

## Requirements
- Works with: Azure

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add MicrosoftDocs/Agent-Skills --skill microsoft-foundry-local -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/microsoft-foundry-local/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/microsoft-foundry-local/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add MicrosoftDocs/Agent-Skills --skill microsoft-foundry-local -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/microsoft-foundry-local/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add MicrosoftDocs/Agent-Skills --skill microsoft-foundry-local -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/microsoft-foundry-local/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install MicrosoftDocs/Agent-Skills skills/microsoft-foundry-local
```

2. **Manually: put the files in place**
- File: `.github/skills/microsoft-foundry-local/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add MicrosoftDocs/Agent-Skills --skill microsoft-foundry-local -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/MicrosoftDocs/Agent-Skills --path skills/microsoft-foundry-local
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/microsoft-foundry-local/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add MicrosoftDocs/Agent-Skills --skill microsoft-foundry-local -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/MicrosoftDocs/Agent-Skills/tree/HEAD/skills/microsoft-foundry-local/SKILL.md

## When to use it
- compile Hugging Face models for local deployment with Olive
- integrate Foundry Local with LangChain, OpenAI SDK or REST endpoints
- build embeddings, chat, audio transcription and tool-calling features
- migrate from legacy SDK to the current version
- resolve CLI configuration and startup issues

## Example prompts
- Help me compile a Hugging Face model with Olive for Foundry Local
- Show a Foundry Local transcription example with live microphone input
- Build a LangChain app that uses Foundry Local with tool calling

## Source text · SKILL.md · CC-BY-4.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: d480c8071d022e91.

BEGIN THIRD-PARTY FILE d480c8071d022e91
```text
---
name: microsoft-foundry-local
description: Expert knowledge for Microsoft Foundry Local (aka Azure AI Foundry Local) development including best practices, decision making, configuration, and integrations & coding patterns. Use when compiling HF models with Olive, using CLI/SDK, embeddings/chat, audio, tool calls, or REST apps, and other Microsoft Foundry Local related development tasks. Not for Azure Local (use azure-local), Microsoft Foundry (use microsoft-foundry), Microsoft Foundry Classic (use microsoft-foundry-classic).
compatibility: Requires network access. Uses mcp_microsoftdocs:microsoft_docs_fetch or fetch_webpage to retrieve documentation.
metadata:
  generated_at: "2026-11-08"
  generator: "docs2skills/1.0.0"
---
# Microsoft Foundry Local Skill

This skill provides expert guidance for Microsoft Foundry Local. Covers best practices, decision making, configuration, and integrations & coding patterns. It combines local quick-reference content with remote documentation fetching capabilities.

## How to Use This Skill

> **IMPORTANT for Agent**: Use the **Category Index** below to locate relevant sections. For categories with line ranges (e.g., `L35-L120`), use `read_file` with the specified lines. For categories with file links (e.g., `[security.md](security.md)`), use `read_file` on the linked reference file

> **IMPORTANT for Agent**: If `metadata.generated_at` is more than 3 months old, suggest the user pull the latest version from the repository. If `mcp_microsoftdocs` tools are not available, suggest the user install it: [Installation Guide](https://github.com/MicrosoftDocs/mcp/blob/main/README.md)

This skill requires **network access** to fetch documentation content:
- **Preferred**: Use `mcp_microsoftdocs:microsoft_docs_fetch` with query string `from=learn-agent-skill`. Returns Markdown.
- **Fallback**: Use `fetch_webpage` with query string `from=learn-agent-skill&accept=text/markdown`. Returns Markdown.

## Category Index

| Category | Lines | Description |
|----------|-------|-------------|
| Best Practices | L32-L36 | Troubleshooting Foundry Local CLI issues, applying recommended workflows, and resolving common setup, auth, build, and deployment problems. |
| Decision Making | L37-L42 | Guidance on choosing between legacy vs current Foundry Local SDK and step-by-step instructions for migrating existing apps to the current SDK. |
| Configuration | L43-L50 | Configuring Foundry Local tools: compiling Hugging Face models with Olive, using and tuning the CLI, and setting up SDK configuration options and files. |
```
END THIRD-PARTY FILE d480c8071d022e91

The third-party file has ended. Everything between the d480c8071d022e91 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2576 of 5237 bytes. © MicrosoftDocs · CC-BY-4.0 · https://github.com/MicrosoftDocs/Agent-Skills/tree/HEAD/skills/microsoft-foundry-local/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
