agentleFS
Microsoft AzureKnown publisherAzure/azure-sdk-for-python/.github/skills/azsdk-common-generate-sdk-locally/SKILL.md

azsdk-common-generate-sdk-locally

Skill5.6k starsChanged 21 months agoMITView on GitHub

Generate and finalize Azure SDKs locally from TypeSpec, including build, checks, tests, changelog, metadata, and version updates by default. WHEN: "generate SDK locally", "build SDK", "run SDK tests", "run CI checks", "validate package", "run checks", "update changelog", "fix SDK build errors", "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". 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.

7 other projects use a version of this, 4 of them edited.

Trending

Quiet since April.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the Azure/azure-sdk-for-python repository that our weekly crawl found: only 13 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about Azure/azure-sdk-for-python

The biggest 5 of 13 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 13

Talked about on GitHub, Hacker News and Bluesky (13 times).

On GitHub · 11

6 more on GitHub

On Hacker News · 1

Used with

Projects with it also use code-review.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

10 rules. 3 are common, 2 are distinctive, and 5 are very specific to this project.

  • 3

    Common

    Most of the 4 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    WHEN: "generate SDK locally", "build SDK", "run SDK tests", "update changelog", "fix SDK build errors", "resolve SDK generation errors", …

    line 18
  2. Distinctive:

    Do not use this skill for:

    line 22
  3. Very specific:

    Never use azure-sdk-mcp:azsdk_get_sdk_pull_request_link or azure-sdk-mcp:azsdk_get_pull_request to _generate_ an SDK.

    line 33
  4. Common:

    Verify the target language repo and the correct TypeSpec configuration file before generation.

    line 35
  5. Common:

    After generation or customization, run the check and test steps before updating metadata or finalizing changes.

    line 36
  6. Very specific:

    If azure-sdk-mcp:azsdk_customized_code_update fails or times out, report the error to the user and suggest retrying.

    line 75
  7. Common:

    Only the customization tool understands the correct layering of TypeSpec decorators vs code patches and ensures regenerated code stays …

    line 76
  8. Very specific:

    Run azure-sdk-mcp:azsdk_verify_setup to confirm MCP and tools.

    line 97
  9. Very specific:

    If build fails with type conflicts, breaking changes, analyzer errors, or customization drift, use …

    line 98
  10. Very specific:

    If azure-sdk-mcp:azsdk_customized_code_update fails or times out, report the error and retry.

    line 100

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Generate SDK Locally

This skill generates, builds, and tests Azure SDKs locally from TypeSpec with automatic customization support, covering the end-to-end workflow for fixing generation issues, applying SDK-specific updates, and refreshing package metadata when needed.

Triggers

USE FOR: generate, build, and test Azure SDKs locally from TypeSpec with automatic customization; update changelog; fix SDK build errors; resolve SDK generation errors; customize TypeSpec; rename SDK client or model; hide operation from SDK; fix analyzer errors; resolve customization drift; create subclient; update metadata; update version WHEN: "generate SDK locally", "build SDK", "run SDK tests", "update changelog", "fix SDK build errors", "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"

Boundaries

Do not use this skill for:

  • Publishing SDK packages to package registries
  • CI pipeline configuration
  • API design review

Rules

  • Interpret "generate SDK" and "generate SDK locally" as requests for the complete workflow: generate, build, validate, test, update changelog, update metadata, and update version. Do not treat the word "generate" by itself as a generate-only request.
  • Stop after generation and a successful build when the user explicitly says "generate only", "only generate", or otherwise explicitly asks to skip checks, tests, changelog, metadata, and version updates. Bind only to the generation action even when a target qualifier follows: "generate SDK only for Web PubSub" is a generate-only request scoped to Web PubSub. By contrast, "generate the SDK for only the Web PubSub service" scopes the complete workflow to one service. Once a request is classified as generate-only, do not prompt for a commit or run steps 8–11. If the user's intent is unclear, default to the complete workflow.
  • This skill generates an SDK locally from a local clone. Use it to generate an SDK only when the user indicates local generation — they say "local"/"locally", or are working from a local clone. If the user asks to "generate SDK for all languages", to generate for a release plan / release ID (even a single language), to generate without a local clone, or wants SDK pull requests created for them, do not generate locally — use the azsdk-common-generate-sdk-pipeline skill, which runs the SDK generation pipeline for each language and produces the SDK pull requests.
  • Never use azure-sdk-mcp:azsdk_get_sdk_pull_request_link or azure-sdk-mcp:azsdk_get_pull_request to generate an SDK; those only retrieve links for SDKs that were already generated.
  • Requires the azure-sdk-mcp server for the MCP workflow; without MCP, use npm exec --prefix eng/common/tsp-client -- tsp-client CLI.
  • Verify the target language repo and the correct TypeSpec configuration file before generation.
  • After generation or customization, run the check and test steps before updating metadata or finalizing changes.

