azsdk-common-generate-sdk-locally

Generate, build, and test Azure SDKs locally from TypeSpec with automated customization.

2.6k|2.2k|Updated Dec 6, 2011
One-click install
npx skills add https://github.com/Azure/azure-sdk-for-java --skill azsdk-common-generate-sdk-locally
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azsdk-common-generate-sdk-locally
Source: https://github.com/Azure/azure-sdk-for-java/tree/main/.github/skills/azsdk-common-generate-sdk-locally
Command: npx skills add https://github.com/Azure/azure-sdk-for-java --skill azsdk-common-generate-sdk-locally

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Generating Azure SDKs from TypeSpec locally involves many manual steps—environment verification, code generation, building, testing, fixing build errors, and updating changelogs and metadata. This Skill orchestrates that entire workflow through the azure-sdk-mcp server, including automatic resolution of build failures, breaking changes, and analyzer errors via TypeSpec customizations.

Core Features & Use Cases

  • End-to-End SDK Generation: Verify setup, generate code from tspconfig.yaml or tsp-location.yaml, build, run checks and tests, then update changelog, metadata, and version.
  • Automatic Customization: Resolve build errors, breaking changes, naming violations (e.g., AZC0030), and customization drift using a two-phase approach of TypeSpec decorators and code patches.
  • Multi-Language Support: Works with .NET, Java, JavaScript, Python, Go, and Rust SDK repositories.
  • Use Case: A developer regenerates the Java SDK after a service team renames a TypeSpec property, and the build fails because a customization class references the old name. The Skill invokes the customization tool to update references, regenerate, rebuild, and validate.

Quick Start

Ask the AI to generate the SDK locally for your TypeSpec project, for example: "Generate the Java SDK locally from my tspconfig.yaml, build it, run tests, and update the changelog."

Frequently Asked Questions about azsdk-common-generate-sdk-locally

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an Azure SDK locally from TypeSpec?

Verify your environment with azsdk_verify_setup, then run azsdk_package_generate_code with the path to your tspconfig.yaml (from azure-rest-api-specs) or tsp-location.yaml (from an SDK language repo). Follow with build, check, and test tools to validate the output.

How do I fix Azure SDK build errors after TypeSpec regeneration?

Run azsdk_customized_code_update with the build error output. It classifies the issue, applies TypeSpec decorators in client.tsp first, then code patches if needed, regenerates the SDK, and rebuilds automatically.

Which languages does local Azure SDK generation support?

The workflow supports .NET, Java, JavaScript, Python, Go, and Rust. Each language maps to its own SDK repository such as azure-sdk-for-net or azure-sdk-for-python, and the MCP tools handle language-specific build and test steps.

Can I generate SDKs without the azure-sdk-mcp server?

Yes, without MCP you can use the tsp-client CLI via npm exec --prefix eng/common/tsp-client -- tsp-client or npx tsp-client. However, the automated customization and validation workflow requires the MCP server.

Why does my SDK build fail with duplicate field or renamed property errors?

This is customization drift: the TypeSpec spec added or renamed an entity that conflicts with existing manual customization code. Run azsdk_customized_code_update, which removes duplicate fields or updates references in customization files like *_patch.py or *Customization.java.

When should I not use this local SDK generation workflow?

Do not use it for publishing packages to registries, configuring CI pipelines, or conducting API design reviews. It covers only local generation, building, testing, customization, and metadata updates.