skill-creator-ms
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSkill Creator
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.
本指南用于创建可扩展AI Agent能力的技能,重点针对Azure SDK和Microsoft Foundry服务。
必填上下文: 创建SDK或API技能时,用户必须提供SDK包名称、文档URL或仓库引用作为技能的基础依据。
About Skills
关于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
Skills是模块化知识包,可将通用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.
上下文窗口是共享资源。对每一部分都要质疑:“它是否值得占用token成本?”
默认假设:Agent已具备基础能力。 仅添加Agent尚不了解的内容。
2. Fresh Documentation First
2. 优先使用最新文档
Azure SDKs change constantly. Skills should instruct agents to verify documentation:
markdown
undefinedAzure SDKs会持续更新。 Skills应指导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.
Skills分为三个加载层级:
- 元数据(约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 (required)
│ ├── YAML frontmatter (name, description)
│ └── Markdown instructions
└── Bundled Resources (optional)
├── scripts/ — 可执行代码
├── references/ — 按需加载的文档
└── assets/ — 输出资源(模板、图片)SKILL.md
SKILL.md
- Frontmatter: and
name. The description is the trigger mechanism.description - Body: Instructions loaded only after triggering.
- Frontmatter:包含和
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 Skills
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
Installation
```bash
pip install azure-ai-example
```
```bash
pip install azure-ai-example
```
Environment Variables
Environment Variables
```bash
AZURE_EXAMPLE_ENDPOINT=https://<resource>.example.azure.com
```
```bash
AZURE_EXAMPLE_ENDPOINT=https://<resource>.example.azure.com
```
Authentication
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
Core Workflow
```python
```python
Create
Create
item = client.create_item(name="example", data={...})
item = client.create_item(name="example", data={...})
List (pagination handled automatically)
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
Long-running operation
poller = client.begin_process(item_id)
result = poller.result()
poller = client.begin_process(item_id)
result = poller.result()
Cleanup
Cleanup
client.delete_item(item_id)
```
client.delete_item(item_id)
```
Reference Files
Reference Files
| File | Contents |
|---|---|
| references/tools.md | Tool integrations |
| references/streaming.md | Event streaming patterns |
---| File | Contents |
|---|---|
| references/tools.md | Tool integrations |
| references/streaming.md | Event streaming patterns |
---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 — 从官方文档研究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通过符号链接按语言和产品领域组织在目录中。
skills/产品领域分类:
| 分类 | 描述 | 示例 |
|---|---|---|
| AI Foundry、Agent、项目、推理 | |
| 存储、Cosmos DB、Tables、Data Lake | |
| Event Hubs、Service Bus、Event Grid | |
| OpenTelemetry、App Insights、查询 | |
| 身份验证、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。
Frontmatter示例:
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>/<简称> -> ../../../.github/skills/<完整技能名称>
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>
验收标准:<技能名称>
SDK:
Repository: https://github.com/Azure/azure-sdk-for-<language>
Purpose: Skill testing acceptance criteria
package-nameSDK:
Repository: https://github.com/Azure/azure-sdk-for-<language>
Purpose: Skill testing acceptance criteria
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 # Wrong - Client is not in 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") # Security risk
```
**需记录的关键模式:**
- 导入路径(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 ~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 - 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 summary (line ~622: )
**N skills with N test scenarios** - Update test coverage table — update skill count, scenario count, and top skills for the language
- Update total skill count (line ~73:
-
Regenerate GitHub Pages data — Run the extraction script to update the docs sitebash
cd docs-site && npx tsx scripts/extract-skills.tsThis updateswhich feeds the Astro-based docs site. Then rebuild the docs site:docs-site/src/data/skills.jsonbashcd docs-site && npm run buildThis outputs towhich is served by GitHub Pages.docs/ -
Verify AGENTS.md — Ensure the skill count is accurate
创建技能后:
-
更新README.md — 将技能添加到技能目录的对应语言章节中
- 更新技能总数(约第73行:)
> N skills in... - 更新技能浏览器链接计数(约第15行:)
Browse all N skills - 更新语言计数表格(约第77-83行)
- 更新语言章节计数(例如:)
> N skills • suffix: -py - 在对应分类中按字母顺序添加技能行
- 更新测试覆盖率摘要(约第622行:)
**N skills with N test scenarios** - 更新测试覆盖率表格 — 更新对应语言的技能数量、场景数量和顶级技能
- 更新技能总数(约第73行:
-
重新生成GitHub Pages数据 — 运行提取脚本更新文档站点bash
cd docs-site && npx tsx scripts/extract-skills.ts此命令会更新,为基于Astro的文档站点提供数据。 然后重新构建文档站点:docs-site/src/data/skills.jsonbashcd docs-site && npm run build输出到目录,由GitHub Pages托管。docs/ -
验证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>/<简称> - 符号链接指向
../../../.github/skills/<skill-name>
测试:
- 创建了,包含正确/错误模式
references/acceptance-criteria.md - 创建了
tests/scenarios/<skill-name>/scenarios.yaml - 所有场景通过()
pnpm harness <skill> --mock - 准确记录了导入路径
文档:
- 更新了README.md技能目录
- 指导Agent搜索MCP获取当前API
microsoft-docs
When to Use
适用场景
This skill is applicable to execute the workflow or actions described in the overview.
本技能适用于执行概述中描述的工作流或操作。