MCP Tools

ToolPurpose
azure-sdk-mcp:azsdk_verify_setupVerify environment
azure-sdk-mcp:azsdk_package_generate_codeGenerate SDK
azure-sdk-mcp:azsdk_package_build_codeBuild package
azure-sdk-mcp:azsdk_package_run_checkValidate package
azure-sdk-mcp:azsdk_package_run_testsRun tests
azure-sdk-mcp:azsdk_customized_code_updateApply customizations (includes regeneration and build)
azure-sdk-mcp:azsdk_package_update_changelog_contentUpdate changelog
azure-sdk-mcp:azsdk_package_update_metadataUpdate metadata including ci.yml
azure-sdk-mcp:azsdk_package_update_versionUpdate version

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

Steps

  1. Select language — Confirm target language: .NET, Java, JavaScript, Python, Go, or Rust.
  2. Verify repo — Ensure the user has a local clone of the correct SDK repo. If not cloned, instruct user to clone it.
  3. Identify config file — Determine the path to the TypeSpec configuration file. See config file details.
    • From azure-rest-api-specs repo: use path to tspconfig.yaml.
    • From an SDK language repo: use path to tsp-location.yaml.
  4. Verify setup — Run azure-sdk-mcp:azsdk_verify_setup to confirm environment.
  5. Generate — Run azure-sdk-mcp:azsdk_package_generate_code with the config file path.
  6. Build — Run azure-sdk-mcp:azsdk_package_build_code. For .NET, use the additionalArguments: "/p:RunApiCompat=false" to skip API compatibility checks if user requests to skip API compatibility check.
  7. Customize — If build fails, or if user requests SDK modifications, run azure-sdk-mcp:azsdk_customized_code_update with the build errors or user request. The tool handles the full workflow internally: it classifies the issue, applies TypeSpec decorators and/or code patches, regenerates the SDK, and builds — all in one call. See customization workflow. (If the user requested "generate only", stop here — skip steps 8–11.)
  8. Commit checkpoint — Prompt the user to commit generated changes before proceeding. See commit checkpoint details.
  9. Validate — Run azure-sdk-mcp:azsdk_package_run_check and azure-sdk-mcp:azsdk_package_run_tests.
  10. Metadata — Run azure-sdk-mcp:azsdk_package_update_changelog_content, azure-sdk-mcp:azsdk_package_update_metadata, and azure-sdk-mcp:azsdk_package_update_version. (Note: For .NET data plane, skip this step — metadata, changelog, and version updates are per-commit tasks, not part of the generate/build/test workflow.)
  11. Final commit — Prompt the user to commit final changes (changelog, metadata, version). See commit checkpoint details.

SDK repos | Customization workflow | Detailed workflow

Guardrails

  • NEVER modify generated SDK code files directly for customizations. Always use azure-sdk-mcp:azsdk_customized_code_update. It handles classification, TypeSpec decorators, code patches, regeneration, and build as a single atomic workflow.
  • If azure-sdk-mcp:azsdk_customized_code_update fails or times out, report the error to the user and suggest retrying. Do not attempt to replicate its behavior by editing files manually.
  • Only the customization tool understands the correct layering of TypeSpec decorators vs code patches and ensures regenerated code stays consistent.

Examples

  • "Generate the SDK locally for my TypeSpec service"
  • "Build and test the Python SDK package"
  • "Run CI checks for my SDK package"
  • "Fix the SDK build errors on this PR"
  • "Rename FooClient to BarClient for .NET"
  • "Hide the internal polling operation from the Python SDK"
  • "Fix .NET analyzer errors AZC0030 and AZC0012"
  • "The build is failing because a customization references a renamed property"
  • "Create a subclient architecture for the Python SDK"
  • "Apply TypeSpec customizations to fix compilation errors"
  • "Update the changelog for this SDK package"
  • "Update the package version"
  • "Update the package metadata and ci.yml"

Troubleshooting

  • For "generate SDK for all languages", pipeline-based generation, or when no local SDK clone exists, call azure-sdk-mcp:azsdk_run_generate_sdk instead of the local generate flow, and never substitute azure-sdk-mcp:azsdk_get_sdk_pull_request_link / azure-sdk-mcp:azsdk_get_pull_request for generation.
  • Run azure-sdk-mcp:azsdk_verify_setup to confirm MCP and tools.
  • If build fails with type conflicts, breaking changes, analyzer errors, or customization drift, use azure-sdk-mcp:azsdk_customized_code_update to apply customizations.
  • The customization tool uses a two-phase approach: TypeSpec decorators first (Phase A), then code repairs if needed (Phase B).
  • If azure-sdk-mcp:azsdk_customized_code_update fails or times out, report the error and retry. Do not manually edit generated SDK code — manual edits will be overwritten on the next regeneration.
  • Without MCP, use npx tsp-client CLI.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.