Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services. Use when creating new skills or updating existing skills.
Guide for creating effective skills for AI coding agents working with Azure SDKs and Microsoft Foundry services. Use when creating new skills or updating existing skills.
risk
unknown
source
community
date_added
2026-02-27
Skill Creator
Guide for creating skills that extend AI agent capabilities, with emphasis on Azure SDKs and Microsoft Foundry.
Required Context: When creating SDK or API skills, users MUST provide the SDK package name, documentation URL, or repository reference for the skill to be based on.
About Skills
Skills are modular knowledge packages that transform general-purpose agents into specialized experts:
Procedural knowledge — Multi-step workflows for specific domains
SDK expertise — API patterns, authentication, error handling for Azure services
Domain context — Schemas, business logic, company-specific patterns
Bundled resources — Scripts, references, templates for complex tasks
Core Principles
1. Concise is Key
The context window is a shared resource. Challenge each piece: "Does this justify its token cost?"
Default assumption: Agents are already capable. Only add what they don't already know.
2. Fresh Documentation First
Azure SDKs change constantly. Skills should instruct agents to verify documentation:
## Before Implementation
Search `microsoft-docs` MCP for current API patterns:
- Query: "[SDK name] [operation] python"
- Verify: Parameters match your installed SDK version
3. Degrees of Freedom
Match specificity to task fragility:
Freedom
When
Example
High
Multiple valid approaches
Text guidelines
Medium
Preferred pattern with variation
Pseudocode
Low
Must be exact
Specific scripts
4. Progressive Disclosure
Skills load in three levels:
Metadata (~100 words) — Always in context
SKILL.md body (<5k words) — When skill triggers
References (unlimited) — As needed
Keep SKILL.md under 500 lines. Split into reference files when approaching this limit.
To create this skill, I need:
1. The SDK package name (e.g., azure-ai-projects)
2. The Microsoft Learn documentation URL or GitHub repo
3. The target language (py/dotnet/ts/java)
Search official docs first:
# Use microsoft-docs MCP to get current API patterns# Query: "[SDK name] [operation] [language]"# Verify: Parameters match the latest SDK version
Step 2: Understand the Skill
Gather concrete examples:
"What SDK operations should this skill cover?"
"What triggers should activate this skill?"
"What errors do developers commonly encounter?"
Example Task
Reusable Resource
Same auth code each time
Code example in SKILL.md
Complex streaming patterns
references/streaming.md
Tool configurations
references/tools.md
Error handling patterns
references/error-handling.md
Step 3: Plan Product Area Category
Skills are organized by language and product area in the skills/ directory via symlinks.
Product Area Categories:
Category
Description
Examples
foundry
AI Foundry, agents, projects, inference
azure-ai-agents-py, azure-ai-projects-py
data
Storage, Cosmos DB, Tables, Data Lake
azure-cosmos-py, azure-storage-blob-py
messaging
Event Hubs, Service Bus, Event Grid
azure-eventhub-py, azure-servicebus-py
monitoring
OpenTelemetry, App Insights, Query
azure-monitor-opentelemetry-py
identity
Authentication, DefaultAzureCredential
azure-identity-py
security
Key Vault, secrets, keys, certificates
azure-keyvault-py
integration
API Management, App Configuration
azure-appconfiguration-py
compute
Batch, ML compute
azure-compute-batch-java
container
Container Registry, ACR
azure-containerregistry-py
Determine the category based on:
Azure service family (Storage → data, Event Hubs → messaging)
Search microsoft-docs MCP for current API patterns
Verify against installed SDK version
Follow the section order above
Include cleanup code in examples
Add feature comparison tables
Write bundled resources first, then SKILL.md.
Frontmatter:
---name:skill-name-pydescription:|
Azure Service SDK for Python. Use for [specific features].
Triggers: "service name", "create resource", "specific operation".
---
Step 5: Categorize with Symlinks
After creating the skill in .github/skills/, create a symlink in the appropriate category:
# Pattern: skills/<language>/<category>/<short-name> -> ../../../.github/skills/<full-skill-name># Example for azure-ai-agents-py in python/foundry:cd skills/python/foundry
ln -s ../../../.github/skills/azure-ai-agents-py agents
# Example for azure-cosmos-db-py in python/data:cd skills/python/data
ln -s ../../../.github/skills/azure-cosmos-db-py cosmos-db
Symlink naming:
Use short, descriptive names (e.g., agents, cosmos, blob)
Remove the azure- prefix and language suffix
Match existing patterns in the category
Verify the symlink:
ls -la skills/python/foundry/agents
# Should show: agents -> ../../../.github/skills/azure-ai-agents-py
Step 6: Create Tests
Every skill MUST have acceptance criteria and test scenarios.
config:model:gpt-4max_tokens:2000temperature:0.3scenarios:-name:basic_client_creationprompt:|
Create a basic example using the Azure SDK.
Include proper authentication and client initialization.
expected_patterns:-"DefaultAzureCredential"-"MyClient"forbidden_patterns:-"api_key="-"hardcoded"tags:-basic-authenticationmock_response:|
import os
from azure.identity import DefaultAzureCredential
from azure.ai.mymodule import MyClient
credential=DefaultAzureCredential()client=MyClient(endpoint=os.environ["AZURE_ENDPOINT"],credential=credential)# ... rest of working example
Scenario design principles:
Each scenario tests ONE specific pattern or feature
expected_patterns — patterns that MUST appear
forbidden_patterns — common mistakes that must NOT appear
mock_response — complete, working code that passes all checks
tags — for filtering (basic, async, streaming, tools)
6.3 Run Tests
cd tests
pnpm install
# Check skill is discovered
pnpm harness --list
# Run in mock mode (fast, deterministic)
pnpm harness <skill-name> --mock --verbose
# Run with Ralph Loop (iterative improvement)
pnpm harness <skill-name> --ralph --mock --max-iterations 5 --threshold 85
Success criteria:
All scenarios pass (100% pass rate)
No false positives (mock responses always pass)
Patterns catch real mistakes
Step 7: Update Documentation
After creating the skill:
Update README.md — Add the skill to the appropriate language section in the Skill Catalog
Update total skill count (line ~73: > N skills in...)
Update Skill Explorer link count (line ~15: Browse all N skills)
Update language count table (lines ~77-83)
Update language section count (e.g., > N skills • suffix: -py)