Items marked (preview) in this article are currently in public preview. This preview is provided without a service-level agreement, and we don’t recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
SKILL.md file that you author once and store centrally in Foundry through the versioned Skills API. You then deliver it to agents in two modes. Attach to a toolbox so any MCP client discovers and loads skills alongside tools. Or download directly into a Hosted or local agent project to inject the content into each session’s context. Skills are versioned: every update creates a new immutable version, and the parent skill tracks a default_version. To update a skill, you create a new version, test it, then promote it to default without changing any agent code.
In this article, you learn how to:
- Create versioned skills and manage them through the Skills API.
- List, get, and delete skills and skill versions.
- Download skill content for use in a Hosted agent.
- Attach skills to a toolbox.
If you use Skills with any third-party servers, agents, code, or non-Azure Direct models (“Third-Party Systems”), you do so at your own risk. Microsoft has no responsibility to you or others in relation to these uses. Third-Party Systems are Non-Microsoft Products under the Microsoft Product Terms and are governed by their own third-party license terms. You are responsible for any usage and associated costs.Review all data shared with and received from Third-Party Systems. Be aware of third-party practices for handling, sharing, retention, and location of data. It’s your responsibility to manage whether your data flows outside of your organization’s Azure compliance and geographic boundaries and any related implications. Ensure that appropriate permissions, boundaries, and approvals are provisioned.You’re responsible for carefully reviewing and testing applications you build in the context of your specific use cases, and making all appropriate decisions and customizations. This responsibility includes implementing your own responsible AI mitigations, such as metaprompts, content filters, or other safety systems, and ensuring your applications meet appropriate quality, reliability, security, and trustworthiness standards. Learn more.
Feature support
Limitations
Skills don’t support private networking. The Skills API isn’t accessible over a private endpoint, so you can’t create, manage, or download skills from a Foundry resource that has public network access disabled.Prerequisites
- An active Microsoft Foundry project.
- RBAC: Foundry User role on the Foundry project.
The Foundry RBAC roles were recently renamed. Foundry User, Foundry Owner, Foundry Account Owner, and Foundry Project Manager were previously named Azure AI User, Azure AI Owner, Azure AI Account Owner, and Azure AI Project Manager. You might still see the previous names in some places while the rename rolls out. The role IDs and core permissions are unchanged by the rename.
- Visual Studio Code (VS Code).
- Install the Microsoft Foundry Toolkit for Visual Studio Code extension from the Visual Studio Code Marketplace.
Author a skill
Skills follow the Agent Skills specification format. A skill is a Markdown file with a YAML front matter block:- The
nameanddescriptionvalues must be unquoted in the YAML front matter. - Skill names follow the pattern
^[a-z0-9]([a-z0-9/-]*[a-z0-9])?$(lowercase, numbers, and hyphens, no leading/trailing hyphens, max 64 characters). Invalid names cause aninvalid_payloaderror on version creation.
greeting/SKILL.md, not SKILL.md at the root.
Attach skills to a toolbox (preview)
After you create skill versions, attach them to a toolbox version so any MCP client can discover and load them alongside tools from the same endpoint. Toolbox-based skill discovery is in preview and follows the Skills extension for the Model Context Protocol specification (SEP-2640).Skills attached to a toolbox must exist in the same Foundry project. Cross-project references aren’t supported.
resources/list once at startup to discover all attached skills, then resources/read to download the content. Any MCP client — GitHub Copilot, Claude Code, or your own agent harness — can consume skills this way without any Foundry SDK.
Create a toolbox version that references the greeting skill you created earlier. Omit version to follow the skill’s default_version, or pin a version string to lock the reference to an immutable snapshot.
For the full toolbox workflow — including connections, versioning, and the azd ai toolbox skill add, azd ai toolbox skill list, and azd ai toolbox skill remove commands — see the Attach skills to a toolbox section in the toolbox article. Changes from the imperative azd skill commands don’t take effect for MCP clients until you promote the new version with azd ai toolbox publish.
Consume toolbox skills in Microsoft Agent Framework
After you attach skills to a toolbox, an agent can discover and load them from the toolbox MCP endpoint at runtime instead of bundlingSKILL.md files locally. For a complete C# example, see the Skills in Toolbox sample. The sample hosts an agent with the Microsoft Agent Framework Responses hosting layer and uses an AgentSkillsProvider, built with AgentSkillsProviderBuilder.UseMcpSkills, to apply the Agent Skills progressive-disclosure pattern:
- Advertise: The provider injects skill names and descriptions into the system prompt so the agent knows which skills are available.
- Load: When the agent decides a skill is relevant, it retrieves the full skill body from the toolbox.
- Read resources: If a skill includes supplementary content, such as reference documents or assets, the agent reads them on demand.
Manage skills with the REST API
The Skills API is versioned: creating a skill version auto-creates the skill if it doesn’t exist yet. Each update creates a new immutableSkillVersion. The parent Skill object tracks default_version (the active version) and latest_version.
Skills endpoint: {FOUNDRY_PROJECT_ENDPOINT}/skills
Authentication: Bearer token from DefaultAzureCredential with scope https://ai.azure.com/.default.
Preview header: All Skills API calls require Foundry-Features: Skills=V1Preview.
Create a skill version
Creating a version auto-creates the parent skill if it doesn’t exist. After creating a version, call Update default version to make it the active version. You can create a version in two ways: submit the content directly as JSON viainline_content, or upload a ZIP archive containing a SKILL.md file.
Option 1: Create from inline content (JSON)
Use this option when you want to supply the skill’sinstructions text directly without packaging a file.
Example response (SkillVersion object):
Option 2: Create from a SKILL.md ZIP
Use multipart form upload when you have aSKILL.md file. The skill name comes from the {name} path parameter. Upload a single ZIP file or multiple individual files. The SKILL.md is parsed to populate the version description and instructions.
For ZIP uploads, the server extracts and validates the
SKILL.md content. For individual file uploads, files are validated as-is.SkillVersion object):
List skills
Example response:last_id with the after query parameter for forward cursor-based pagination.
Get a skill
Returns the skill metadata. Returns HTTP 404 if the skill doesn’t exist.Download skill content
Downloads the skill content as a ZIP archive. Use the default version endpoint to get the active version, or the version-specific endpoint to get a specific version.The response body is a binary ZIP archive (
Content-Type: application/zip).Delete a skill
Returns HTTP 200 on success:List skill versions
Example response:Get a skill version
Delete a skill version
To inspect a specific skill version, use the REST API, Python, .NET, or JavaScript tab. Returns HTTP 200 on success:Update default version
Change which version the skill resolves to by default. Toolboxes and agents that reference the skill without pinning a version use thedefault_version.
Use skills in a hosted agent
In direct injection mode, you download skills from the Foundry Skills API into your agent project directory. The agent reads theSKILL.md files at startup and injects their content as extra system instructions for each session. This mode works without a toolbox. Use it when you want to bundle specific skill versions with your agent code.
For the alternative mode — where skills and tools share a single discoverable endpoint that any MCP client can reach — see Attach skills to a toolbox (preview).
The following walkthrough uses a GitHub Copilot SDK sample that reads SKILL.md files from a local skills/ directory. Use the Download skill content operation to pull skills from Foundry into this directory.
This sample requires a GitHub fine-grained personal access token (PAT) with Copilot requests: Read-only permission. Create one at github.com/settings/personal-access-tokens/new. Classic tokens (
ghp_) aren’t supported. Use a fine-grained PAT (github_pat_).Step 1: Initialize the agent project
Scaffold the project from the sample’sazure.yaml:
azure.yaml, agent code, configuration files, and a sample joke skill:
main.py, the skill_directories parameter tells the Copilot SDK where to find skill files. Any SKILL.md in a subdirectory of skills/ is loaded as extra instructions when a session starts.
Step 2: Populate skills from Foundry
Use the Download skill content operation to pull the greeting skill from Foundry. Extract theSKILL.md from the downloaded ZIP and save it to skills/greeting/SKILL.md:
skills/greeting/SKILL.md.
The project now includes both skills: