AgentSkillsCN

skill-creator

为与 Azure SDK 及 Microsoft Foundry 服务协同工作的 AI 编码智能体制定高效技能指南。在创建新技能或更新现有技能时,可加以应用。

SKILL.md
--- frontmatter
name: skill-creator
description: 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. 
category: Document Processing
source: antigravity
tags: [python, typescript, react, markdown, api, mcp, ai, agent, gpt, workflow]
url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/skill-creator-ms

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:

  1. Procedural knowledge — Multi-step workflows for specific domains
  2. SDK expertise — API patterns, authentication, error handling for Azure services
  3. Domain context — Schemas, business logic, company-specific patterns
  4. 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:

markdown
## 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:

FreedomWhenExample
HighMultiple valid approachesText guidelines
MediumPreferred pattern with variationPseudocode
LowMust be exactSpecific scripts

4. Progressive Disclosure

Skills load in three levels:

  1. Metadata (~100 words) — Always in context
  2. SKILL.md body (<5k words) — When skill triggers
  3. References (unlimited) — As needed

Keep SKILL.md under 500 lines. Split into reference files when approaching this limit.


Skill Structure

code
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.md

  • Frontmatter: name and description. The description is the trigger mechanism.
  • Body: Instructions loaded only after triggering.

Bundled Resources

TypePurposeWhen to Include
scripts/Deterministic operationsSame code rewritten repeatedly
references/Detailed patternsAPI docs, schemas, detailed guides
assets/Output resourcesTemplates, images, boilerplate

Don't include: README.md, CHANGELOG.md, installation guides.


Creating Azure SDK Skills

When creating skills for Azure SDKs, follow these patterns consistently.

Skill Section Order

Follow this structure (based on existing Azure SDK skills):

  1. Title# SDK Name
  2. Installationpip install, npm install, etc.
  3. Environment Variables — Required configuration
  4. Authentication — Always DefaultAzureCredential
  5. Core Workflow — Minimal viable example
  6. Feature Tables — Clients, methods, tools
  7. Best Practices — Numbered list
  8. Reference Links — Table linking to /references/*.md

Authentication Pattern (All Languages)

Always use DefaultAzureCredential:

python
# 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.

Standard Verb Patterns

Azure SDKs use consistent verbs across all languages:

VerbBehavior
createCreate new; fail if exists
upsertCreate or update
getRetrieve; error if missing
listReturn collection
deleteSucceed even if missing
beginStart long-running operation

Language-Specific Patterns

See references/azure-sdk-patterns.md for detailed patterns including:

  • Python: ItemPaged, LROPoller, context managers, Sphinx docstrings
  • .NET: Response<T>, Pageable<T>, Operation<T>, mocking support
  • Java: Builder pattern, PagedIterable/PagedFlux, Reactor types
  • TypeScript: PagedAsyncIterableIterator, AbortSignal, browser considerations

Example: Azure SDK Skill Structure

markdown
---