Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ DO NOT USE FOR: general code review, non-APIView feedback

## MCP Tools

| Tool | Purpose |
|------|---------|
| `azure-sdk-mcp:azsdk_apiview_get_comments` | Get APIView comments |
| `azure-sdk-mcp:azsdk_customized_code_update` | Apply TypeSpec & code customization changes locally |
| `azure-sdk-mcp:azsdk_typespec_delegate_apiview_feedback` | Delegate to CCA pipeline |
| `azure-sdk-mcp:azsdk_run_typespec_validation` | Validate TypeSpec |
| `azure-sdk-mcp:azsdk_package_generate_code` | Regenerate SDK |
| Tool | Purpose |
| -------------------------------------------------------- | --------------------------------------------------- |
| `azure-sdk-mcp:azsdk_apiview_get_comments` | Get APIView comments |
| `azure-sdk-mcp:azsdk_customized_code_update` | Apply TypeSpec & code customization changes locally |
| `azure-sdk-mcp:azsdk_typespec_delegate_apiview_feedback` | Delegate to CCA pipeline |
| `azure-sdk-mcp:azsdk_run_typespec_validation` | Validate TypeSpec |
| `azure-sdk-mcp:azsdk_package_generate_code` | Regenerate SDK |

## Steps

Expand Down
24 changes: 12 additions & 12 deletions .github/skills/azsdk-common-generate-sdk-locally/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ license: MIT
metadata:
version: "1.1.0"
distribution: shared
description: "Generate, build, and test Azure SDKs locally from TypeSpec with automatic customization. WHEN: \"generate SDK locally\", \"build SDK\", \"run SDK tests\", \"run CI checks\", \"validate package\", \"run checks\", \"update changelog\", \"fix SDK build errors\", \"fix breaking changes\", \"resolve SDK generation errors\", \"customize TypeSpec\", \"rename SDK client\", \"rename SDK model\", \"hide operation from SDK\", \"fix analyzer errors\", \"resolve customization drift\", \"create subclient\", \"update metadata\", \"update version\". DO NOT USE FOR: publishing to package registries, CI pipeline configuration, API design review. INVOKES: azsdk_verify_setup, azsdk_package_generate_code, azsdk_package_build_code, azsdk_package_run_check, azsdk_package_run_tests, azsdk_customized_code_update, azsdk_package_update_changelog_content, azsdk_package_update_metadata, azsdk_package_update_version."
description: 'Generate, build, and test Azure SDKs locally from TypeSpec with automatic customization. WHEN: "generate SDK locally", "build SDK", "run SDK tests", "run CI checks", "validate package", "run checks", "update changelog", "fix SDK build errors", "fix breaking changes", "resolve SDK generation errors", "customize TypeSpec", "rename SDK client", "rename SDK model", "hide operation from SDK", "fix analyzer errors", "resolve customization drift", "create subclient", "update metadata", "update version". DO NOT USE FOR: publishing to package registries, CI pipeline configuration, API design review. INVOKES: azsdk_verify_setup, azsdk_package_generate_code, azsdk_package_build_code, azsdk_package_run_check, azsdk_package_run_tests, azsdk_customized_code_update, azsdk_package_update_changelog_content, azsdk_package_update_metadata, azsdk_package_update_version.'
compatibility: "azure-sdk-mcp server, local azure-sdk-for-{language} clone, language build tools"
---

Expand All @@ -26,17 +26,17 @@ DO NOT USE FOR: publishing to package registries, CI pipeline configuration, API

## MCP Tools

| Tool | Purpose |
|------|---------|
| `azure-sdk-mcp:azsdk_verify_setup` | Verify environment |
| `azure-sdk-mcp:azsdk_package_generate_code` | Generate SDK |
| `azure-sdk-mcp:azsdk_package_build_code` | Build package |
| `azure-sdk-mcp:azsdk_package_run_check` | Validate package |
| `azure-sdk-mcp:azsdk_package_run_tests` | Run tests |
| `azure-sdk-mcp:azsdk_customized_code_update` | Apply customizations (includes regeneration and build) |
| `azure-sdk-mcp:azsdk_package_update_changelog_content` | Update changelog |
| `azure-sdk-mcp:azsdk_package_update_metadata` | Update metadata including ci.yml |
| `azure-sdk-mcp:azsdk_package_update_version` | Update version |
| Tool | Purpose |
| ------------------------------------------------------ | ------------------------------------------------------ |
| `azure-sdk-mcp:azsdk_verify_setup` | Verify environment |
| `azure-sdk-mcp:azsdk_package_generate_code` | Generate SDK |
| `azure-sdk-mcp:azsdk_package_build_code` | Build package |
| `azure-sdk-mcp:azsdk_package_run_check` | Validate package |
| `azure-sdk-mcp:azsdk_package_run_tests` | Run tests |
| `azure-sdk-mcp:azsdk_customized_code_update` | Apply customizations (includes regeneration and build) |
| `azure-sdk-mcp:azsdk_package_update_changelog_content` | Update changelog |
| `azure-sdk-mcp:azsdk_package_update_metadata` | Update metadata including ci.yml |
| `azure-sdk-mcp:azsdk_package_update_version` | Update version |

Prerequisites: azure-sdk-mcp server must be running. Without MCP, use `npx tsp-client` CLI.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ The customization workflow is an AI-assisted process that applies TypeSpec decor

The customization tool (`azure-sdk-mcp:azsdk_customized_code_update`) can be triggered from multiple sources:

| Entry Point | Description | Example |
|-------------|-------------|---------|
| **Build failures** | Compilation errors, analyzer violations, linting failures after SDK generation | `error CS0246: The type or namespace name 'FooModel' could not be found` |
| **Breaking changes** | Output from breaking changes analysis tools detecting renamed/removed properties, changed types | `Breaking changes detected: FooOptions.timeout property type changed from int to Duration` |
| **User prompts** | Natural language requests to modify SDK behavior | "Rename FooClient to BarClient for .NET" |
| **API review feedback** | Feedback from APIView or PR comments on SDK naming/structure | "Model name doesn't follow .NET casing conventions" |
| **.NET analyzer errors** | AZC0030 (naming violations), AZC0012 (generic type names), etc. | `AZC0030: Model name ends with 'Parameters'` |
| **Customization drift** | Existing customization code references renamed/removed TypeSpec entities | `cannot find symbol: method getField(String)` |
| **Duplicate field conflicts** | TypeSpec adds a property that already exists in manual customization code | `variable operationId is already defined in class AnalyzeOperationDetails` |
| Entry Point | Description | Example |
| ----------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| **Build failures** | Compilation errors, analyzer violations, linting failures after SDK generation | `error CS0246: The type or namespace name 'FooModel' could not be found` |
| **Breaking changes** | Output from breaking changes analysis tools detecting renamed/removed properties, changed types | `Breaking changes detected: FooOptions.timeout property type changed from int to Duration` |
| **User prompts** | Natural language requests to modify SDK behavior | "Rename FooClient to BarClient for .NET" |
| **API review feedback** | Feedback from APIView or PR comments on SDK naming/structure | "Model name doesn't follow .NET casing conventions" |
| **.NET analyzer errors** | AZC0030 (naming violations), AZC0012 (generic type names), etc. | `AZC0030: Model name ends with 'Parameters'` |
| **Customization drift** | Existing customization code references renamed/removed TypeSpec entities | `cannot find symbol: method getField(String)` |
| **Duplicate field conflicts** | TypeSpec adds a property that already exists in manual customization code | `variable operationId is already defined in class AnalyzeOperationDetails` |

## When to Use

Expand Down Expand Up @@ -44,17 +44,17 @@ The customization tool (`azure-sdk-mcp:azsdk_customized_code_update`) can be tri

## Common Scenarios

| Scenario | Phase | Customization |
|----------|-------|--------------|
| Type name conflict with reserved keyword | A | Rename via `@@clientName` in `client.tsp` |
| Property renamed in new API version | A | Add `@@clientName` to preserve backward compatibility |
| .NET analyzer error (AZC0030, AZC0012) | A | Apply scoped `@@clientName` decorators to fix naming violations |
| Hide internal operation from SDK | A | Apply `@@access` decorator with language scope |
| Create subclient architecture | A | Use `@client` and `@clientInitialization` decorators |
| API review naming feedback | A | Apply scoped `@@clientName` for specific language |
| Duplicate field from customization conflict | B | Remove duplicate `addField()` from customization class |
| Customization references renamed property | B | Update references in `_patch.py`, `*Customization.java`, or partial classes |
| Feature request with no TypeSpec solution | Manual | Tool provides guidance to create customization infrastructure |
| Scenario | Phase | Customization |
| ------------------------------------------- | ------ | --------------------------------------------------------------------------- |
| Type name conflict with reserved keyword | A | Rename via `@@clientName` in `client.tsp` |
| Property renamed in new API version | A | Add `@@clientName` to preserve backward compatibility |
| .NET analyzer error (AZC0030, AZC0012) | A | Apply scoped `@@clientName` decorators to fix naming violations |
| Hide internal operation from SDK | A | Apply `@@access` decorator with language scope |
| Create subclient architecture | A | Use `@client` and `@clientInitialization` decorators |
| API review naming feedback | A | Apply scoped `@@clientName` for specific language |
| Duplicate field from customization conflict | B | Remove duplicate `addField()` from customization class |
| Customization references renamed property | B | Update references in `_patch.py`, `*Customization.java`, or partial classes |
| Feature request with no TypeSpec solution | Manual | Tool provides guidance to create customization infrastructure |

## Two-Phase Workflow

Expand All @@ -70,6 +70,7 @@ When neither phase resolves the issue, or no customization files exist, the tool
## Retry Logic

The tool handles retries internally with a two-pass classification approach:

1. First pass: classify feedback → apply TypeSpec fixes → regenerate → build
2. Second pass: re-classify remaining items with build error context → apply code patches → rebuild
3. If the tool response indicates build still failing, you can re-run `azure-sdk-mcp:azsdk_customized_code_update` with the updated error output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
Determine the correct path to the TypeSpec configuration file based on the working context.

**Scenario A: Working in `azure-rest-api-specs`**

- Identify the path to `tspconfig.yaml` (local path or HTTPS URL).
- The local folder name can be arbitrary; MCP validates that the remote origin points to the official repo.
- Example paths:
- `/home/usr/azure-rest-api-specs/specification/contosowidgetmanager/Contoso.Management/tspconfig.yaml`
- `https://github.com/Azure/azure-rest-api-specs/blob/main/specification/contosowidgetmanager/Contoso.Management/tspconfig.yaml`

**Scenario B: Working in an Azure SDK language repo**

- Identify the path to `tsp-location.yaml`.
- Example: `/home/usr/azure-sdk-for-net/sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml`

Expand All @@ -22,7 +24,7 @@ There are two commit checkpoints in the workflow. At each one:
1. Inform the user that the preceding steps completed successfully.
2. **Prompt the user** to decide whether to commit now. Do NOT skip this prompt.
3. If user chooses to commit:
- Check if on the `main` branch. If so, prompt: *"You are currently on the main branch. Please create a new branch using `git checkout -b <branch-name>` before proceeding."* Suggest a default branch name (e.g., `sdk/<service-name>/<package-name>`).
- Check if on the `main` branch. If so, prompt: _"You are currently on the main branch. Please create a new branch using `git checkout -b <branch-name>` before proceeding."_ Suggest a default branch name (e.g., `sdk/<service-name>/<package-name>`).
- Stage changed files with `git add`.
- Prompt for a commit message, then run `git commit -m "<message>"`.
4. If user skips, acknowledge and proceed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@

## MCP Tools

