[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-39ee6d97-5338-4cc1-bb31-e7d686389435":3,"$fHpZyHQFZv7EGmcnZy8c7XbMMQlED9p4whnLIYnxuYT4":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"39ee6d97-5338-4cc1-bb31-e7d686389435","skill-creator-ms","创建与 Azure SDKs 和 Microsoft Foundry 服务协作的 AI 编码代理有效技能指南。在创建新技能或更新现有技能时使用。","cat_coding_devops","mod_coding","sickn33,coding","---\nname: skill-creator-ms\ndescription: \"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.\"\nrisk: unknown\nsource: community\ndate_added: \"2026-02-27\"\n---\n\n# Skill Creator\n\nGuide for creating skills that extend AI agent capabilities, with emphasis on Azure SDKs and Microsoft Foundry.\n\n> **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.\n\n## About Skills\n\nSkills are modular knowledge packages that transform general-purpose agents into specialized experts:\n\n1. **Procedural knowledge** — Multi-step workflows for specific domains\n2. **SDK expertise** — API patterns, authentication, error handling for Azure services\n3. **Domain context** — Schemas, business logic, company-specific patterns\n4. **Bundled resources** — Scripts, references, templates for complex tasks\n\n---\n\n## Core Principles\n\n### 1. Concise is Key\n\nThe context window is a shared resource. Challenge each piece: \"Does this justify its token cost?\"\n\n**Default assumption: Agents are already capable.** Only add what they don't already know.\n\n### 2. Fresh Documentation First\n\n**Azure SDKs change constantly.** Skills should instruct agents to verify documentation:\n\n```markdown\n## Before Implementation\n\nSearch `microsoft-docs` MCP for current API patterns:\n- Query: \"[SDK name] [operation] python\"\n- Verify: Parameters match your installed SDK version\n```\n\n### 3. Degrees of Freedom\n\nMatch specificity to task fragility:\n\n| Freedom | When | Example |\n|---------|------|---------|\n| **High** | Multiple valid approaches | Text guidelines |\n| **Medium** | Preferred pattern with variation | Pseudocode |\n| **Low** | Must be exact | Specific scripts |\n\n### 4. Progressive Disclosure\n\nSkills load in three levels:\n\n1. **Metadata** (~100 words) — Always in context\n2. **SKILL.md body** (\u003C5k words) — When skill triggers\n3. **References** (unlimited) — As needed\n\n**Keep SKILL.md under 500 lines.** Split into reference files when approaching this limit.\n\n---\n\n## Skill Structure\n\n```\nskill-name\u002F\n├── SKILL.md (required)\n│   ├── YAML frontmatter (name, description)\n│   └── Markdown instructions\n└── Bundled Resources (optional)\n    ├── scripts\u002F      — Executable code\n    ├── references\u002F   — Documentation loaded as needed\n    └── assets\u002F       — Output resources (templates, images)\n```\n\n### SKILL.md\n\n- **Frontmatter**: `name` and `description`. The description is the trigger mechanism.\n- **Body**: Instructions loaded only after triggering.\n\n### Bundled Resources\n\n| Type | Purpose | When to Include |\n|------|---------|-----------------|\n| `scripts\u002F` | Deterministic operations | Same code rewritten repeatedly |\n| `references\u002F` | Detailed patterns | API docs, schemas, detailed guides |\n| `assets\u002F` | Output resources | Templates, images, boilerplate |\n\n**Don't include**: README.md, CHANGELOG.md, installation guides.\n\n---\n\n## Creating Azure SDK Skills\n\nWhen creating skills for Azure SDKs, follow these patterns consistently.\n\n### Skill Section Order\n\nFollow this structure (based on existing Azure SDK skills):\n\n1. **Title** — `# SDK Name`\n2. **Installation** — `pip install`, `npm install`, etc.\n3. **Environment Variables** — Required configuration\n4. **Authentication** — Always `DefaultAzureCredential`\n5. **Core Workflow** — Minimal viable example\n6. **Feature Tables** — Clients, methods, tools\n7. **Best Practices** — Numbered list\n8. **Reference Links** — Table linking to `\u002Freferences\u002F*.md`\n\n### Authentication Pattern (All Languages)\n\nAlways use `DefaultAzureCredential`:\n\n```python\n# Python\nfrom azure.identity import DefaultAzureCredential\ncredential = DefaultAzureCredential()\nclient = ServiceClient(endpoint, credential)\n```\n\n```csharp\n\u002F\u002F C#\nvar credential = new DefaultAzureCredential();\nvar client = new ServiceClient(new Uri(endpoint), credential);\n```\n\n```java\n\u002F\u002F Java\nTokenCredential credential = new DefaultAzureCredentialBuilder().build();\nServiceClient client = new ServiceClientBuilder()\n    .endpoint(endpoint)\n    .credential(credential)\n    .buildClient();\n```\n\n```typescript\n\u002F\u002F TypeScript\nimport { DefaultAzureCredential } from \"@azure\u002Fidentity\";\nconst credential = new DefaultAzureCredential();\nconst client = new ServiceClient(endpoint, credential);\n```\n\n**Never hardcode credentials. Use environment variables.**\n\n### Standard Verb Patterns\n\nAzure SDKs use consistent verbs across all languages:\n\n| Verb | Behavior |\n|------|----------|\n| `create` | Create new; fail if exists |\n| `upsert` | Create or update |\n| `get` | Retrieve; error if missing |\n| `list` | Return collection |\n| `delete` | Succeed even if missing |\n| `begin` | Start long-running operation |\n\n### Language-Specific Patterns\n\nSee `references\u002Fazure-sdk-patterns.md` for detailed patterns including:\n\n- **Python**: `ItemPaged`, `LROPoller`, context managers, Sphinx docstrings\n- **.NET**: `Response\u003CT>`, `Pageable\u003CT>`, `Operation\u003CT>`, mocking support\n- **Java**: Builder pattern, `PagedIterable`\u002F`PagedFlux`, Reactor types\n- **TypeScript**: `PagedAsyncIterableIterator`, `AbortSignal`, browser considerations\n\n### Example: Azure SDK Skill Structure\n\n```markdown\n---\nname: skill-creator\ndescription: |\n  Azure AI Example SDK for Python. Use for [specific service features].\n  Triggers: \"example service\", \"create example\", \"list examples\".\n---\n\n# Azure AI Example SDK\n\n## Installation\n\n\\`\\`\\`bash\npip install azure-ai-example\n\\`\\`\\`\n\n## Environment Variables\n\n\\`\\`\\`bash\nAZURE_EXAMPLE_ENDPOINT=https:\u002F\u002F\u003Cresource>.example.azure.com\n\\`\\`\\`\n\n## Authentication\n\n\\`\\`\\`python\nfrom azure.identity import DefaultAzureCredential\nfrom azure.ai.example import ExampleClient\n\ncredential = DefaultAzureCredential()\nclient = ExampleClient(\n    endpoint=os.environ[\"AZURE_EXAMPLE_ENDPOINT\"],\n    credential=credential\n)\n\\`\\`\\`\n\n## Core Workflow\n\n\\`\\`\\`python\n# Create\nitem = client.create_item(name=\"example\", data={...})\n\n# List (pagination handled automatically)\nfor item in client.list_items():\n    print(item.name)\n\n# Long-running operation\npoller = client.begin_process(item_id)\nresult = poller.result()\n\n# Cleanup\nclient.delete_item(item_id)\n\\`\\`\\`\n\n## Reference Files\n\n| File | Contents |\n|------|----------|\n| references\u002Ftools.md | Tool integrations |\n| references\u002Fstreaming.md | Event streaming patterns |\n```\n\n---\n\n## Skill Creation Process\n\n1. **Gather SDK Context** — User provides SDK\u002FAPI reference (REQUIRED)\n2. **Understand** — Research SDK patterns from official docs\n3. **Plan** — Identify reusable resources and product area category\n4. **Create** — Write SKILL.md in `.github\u002Fskills\u002F\u003Cskill-name>\u002F`\n5. **Categorize** — Create symlink in `skills\u002F\u003Clanguage>\u002F\u003Ccategory>\u002F`\n6. **Test** — Create acceptance criteria and test scenarios\n7. **Document** — Update README.md skill catalog\n8. **Iterate** — Refine based on real usage\n\n### Step 1: Gather SDK Context (REQUIRED)\n\n**Before creating any SDK skill, the user MUST provide:**\n\n| Required | Example | Purpose |\n|----------|---------|---------|\n| **SDK Package** | `azure-ai-agents`, `Azure.AI.OpenAI` | Identifies the exact SDK |\n| **Documentation URL** | `https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fazure\u002Fai-services\u002F...` | Primary source of truth |\n| **Repository** (optional) | `Azure\u002Fazure-sdk-for-python` | For code patterns |\n\n**Prompt the user if not provided:**\n```\nTo create this skill, I need:\n1. The SDK package name (e.g., azure-ai-projects)\n2. The Microsoft Learn documentation URL or GitHub repo\n3. The target language (py\u002Fdotnet\u002Fts\u002Fjava)\n```\n\n**Search official docs first:**\n```bash\n# Use microsoft-docs MCP to get current API patterns\n# Query: \"[SDK name] [operation] [language]\"\n# Verify: Parameters match the latest SDK version\n```\n\n### Step 2: Understand the Skill\n\nGather concrete examples:\n\n- \"What SDK operations should this skill cover?\"\n- \"What triggers should activate this skill?\"\n- \"What errors do developers commonly encounter?\"\n\n| Example Task | Reusable Resource |\n|--------------|-------------------|\n| Same auth code each time | Code example in SKILL.md |\n| Complex streaming patterns | `references\u002Fstreaming.md` |\n| Tool configurations | `references\u002Ftools.md` |\n| Error handling patterns | `references\u002Ferror-handling.md` |\n\n### Step 3: Plan Product Area Category\n\nSkills are organized by **language** and **product area** in the `skills\u002F` directory via symlinks.\n\n**Product Area Categories:**\n\n| Category | Description | Examples |\n|----------|-------------|----------|\n| `foundry` | AI Foundry, agents, projects, inference | `azure-ai-agents-py`, `azure-ai-projects-py` |\n| `data` | Storage, Cosmos DB, Tables, Data Lake | `azure-cosmos-py`, `azure-storage-blob-py` |\n| `messaging` | Event Hubs, Service Bus, Event Grid | `azure-eventhub-py`, `azure-servicebus-py` |\n| `monitoring` | OpenTelemetry, App Insights, Query | `azure-monitor-opentelemetry-py` |\n| `identity` | Authentication, DefaultAzureCredential | `azure-identity-py` |\n| `security` | Key Vault, secrets, keys, certificates | `azure-keyvault-py` |\n| `integration` | API Management, App Configuration | `azure-appconfiguration-py` |\n| `compute` | Batch, ML compute | `azure-compute-batch-java` |\n| `container` | Container Registry, ACR | `azure-containerregistry-py` |\n\n**Determine the category** based on:\n1. Azure service family (Storage → `data`, Event Hubs → `messaging`)\n2. Primary use case (AI agents → `foundry`)\n3. Existing skills in the same service area\n\n### Step 4: Create the Skill\n\n**Location:** `.github\u002Fskills\u002F\u003Cskill-name>\u002FSKILL.md`\n\n**Naming convention:**\n- `azure-\u003Cservice>-\u003Csubservice>-\u003Clanguage>`\n- Examples: `azure-ai-agents-py`, `azure-cosmos-java`, `azure-storage-blob-ts`\n\n**For Azure SDK skills:**\n\n1. Search `microsoft-docs` MCP for current API patterns\n2. Verify against installed SDK version\n3. Follow the section order above\n4. Include cleanup code in examples\n5. Add feature comparison tables\n\n**Write bundled resources first**, then SKILL.md.\n\n**Frontmatter:**\n\n```yaml\n---\nname: skill-name-py\ndescription: |\n  Azure Service SDK for Python. Use for [specific features].\n  Triggers: \"service name\", \"create resource\", \"specific operation\".\n---\n```\n\n### Step 5: Categorize with Symlinks\n\nAfter creating the skill in `.github\u002Fskills\u002F`, create a symlink in the appropriate category:\n\n```bash\n# Pattern: skills\u002F\u003Clanguage>\u002F\u003Ccategory>\u002F\u003Cshort-name> -> ..\u002F..\u002F..\u002F.github\u002Fskills\u002F\u003Cfull-skill-name>\n\n# Example for azure-ai-agents-py in python\u002Ffoundry:\ncd skills\u002Fpython\u002Ffoundry\nln -s ..\u002F..\u002F..\u002F.github\u002Fskills\u002Fazure-ai-agents-py agents\n\n# Example for azure-cosmos-db-py in python\u002Fdata:\ncd skills\u002Fpython\u002Fdata\nln -s ..\u002F..\u002F..\u002F.github\u002Fskills\u002Fazure-cosmos-db-py cosmos-db\n```\n\n**Symlink naming:**\n- Use short, descriptive names (e.g., `agents`, `cosmos`, `blob`)\n- Remove the `azure-` prefix and language suffix\n- Match existing patterns in the category\n\n**Verify the symlink:**\n```bash\nls -la skills\u002Fpython\u002Ffoundry\u002Fagents\n# Should show: agents -> ..\u002F..\u002F..\u002F.github\u002Fskills\u002Fazure-ai-agents-py\n```\n\n### Step 6: Create Tests\n\n**Every skill MUST have acceptance criteria and test scenarios.**\n\n#### 6.1 Create Acceptance Criteria\n\n**Location:** `.github\u002Fskills\u002F\u003Cskill-name>\u002Freferences\u002Facceptance-criteria.md`\n\n**Source materials** (in priority order):\n1. Official Microsoft Learn docs (via `microsoft-docs` MCP)\n2. SDK source code from the repository\n3. Existing reference files in the skill\n\n**Format:**\n```markdown\n# Acceptance Criteria: \u003Cskill-name>\n\n**SDK**: `package-name`\n**Repository**: https:\u002F\u002Fgithub.com\u002FAzure\u002Fazure-sdk-for-\u003Clanguage>\n**Purpose**: Skill testing acceptance criteria\n\n---\n\n## 1. Correct Import Patterns\n\n### 1.1 Client Imports\n\n#### ✅ CORRECT: Main Client\n\\`\\`\\`python\nfrom azure.ai.mymodule import MyClient\nfrom azure.identity import DefaultAzureCredential\n\\`\\`\\`\n\n#### ❌ INCORRECT: Wrong Module Path\n\\`\\`\\`python\nfrom azure.ai.mymodule.models import MyClient  # Wrong - Client is not in models\n\\`\\`\\`\n\n## 2. Authentication Patterns\n\n#### ✅ CORRECT: DefaultAzureCredential\n\\`\\`\\`python\ncredential = DefaultAzureCredential()\nclient = MyClient(endpoint, credential)\n\\`\\`\\`\n\n#### ❌ INCORRECT: Hardcoded Credentials\n\\`\\`\\`python\nclient = MyClient(endpoint, api_key=\"hardcoded\")  # Security risk\n\\`\\`\\`\n```\n\n**Critical patterns to document:**\n- Import paths (these vary significantly between Azure SDKs)\n- Authentication patterns\n- Client initialization\n- Async variants (`.aio` modules)\n- Common anti-patterns\n\n#### 6.2 Create Test Scenarios\n\n**Location:** `tests\u002Fscenarios\u002F\u003Cskill-name>\u002Fscenarios.yaml`\n\n```yaml\nconfig:\n  model: gpt-4\n  max_tokens: 2000\n  temperature: 0.3\n\nscenarios:\n  - name: basic_client_creation\n    prompt: |\n      Create a basic example using the Azure SDK.\n      Include proper authentication and client initialization.\n    expected_patterns:\n      - \"DefaultAzureCredential\"\n      - \"MyClient\"\n    forbidden_patterns:\n      - \"api_key=\"\n      - \"hardcoded\"\n    tags:\n      - basic\n      - authentication\n    mock_response: |\n      import os\n      from azure.identity import DefaultAzureCredential\n      from azure.ai.mymodule import MyClient\n      \n      credential = DefaultAzureCredential()\n      client = MyClient(\n          endpoint=os.environ[\"AZURE_ENDPOINT\"],\n          credential=credential\n      )\n      # ... rest of working example\n```\n\n**Scenario design principles:**\n- Each scenario tests ONE specific pattern or feature\n- `expected_patterns` — patterns that MUST appear\n- `forbidden_patterns` — common mistakes that must NOT appear\n- `mock_response` — complete, working code that passes all checks\n- `tags` — for filtering (`basic`, `async`, `streaming`, `tools`)\n\n#### 6.3 Run Tests\n\n```bash\ncd tests\npnpm install\n\n# Check skill is discovered\npnpm harness --list\n\n# Run in mock mode (fast, deterministic)\npnpm harness \u003Cskill-name> --mock --verbose\n\n# Run with Ralph Loop (iterative improvement)\npnpm harness \u003Cskill-name> --ralph --mock --max-iterations 5 --threshold 85\n```\n\n**Success criteria:**\n- All scenarios pass (100% pass rate)\n- No false positives (mock responses always pass)\n- Patterns catch real mistakes\n\n### Step 7: Update Documentation\n\nAfter creating the skill:\n\n1. **Update README.md** — Add the skill to the appropriate language section in the Skill Catalog\n   - Update total skill count (line ~73: `> N skills in...`)\n   - Update Skill Explorer link count (line ~15: `Browse all N skills`)\n   - Update language count table (lines ~77-83)\n   - Update language section count (e.g., `> N skills • suffix: -py`)\n   - Update category count (e.g., `\u003Csummary>\u003Cstrong>Foundry & AI\u003C\u002Fstrong> (N skills)\u003C\u002Fsummary>`)\n   - Add skill row in alphabetical order within its category\n   - Update test coverage summary (line ~622: `**N skills with N test scenarios**`)\n   - Update test coverage table — update skill count, scenario count, and top skills for the language\n\n2. **Regenerate GitHub Pages data** — Run the extraction script to update the docs site\n   ```bash\n   cd docs-site && npx tsx scripts\u002Fextract-skills.ts\n   ```\n   This updates `docs-site\u002Fsrc\u002Fdata\u002Fskills.json` which feeds the Astro-based docs site.\n   Then rebuild the docs site:\n   ```bash\n   cd docs-site && npm run build\n   ```\n   This outputs to `docs\u002F` which is served by GitHub Pages.\n\n3. **Verify AGENTS.md** — Ensure the skill count is accurate\n\n---\n\n## Progressive Disclosure Patterns\n\n### Pattern 1: High-Level Guide with References\n\n```markdown\n# SDK Name\n\n## Quick Start\n[Minimal example]\n\n## Advanced Features\n- **Streaming**: See references\u002Fstreaming.md\n- **Tools**: See references\u002Ftools.md\n```\n\n### Pattern 2: Language Variants\n\n```\nazure-service-skill\u002F\n├── SKILL.md (overview + language selection)\n└── references\u002F\n    ├── python.md\n    ├── dotnet.md\n    ├── java.md\n    └── typescript.md\n```\n\n### Pattern 3: Feature Organization\n\n```\nazure-ai-agents\u002F\n├── SKILL.md (core workflow)\n└── references\u002F\n    ├── tools.md\n    ├── streaming.md\n    ├── async-patterns.md\n    └── error-handling.md\n```\n\n---\n\n## Design Pattern References\n\n| Reference | Contents |\n|-----------|----------|\n| `references\u002Fworkflows.md` | Sequential and conditional workflows |\n| `references\u002Foutput-patterns.md` | Templates and examples |\n| `references\u002Fazure-sdk-patterns.md` | Language-specific Azure SDK patterns |\n\n---\n\n## Anti-Patterns\n\n| Don't | Why |\n|-------|-----|\n| Create skill without SDK context | Users must provide package name\u002Fdocs URL |\n| Put \"when to use\" in body | Body loads AFTER triggering |\n| Hardcode credentials | Security risk |\n| Skip authentication section | Agents will improvise poorly |\n| Use outdated SDK patterns | APIs change; search docs first |\n| Include README.md | Agents don't need meta-docs |\n| Deeply nest references | Keep one level deep |\n| Skip acceptance criteria | Skills without tests can't be validated |\n| Skip symlink categorization | Skills won't be discoverable by category |\n| Use wrong import paths | Azure SDKs have specific module structures |\n\n---\n\n## Checklist\n\nBefore completing a skill:\n\n**Prerequisites:**\n- [ ] User provided SDK package name or documentation URL\n- [ ] Verified SDK patterns via `microsoft-docs` MCP\n\n**Skill Creation:**\n- [ ] Description includes what AND when (trigger phrases)\n- [ ] SKILL.md under 500 lines\n- [ ] Authentication uses `DefaultAzureCredential`\n- [ ] Includes cleanup\u002Fdelete in examples\n- [ ] References organized by feature\n\n**Categorization:**\n- [ ] Skill created in `.github\u002Fskills\u002F\u003Cskill-name>\u002F`\n- [ ] Symlink created in `skills\u002F\u003Clanguage>\u002F\u003Ccategory>\u002F\u003Cshort-name>`\n- [ ] Symlink points to `..\u002F..\u002F..\u002F.github\u002Fskills\u002F\u003Cskill-name>`\n\n**Testing:**\n- [ ] `references\u002Facceptance-criteria.md` created with correct\u002Fincorrect patterns\n- [ ] `tests\u002Fscenarios\u002F\u003Cskill-name>\u002Fscenarios.yaml` created\n- [ ] All scenarios pass (`pnpm harness \u003Cskill> --mock`)\n- [ ] Import paths documented precisely\n\n**Documentation:**\n- [ ] README.md skill catalog updated\n- [ ] Instructs to search `microsoft-docs` MCP for current APIs\n\n## When to Use\nThis skill is applicable to execute the workflow or actions described in the overview.\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,91,423,"2026-05-16 13:40:42",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"编程开发","coding","mdi-code-braces","代码生成、调试、审查，提升开发效率",2,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"DevOps","devops","mdi-cog-outline","CI\u002FCD、容器化、部署运维",3,162,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"b828050c-5d1f-46ec-bb70-ff2e8c1e8a15","1.0.0","skill-creator-ms.zip",6998,"uploads\u002Fskills\u002F39ee6d97-5338-4cc1-bb31-e7d686389435\u002Fskill-creator-ms.zip","d1bc2b1d7bdebd3e14232d488572abf9816cd053a9707be618b11088be898afd","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":18589}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]