skill-creator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill 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.
本指南用于创建可扩展AI Agent能力的技能,重点介绍Azure SDK和Microsoft Foundry相关内容。
必备上下文: 创建SDK或API技能时,用户必须提供技能所基于的SDK包名称、文档URL或仓库引用。
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
技能是模块化的知识包,可将通用Agent转变为领域专家:
- 流程知识 — 特定领域的多步骤工作流
- SDK专业知识 — Azure服务的API模式、身份验证、错误处理
- 领域上下文 — 架构、业务逻辑、公司特定模式
- 捆绑资源 — 用于复杂任务的脚本、参考资料、模板
Core Principles
核心原则
1. Concise is Key
1. 简洁为要
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.
上下文窗口是共享资源。对每一部分都要提出质疑:“它是否值得占用令牌成本?”
默认假设:Agent已具备基础能力。 仅添加它们不知道的内容。
2. Fresh Documentation First
2. 优先使用最新文档
Azure SDKs change constantly. Skills should instruct agents to verify documentation:
markdown
undefinedAzure SDK会持续更新。 技能应指导Agent验证文档:
markdown
undefinedBefore Implementation
实现前
Search MCP for current API patterns:
microsoft-docs- Query: "[SDK name] [operation] python"
- Verify: Parameters match your installed SDK version
undefined在 MCP中搜索当前API模式:
microsoft-docs- 查询:"[SDK名称] [操作] python"
- 验证:参数与已安装的SDK版本匹配
undefined3. Degrees of Freedom
3. 自由度适配
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
4. 渐进式披露
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.
技能分为三个层级加载:
- 元数据(约100字)— 始终处于上下文中
- SKILL.md主体(<5000字)— 技能触发时加载
- 参考资料(无限制)— 按需加载
保持SKILL.md在500行以内。 接近此限制时,拆分为参考文件。
Skill Structure
技能结构
skill-name/
├── SKILL.md (required)
│ ├── YAML frontmatter (name, description)
│ └── Markdown instructions
└── Bundled Resources (optional)
├── scripts/ — Executable code
├── references/ — Documentation loaded as needed
└── assets/ — Output resources (templates, images)skill-name/
├── SKILL.md (必填)
│ ├── YAML前置元数据 (name, description)
│ └── Markdown说明
└── 捆绑资源 (可选)
├── scripts/ — 可执行代码
├── references/ — 按需加载的文档
└── assets/ — 输出资源(模板、图片)SKILL.md
SKILL.md
- Frontmatter: and
name. The description is the trigger mechanism.description - Body: Instructions loaded only after triggering.
- 前置元数据:和
name。描述是触发机制。description - 主体:触发后才加载的说明内容。
Bundled Resources
捆绑资源
| Type | Purpose | When to Include |
|---|---|---|
| Deterministic operations | Same code rewritten repeatedly |
| Detailed patterns | API docs, schemas, detailed guides |
| Output resources | Templates, images, boilerplate |
Don't include: README.md, CHANGELOG.md, installation guides.
| 类型 | 用途 | 适用场景 |
|---|---|---|
| 确定性操作 | 重复编写的相同代码 |
| 详细模式 | API文档、架构、详细指南 |
| 输出资源 | 模板、图片、样板代码 |
请勿包含:README.md、CHANGELOG.md、安装指南。
Creating Azure SDK Skills
创建Azure SDK技能
When creating skills for Azure SDKs, follow these patterns consistently.
为Azure SDK创建技能时,请始终遵循以下模式。
Skill Section Order
技能章节顺序
Follow this structure (based on existing Azure SDK skills):
- Title —
# SDK Name - Installation — ,
pip install, etc.npm install - Environment Variables — Required configuration
- Authentication — Always
DefaultAzureCredential - Core Workflow — Minimal viable example
- Feature Tables — Clients, methods, tools
- Best Practices — Numbered list
- Reference Links — Table linking to
/references/*.md
遵循以下结构(基于现有Azure SDK技能):
- 标题 —
# SDK名称 - 安装 — 、
pip install等npm install - 环境变量 — 必需的配置
- 身份验证 — 始终使用
DefaultAzureCredential - 核心工作流 — 最简可行示例
- 功能表格 — 客户端、方法、工具
- 最佳实践 — 编号列表
- 参考链接 — 指向的表格
/references/*.md
Authentication Pattern (All Languages)
身份验证模式(所有语言)
Always use :
DefaultAzureCredentialpython
undefined始终使用:
DefaultAzureCredentialpython
undefinedPython
Python
from azure.identity import DefaultAzureCredential
credential = DefaultAzureCredential()
client = ServiceClient(endpoint, credential)
```csharp
// C#
var credential = new DefaultAzureCredential();
var client = new ServiceClient(new Uri(endpoint), credential);java
// Java
TokenCredential credential = new DefaultAzureCredentialBuilder().build();
ServiceClient client = new ServiceClientBuilder()
.endpoint(endpoint)
.credential(credential)
.buildClient();typescript
// TypeScript
import { DefaultAzureCredential } from "@azure/identity";
const credential = new DefaultAzureCredential();
const client = new ServiceClient(endpoint, credential);Never hardcode credentials. Use environment variables.
from azure.identity import DefaultAzureCredential
credential = DefaultAzureCredential()
client = ServiceClient(endpoint, credential)
```csharp
// C#
var credential = new DefaultAzureCredential();
var client = new ServiceClient(new Uri(endpoint), credential);java
// Java
TokenCredential credential = new DefaultAzureCredentialBuilder().build();
ServiceClient client = new ServiceClientBuilder()
.endpoint(endpoint)
.credential(credential)
.buildClient();typescript
// TypeScript
import { DefaultAzureCredential } from "@azure/identity";
const credential = new DefaultAzureCredential();
const client = new ServiceClient(endpoint, credential);切勿硬编码凭据。请使用环境变量。
Standard Verb Patterns
标准动词模式
Azure SDKs use consistent verbs across all languages:
| Verb | Behavior |
|---|---|
| Create new; fail if exists |
| Create or update |
| Retrieve; error if missing |
| Return collection |
| Succeed even if missing |
| Start long-running operation |
Azure SDK在所有语言中使用一致的动词:
| 动词 | 行为 |
|---|---|
| 创建新资源;若已存在则失败 |
| 创建或更新 |
| 检索资源;若不存在则报错 |
| 返回资源集合 |
| 即使资源不存在也执行成功 |
| 启动长时间运行的操作 |
Language-Specific Patterns
语言特定模式
See for detailed patterns including:
references/azure-sdk-patterns.md- Python: ,
ItemPaged, context managers, Sphinx docstringsLROPoller - .NET: ,
Response<T>,Pageable<T>, mocking supportOperation<T> - Java: Builder pattern, /
PagedIterable, Reactor typesPagedFlux - TypeScript: ,
PagedAsyncIterableIterator, browser considerationsAbortSignal
请查看获取详细模式,包括:
references/azure-sdk-patterns.md- Python:、
ItemPaged、上下文管理器、Sphinx文档字符串LROPoller - .NET:、
Response<T>、Pageable<T>、模拟支持Operation<T> - Java:构建器模式、/
PagedIterable、Reactor类型PagedFlux - TypeScript:、
PagedAsyncIterableIterator、浏览器相关注意事项AbortSignal
Example: Azure SDK Skill Structure
示例:Azure SDK技能结构
markdown
---
name: skill-creator
description: |
Azure AI Example SDK for Python. Use for [specific service features].
Triggers: "example service", "create example", "list examples".
---markdown
---
name: skill-creator
description: |
Azure AI Example SDK for Python. Use for [specific service features].
Triggers: "example service", "create example", "list examples".
---Azure AI Example SDK
Azure AI Example SDK
Installation
安装
```bash
pip install azure-ai-example
```
```bash
pip install azure-ai-example
```
Environment Variables
环境变量
```bash
AZURE_EXAMPLE_ENDPOINT=https://<resource>.example.azure.com
```
```bash
AZURE_EXAMPLE_ENDPOINT=https://<resource>.example.azure.com
```
Authentication
身份验证
```python
from azure.identity import DefaultAzureCredential
from azure.ai.example import ExampleClient
credential = DefaultAzureCredential()
client = ExampleClient(
endpoint=os.environ["AZURE_EXAMPLE_ENDPOINT"],
credential=credential
)
```
```python
from azure.identity import DefaultAzureCredential
from azure.ai.example import ExampleClient
credential = DefaultAzureCredential()
client = ExampleClient(
endpoint=os.environ["AZURE_EXAMPLE_ENDPOINT"],
credential=credential
)
```
Core Workflow
核心工作流
```python
```python
Create
创建
item = client.create_item(name="example", data={...})
item = client.create_item(name="example", data={...})
List (pagination handled automatically)
列出(自动处理分页)
for item in client.list_items():
print(item.name)
for item in client.list_items():
print(item.name)
Long-running operation
长时间运行的操作
poller = client.begin_process(item_id)
result = poller.result()
poller = client.begin_process(item_id)
result = poller.result()
Cleanup
清理
client.delete_item(item_id)
```
client.delete_item(item_id)
```
Reference Files
参考文件
| File | Contents |
|---|---|
| references/tools.md | Tool integrations |
| references/streaming.md | Event streaming patterns |
---| 文件 | 内容 |
|---|---|
| references/tools.md | 工具集成 |
| references/streaming.md | 事件流模式 |
---Skill Creation Process
技能创建流程
- Gather SDK Context — User provides SDK/API reference (REQUIRED)
- Understand — Research SDK patterns from official docs
- Plan — Identify reusable resources and product area category
- Create — Write SKILL.md in
.github/skills/<skill-name>/ - Categorize — Create symlink in
skills/<language>/<category>/ - Test — Create acceptance criteria and test scenarios
- Document — Update README.md skill catalog
- Iterate — Refine based on real usage
- 收集SDK上下文 — 用户提供SDK/API参考(必填)
- 理解需求 — 从官方文档研究SDK模式
- 规划 — 确定可复用资源和产品领域分类
- 创建 — 在中编写SKILL.md
.github/skills/<skill-name>/ - 分类 — 在中创建符号链接
skills/<language>/<category>/ - 测试 — 创建验收标准和测试场景
- 文档更新 — 更新README.md技能目录
- 迭代 — 根据实际使用情况优化
Step 1: Gather SDK Context (REQUIRED)
步骤1:收集SDK上下文(必填)
Before creating any SDK skill, the user MUST provide:
| Required | Example | Purpose |
|---|---|---|
| SDK Package | | Identifies the exact SDK |
| Documentation URL | | Primary source of truth |
| Repository (optional) | | For code patterns |
Prompt the user if not provided:
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:
bash
undefined创建任何SDK技能前,用户必须提供:
| 必填项 | 示例 | 用途 |
|---|---|---|
| SDK包 | | 确定具体的SDK |
| 文档URL | | 主要事实来源 |
| 仓库(可选) | | 用于参考代码模式 |
若未提供,提示用户:
要创建此技能,我需要:
1. SDK包名称(例如:azure-ai-projects)
2. Microsoft Learn文档URL或GitHub仓库
3. 目标语言(py/dotnet/ts/java)优先搜索官方文档:
bash
undefinedUse microsoft-docs MCP to get current API patterns
使用microsoft-docs MCP获取当前API模式
Query: "[SDK name] [operation] [language]"
查询:"[SDK名称] [操作] [语言]"
Verify: Parameters match the latest SDK version
验证:参数与最新SDK版本匹配
undefinedundefinedStep 2: Understand the Skill
步骤2:理解技能需求
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 | |
| Tool configurations | |
| Error handling patterns | |
收集具体示例:
- “此技能应涵盖哪些SDK操作?”
- “哪些触发词应激活此技能?”
- “开发人员通常会遇到哪些错误?”
| 示例任务 | 可复用资源 |
|---|---|
| 每次都使用相同的身份验证代码 | SKILL.md中的代码示例 |
| 复杂的流模式 | |
| 工具配置 | |
| 错误处理模式 | |
Step 3: Plan Product Area Category
步骤3:规划产品领域分类
Skills are organized by language and product area in the directory via symlinks.
skills/Product Area Categories:
| Category | Description | Examples |
|---|---|---|
| AI Foundry, agents, projects, inference | |
| Storage, Cosmos DB, Tables, Data Lake | |
| Event Hubs, Service Bus, Event Grid | |
| OpenTelemetry, App Insights, Query | |
| Authentication, DefaultAzureCredential | |
| Key Vault, secrets, keys, certificates | |
| API Management, App Configuration | |
| Batch, ML compute | |
| Container Registry, ACR | |
Determine the category based on:
- Azure service family (Storage → , Event Hubs →
data)messaging - Primary use case (AI agents → )
foundry - Existing skills in the same service area
技能通过符号链接在目录中按语言和产品领域组织。
skills/产品领域分类:
| 分类 | 描述 | 示例 |
|---|---|---|
| AI Foundry、Agent、项目、推理 | |
| 存储、Cosmos DB、Tables、Data Lake | |
| Event Hubs、Service Bus、Event Grid | |
| OpenTelemetry、App Insights、Query | |
| 身份验证、DefaultAzureCredential | |
| Key Vault、密钥、证书 | |
| API Management、App Configuration | |
| Batch、ML计算 | |
| Container Registry、ACR | |
确定分类的依据:
- Azure服务系列(存储→,Event Hubs→
data)messaging - 主要用例(AI Agent→)
foundry - 同一服务领域的现有技能
Step 4: Create the Skill
步骤4:创建技能
Location:
.github/skills/<skill-name>/SKILL.mdNaming convention:
azure-<service>-<subservice>-<language>- Examples: ,
azure-ai-agents-py,azure-cosmos-javaazure-storage-blob-ts
For Azure SDK skills:
- Search MCP for current API patterns
microsoft-docs - 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:
yaml
---
name: skill-name-py
description: |
Azure Service SDK for Python. Use for [specific features].
Triggers: "service name", "create resource", "specific operation".
---位置:
.github/skills/<skill-name>/SKILL.md命名约定:
azure-<service>-<subservice>-<language>- 示例:,
azure-ai-agents-py,azure-cosmos-javaazure-storage-blob-ts
对于Azure SDK技能:
- 在MCP中搜索当前API模式
microsoft-docs - 与已安装的SDK版本进行验证
- 遵循上述章节顺序
- 在示例中包含清理代码
- 添加功能对比表格
先编写捆绑资源,再编写SKILL.md。
前置元数据:
yaml
---
name: skill-name-py
description: |
Azure Service SDK for Python. Use for [specific features].
Triggers: "service name", "create resource", "specific operation".
---Step 5: Categorize with Symlinks
步骤5:通过符号链接分类
After creating the skill in , create a symlink in the appropriate category:
.github/skills/bash
undefined在中创建技能后,在相应分类中创建符号链接:
.github/skills/bash
undefinedPattern: skills/<language>/<category>/<short-name> -> ../../../.github/skills/<full-skill-name>
格式:skills/<language>/<category>/<short-name> -> ../../../.github/skills/<full-skill-name>
Example for azure-ai-agents-py in python/foundry:
示例:azure-ai-agents-py在python/foundry中:
cd skills/python/foundry
ln -s ../../../.github/skills/azure-ai-agents-py agents
cd skills/python/foundry
ln -s ../../../.github/skills/azure-ai-agents-py agents
Example for azure-cosmos-db-py in python/data:
示例:azure-cosmos-db-py在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:**
```bash
ls -la skills/python/foundry/agentscd skills/python/data
ln -s ../../../.github/skills/azure-cosmos-db-py cosmos-db
**符号链接命名:**
- 使用简短、描述性的名称(例如:`agents`, `cosmos`, `blob`)
- 移除`azure-`前缀和语言后缀
- 与分类中的现有模式保持一致
**验证符号链接:**
```bash
ls -la skills/python/foundry/agentsShould show: agents -> ../../../.github/skills/azure-ai-agents-py
应显示:agents -> ../../../.github/skills/azure-ai-agents-py
undefinedundefinedStep 6: Create Tests
步骤6:创建测试
Every skill MUST have acceptance criteria and test scenarios.
每个技能必须有验收标准和测试场景。
6.1 Create Acceptance Criteria
6.1 创建验收标准
Location:
.github/skills/<skill-name>/references/acceptance-criteria.mdSource materials (in priority order):
- Official Microsoft Learn docs (via MCP)
microsoft-docs - SDK source code from the repository
- Existing reference files in the skill
Format:
markdown
undefined位置:
.github/skills/<skill-name>/references/acceptance-criteria.md参考资料(优先级顺序):
- 官方Microsoft Learn文档(通过MCP)
microsoft-docs - 仓库中的SDK源代码
- 技能中的现有参考文件
格式:
markdown
undefinedAcceptance Criteria: <skill-name>
验收标准: <skill-name>
SDK:
Repository: https://github.com/Azure/azure-sdk-for-<language>
Purpose: Skill testing acceptance criteria
package-nameSDK:
仓库: https://github.com/Azure/azure-sdk-for-<language>
用途: 技能测试验收标准
package-name1. Correct Import Patterns
1. 正确的导入模式
1.1 Client Imports
1.1 客户端导入
✅ CORRECT: Main Client
✅ 正确:主客户端
```python
from azure.ai.mymodule import MyClient
from azure.identity import DefaultAzureCredential
```
```python
from azure.ai.mymodule import MyClient
from azure.identity import DefaultAzureCredential
```
❌ INCORRECT: Wrong Module Path
❌ 错误:错误的模块路径
```python
from azure.ai.mymodule.models import MyClient # Wrong - Client is not in models
```
```python
from azure.ai.mymodule.models import MyClient # 错误 - 客户端不在models中
```
2. Authentication Patterns
2. 身份验证模式
✅ CORRECT: DefaultAzureCredential
✅ 正确:DefaultAzureCredential
```python
credential = DefaultAzureCredential()
client = MyClient(endpoint, credential)
```
```python
credential = DefaultAzureCredential()
client = MyClient(endpoint, credential)
```
❌ INCORRECT: Hardcoded Credentials
❌ 错误:硬编码凭据
```python
client = MyClient(endpoint, api_key="hardcoded") # Security risk
```
**Critical patterns to document:**
- Import paths (these vary significantly between Azure SDKs)
- Authentication patterns
- Client initialization
- Async variants (`.aio` modules)
- Common anti-patterns```python
client = MyClient(endpoint, api_key="hardcoded") # 安全风险
```
**需要记录的关键模式:**
- 导入路径(Azure SDK之间的模块结构差异很大)
- 身份验证模式
- 客户端初始化
- 异步变体(`.aio`模块)
- 常见反模式6.2 Create Test Scenarios
6.2 创建测试场景
Location:
tests/scenarios/<skill-name>/scenarios.yamlyaml
config:
model: gpt-4
max_tokens: 2000
temperature: 0.3
scenarios:
- name: basic_client_creation
prompt: |
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
- authentication
mock_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 exampleScenario design principles:
- Each scenario tests ONE specific pattern or feature
- — patterns that MUST appear
expected_patterns - — common mistakes that must NOT appear
forbidden_patterns - — complete, working code that passes all checks
mock_response - — for filtering (
tags,basic,async,streaming)tools
位置:
tests/scenarios/<skill-name>/scenarios.yamlyaml
config:
model: gpt-4
max_tokens: 2000
temperature: 0.3
scenarios:
- name: basic_client_creation
prompt: |
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
- authentication
mock_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场景设计原则:
- 每个场景测试一个特定模式或功能
- — 必须出现的模式
expected_patterns - — 必须避免的常见错误
forbidden_patterns - — 完整、可运行的代码,通过所有检查
mock_response - — 用于过滤(
tags,basic,async,streaming)tools
6.3 Run Tests
6.3 运行测试
bash
cd tests
pnpm installbash
cd tests
pnpm installCheck skill is discovered
检查技能是否被发现
pnpm harness --list
pnpm harness --list
Run in mock mode (fast, deterministic)
以模拟模式运行(快速、确定性)
pnpm harness <skill-name> --mock --verbose
pnpm harness <skill-name> --mock --verbose
Run with Ralph Loop (iterative improvement)
使用Ralph Loop运行(迭代改进)
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 mistakespnpm harness <skill-name> --ralph --mock --max-iterations 5 --threshold 85
**成功标准:**
- 所有场景通过(100%通过率)
- 无假阳性(模拟响应始终通过)
- 模式能捕获实际错误Step 7: Update Documentation
步骤7:更新文档
After creating the skill:
-
Update README.md — Add the skill to the appropriate language section in the Skill Catalog
- Update total skill count (line ~75: )
> N skills in... - Update language count table (lines ~77-83)
- Update language section count (e.g., )
> N skills • suffix: -py - Update category count (e.g., )
<summary><strong>Foundry & AI</strong> (N skills)</summary> - Add skill row in alphabetical order within its category
- Update test coverage table (line ~590: )
**N skills with N test scenarios**
- Update total skill count (line ~75:
-
Update docs/index.html — Add the skill to the GitHub Pages site
- Update badge count: (line ~717)
<span class="badge-count">N</span> Skills - Update tab count: (line ~806)
All <span class="tab-count">N</span> - Add skill entry in the JavaScript array (around line ~1060-1300)
skills
Skill entry format:javascript{ name: "skill-name-py", lang: "py", desc: "Short description — key features", },Placement: Add in the appropriate language/category section (skills are grouped by language, then roughly by category in the array). - Update badge count:
-
Verify AGENTS.md — Ensure the skill count is accurate
创建技能后:
-
更新README.md — 在技能目录的相应语言部分添加该技能
- 更新技能总数(约第75行:)
> N skills in... - 更新语言数量表格(约第77-83行)
- 更新语言部分数量(例如:)
> N skills • suffix: -py - 更新分类数量(例如:)
<summary><strong>Foundry & AI</strong> (N skills)</summary> - 在分类中按字母顺序添加技能行
- 更新测试覆盖率表格(约第590行:)
**N skills with N test scenarios**
- 更新技能总数(约第75行:
-
更新docs/index.html — 将技能添加到GitHub Pages站点
- 更新徽章数量:(约第717行)
<span class="badge-count">N</span> Skills - 更新标签页数量:(约第806行)
All <span class="tab-count">N</span> - 在JavaScript的数组中添加技能条目(约第1060-1300行)
skills
技能条目格式:javascript{ name: "skill-name-py", lang: "py", desc: "Short description — key features", },位置: 添加到相应的语言/分类部分(数组中技能按语言分组,然后大致按分类排序)。 - 更新徽章数量:
-
验证AGENTS.md — 确保技能数量准确
Progressive Disclosure Patterns
渐进式披露模式
Pattern 1: High-Level Guide with References
模式1:高级指南+参考资料
markdown
undefinedmarkdown
undefinedSDK Name
SDK名称
Quick Start
快速入门
[Minimal example]
[最简示例]
Advanced Features
高级功能
- Streaming: See references/streaming.md
- Tools: See references/tools.md
undefined- 流处理:请参阅references/streaming.md
- 工具:请参阅references/tools.md
undefinedPattern 2: Language Variants
模式2:语言变体
azure-service-skill/
├── SKILL.md (overview + language selection)
└── references/
├── python.md
├── dotnet.md
├── java.md
└── typescript.mdazure-service-skill/
├── SKILL.md (概述+语言选择)
└── references/
├── python.md
├── dotnet.md
├── java.md
└── typescript.mdPattern 3: Feature Organization
模式3:功能组织
azure-ai-agents/
├── SKILL.md (core workflow)
└── references/
├── tools.md
├── streaming.md
├── async-patterns.md
└── error-handling.mdazure-ai-agents/
├── SKILL.md (核心工作流)
└── references/
├── tools.md
├── streaming.md
├── async-patterns.md
└── error-handling.mdDesign Pattern References
设计模式参考
| Reference | Contents |
|---|---|
| Sequential and conditional workflows |
| Templates and examples |
| Language-specific Azure SDK patterns |
| 参考资料 | 内容 |
|---|---|
| 顺序和条件工作流 |
| 模板和示例 |
| 特定语言的Azure SDK模式 |
Anti-Patterns
反模式
| Don't | Why |
|---|---|
| Create skill without SDK context | Users must provide package name/docs URL |
| Put "when to use" in body | Body loads AFTER triggering |
| Hardcode credentials | Security risk |
| Skip authentication section | Agents will improvise poorly |
| Use outdated SDK patterns | APIs change; search docs first |
| Include README.md | Agents don't need meta-docs |
| Deeply nest references | Keep one level deep |
| Skip acceptance criteria | Skills without tests can't be validated |
| Skip symlink categorization | Skills won't be discoverable by category |
| Use wrong import paths | Azure SDKs have specific module structures |
| 请勿 | 原因 |
|---|---|
| 无SDK上下文创建技能 | 用户必须提供包名称/文档URL |
| 将“何时使用”放在主体中 | 主体在触发后才加载 |
| 硬编码凭据 | 安全风险 |
| 跳过身份验证章节 | Agent会进行糟糕的即兴处理 |
| 使用过时的SDK模式 | API会变化;请先搜索文档 |
| 包含README.md | Agent不需要元文档 |
| 深层嵌套参考资料 | 保持一级深度 |
| 跳过验收标准 | 无测试的技能无法验证 |
| 跳过符号链接分类 | 技能无法按分类被发现 |
| 使用错误的导入路径 | Azure SDK有特定的模块结构 |
Checklist
检查清单
Before completing a skill:
Prerequisites:
- User provided SDK package name or documentation URL
- Verified SDK patterns via MCP
microsoft-docs
Skill Creation:
- Description includes what AND when (trigger phrases)
- SKILL.md under 500 lines
- Authentication uses
DefaultAzureCredential - Includes cleanup/delete in examples
- References organized by feature
Categorization:
- Skill created in
.github/skills/<skill-name>/ - Symlink created in
skills/<language>/<category>/<short-name> - Symlink points to
../../../.github/skills/<skill-name>
Testing:
- created with correct/incorrect patterns
references/acceptance-criteria.md - created
tests/scenarios/<skill-name>/scenarios.yaml - All scenarios pass ()
pnpm harness <skill> --mock - Import paths documented precisely
Documentation:
- README.md skill catalog updated
- Instructs to search MCP for current APIs
microsoft-docs
完成技能前:
先决条件:
- 用户提供了SDK包名称或文档URL
- 通过MCP验证了SDK模式
microsoft-docs
技能创建:
- 描述包含内容和触发短语
- SKILL.md在500行以内
- 身份验证使用
DefaultAzureCredential - 示例中包含清理/删除代码
- 参考资料按功能组织
分类:
- 技能在中创建
.github/skills/<skill-name>/ - 在中创建了符号链接
skills/<language>/<category>/<short-name> - 符号链接指向
../../../.github/skills/<skill-name>
测试:
- 创建了,包含正确/错误模式
references/acceptance-criteria.md - 创建了
tests/scenarios/<skill-name>/scenarios.yaml - 所有场景通过()
pnpm harness <skill> --mock - 精确记录了导入路径
文档:
- 更新了README.md技能目录
- 指导使用MCP搜索当前API
microsoft-docs