| Tool | Purpose |
|------|---------|
| `azure-sdk-mcp:azsdk_verify_setup` | Verify local environment for selected language |
| `azure-sdk-mcp:azsdk_package_generate_code` | Generate SDK from TypeSpec |
| `azure-sdk-mcp:azsdk_package_build_code` | Build package |
| `azure-sdk-mcp:azsdk_package_run_check` | Validate package |
| `azure-sdk-mcp:azsdk_package_run_tests` | Run tests |
| `azure-sdk-mcp:azsdk_customized_code_update` | Apply TypeSpec and code customizations to resolve build errors, breaking changes, or SDK modification requests (includes regeneration and build internally) |
| `azure-sdk-mcp:azsdk_package_update_changelog_content` | Update changelog |
| `azure-sdk-mcp:azsdk_package_update_metadata` | Update package metadata including ci.yml |
| `azure-sdk-mcp:azsdk_package_update_version` | Update package version |
| Tool | Purpose |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `azure-sdk-mcp:azsdk_verify_setup` | Verify local environment for selected language |
| `azure-sdk-mcp:azsdk_package_generate_code` | Generate SDK from TypeSpec |
| `azure-sdk-mcp:azsdk_package_build_code` | Build package |
| `azure-sdk-mcp:azsdk_package_run_check` | Validate package |
| `azure-sdk-mcp:azsdk_package_run_tests` | Run tests |
| `azure-sdk-mcp:azsdk_customized_code_update` | Apply TypeSpec and code customizations to resolve build errors, breaking changes, or SDK modification requests (includes regeneration and build internally) |
| `azure-sdk-mcp:azsdk_package_update_changelog_content` | Update changelog |
| `azure-sdk-mcp:azsdk_package_update_metadata` | Update package metadata including ci.yml |
| `azure-sdk-mcp:azsdk_package_update_version` | Update package version |

## Build Failure Resolution

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ license: MIT
metadata:
version: "1.0.0"
distribution: shared
description: "Diagnose and resolve failures in Azure SDK CI and generation pipelines. **UTILITY SKILL**. USE FOR: \"pipeline failed\", \"build failure\", \"CI check failing\", \"SDK generation error\", \"reproduce pipeline locally\", \"debug SDK pipeline\". DO NOT USE FOR: local build issues without pipeline context, API design review, SDK publishing. INVOKES: azure-sdk-mcp:azsdk_analyze_pipeline, azure-sdk-mcp:azsdk_verify_setup, azure-sdk-mcp:azsdk_package_build_code, azure-sdk-mcp:azsdk_package_run_check, azure-sdk-mcp:azsdk_package_pack."
description: 'Diagnose and resolve failures in Azure SDK CI and generation pipelines. **UTILITY SKILL**. USE FOR: "pipeline failed", "build failure", "CI check failing", "SDK generation error", "reproduce pipeline locally", "debug SDK pipeline". DO NOT USE FOR: local build issues without pipeline context, API design review, SDK publishing. INVOKES: azure-sdk-mcp:azsdk_analyze_pipeline, azure-sdk-mcp:azsdk_verify_setup, azure-sdk-mcp:azsdk_package_build_code, azure-sdk-mcp:azsdk_package_run_check, azure-sdk-mcp:azsdk_package_pack.'
compatibility: "azure-sdk-mcp server, Azure DevOps pipeline build ID"
---

Expand All @@ -26,8 +26,8 @@ DO NOT USE FOR: local build issues without pipeline context, API design review,

## MCP Tools

| Tool | Purpose |
| -------------------------- | ------------------------ |
| Tool | Purpose |
| ---------------------------------------- | ------------------------ |
| `azure-sdk-mcp:azsdk_analyze_pipeline` | Analyze pipeline failure |
| `azure-sdk-mcp:azsdk_verify_setup` | Verify local environment |
| `azure-sdk-mcp:azsdk_package_build_code` | Reproduce build locally |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ For first release of management plane SDK:
If SDK PRs exist:

1. Ensure GitHub CLI authentication (`gh auth login`)
2. Run `azsdk_link_sdk_pull_request_to_release_plan` for each PR, passing the Release Plan ID or work item ID as `workItemId` (or as `releasePlanId`) — either value is accepted.
2. Run `azsdk_link_sdk_pull_request_to_release_plan` for each PR, passing the Release Plan ID or work item ID as `workItemId` (or as `releasePlanId`) — either value is accepted.