This skill automates the version bump and pull request creation for the typespec-python emitter package in the Azure SDK repository.
Install
mkdir -p .claude/skills/emitter-package-update && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5879" && unzip -o skill.zip -d .claude/skills/emitter-package-update && rm skill.zipInstalls to .claude/skills/emitter-package-update
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Automate bumping typespec-python version in emitter-package.json for the Azure SDK for Python repository. Use this skill when the user wants to update @azure-tools/typespec-python to the latest version, create a PR for the version bump, or manage emitter-package.json updates.Key capabilities
- →Identify latest typespec-python version
- →Update emitter-package.json manifest
- →Clean and sync local repo state
- →Facilitate GitHub PR creation
How it works
Executes shell commands to reset the repository state, queries npm for the latest version, and modifies the package JSON.
Inputs & outputs
When to use emitter-package-update
- →Bump typespec-python version
- →Update emitter-package.json
- →Create PRs for SDK updates
About this skill
Emitter Package Update
Update the dependencies in eng/emitter-package.json to their latest versions — including
@azure-tools/typespec-python when a newer release exists — and, if anything changed, open a PR.
Background
The Python emitter ecosystem consists of two packages:
- Branded emitter (
@azure-tools/typespec-python): Lives in Azure/typespec-azure. This is the emitter used for Azure SDK generation. - Unbranded emitter (
@typespec/http-client-python): Lives in microsoft/typespec. The branded emitter wraps this package.
When eng/emitter-package.json is updated on main, the TypeSpec Python Regenerate Tests workflow triggers automatically. It regenerates the test code, pushes it to a regen/typespec-python-main source branch, and (because GitHub Actions cannot open PRs in this repo) creates/updates a tracking issue with a pre-filled compare link that a maintainer clicks to open the PR against the typespec-python-generated-tests target branch.
Prerequisites
Before running this workflow, verify the following tools are installed:
# Check npm-check-updates
npx npm-check-updates --version
# Check tsp-client
tsp-client --version
# Check GitHub CLI
gh --version
If any tool is missing:
- npm-check-updates: Install via
npm install -g npm-check-updates - tsp-client: Install via
npm install -g @azure-tools/typespec-client-generator-cli - GitHub CLI: Install from https://cli.github.com/ or via
winget install GitHub.cli
Workflow
1. Prepare Repository
Reset and sync the SDK repo to a clean state.
Warning: this discards all uncommitted changes and switches to
main. Only run it on a clone/worktree dedicated to this task, never on a branch with work you want to keep.
git reset HEAD && git checkout . && git clean -fd && git checkout origin/main && git pull origin main
Record the current @azure-tools/typespec-python version from eng/emitter-package.json
(checking both the dependencies and devDependencies sections) so you can tell later
whether it was bumped.
2. Update Dependencies (still on main)
The goal is to update every package across both the dependencies and
devDependencies sections of eng/emitter-package.json to its latest version — not just
@azure-tools/typespec-python. Run npm-check-updates, which upgrades all entries in both
sections by default:
npx npm-check-updates --packageFile eng/emitter-package.json -u
Restricted-network fallback (e.g. the coding-agent sandbox):
npm-check-updatesneeds access to the npm registry, which may be firewalled. If it cannot reach the registry, determine the latest@azure-tools/typespec-pythonversion from GitHub instead — the newest published tag in Azure/typespec-azure (cross-checked againstpackages/typespec-python/package.jsononmain) — and editeng/emitter-package.jsonby hand to that version.
Align the packages listed in alignment-sources.json with the versions pinned in each
configured source repo package file to ensure consistency between the emitter and its
upstream sources. For each source, read packageJsonUrl, set every package listed in
that source's packages array to the version currently pinned there, and do not assume
specific version numbers. To add more libraries for alignment later, add their package
names to the relevant packages array in alignment-sources.json.
If a specific version was requested, pin @azure-tools/typespec-python to that exact
version in eng/emitter-package.json (overriding what npm-check-updates picked).
3. Check for Changes
Determine whether anything actually changed:
git diff --quiet -- eng/emitter-package.json
Decision rule: A PR must be created whenever there is any change to eng/emitter-package.json — this includes the case where @azure-tools/typespec-python itself is unchanged but one or more other dependencies (e.g. @typespec/*, @azure-tools/openai-typespec) were updated or aligned. Do not require a typespec-python version bump as a precondition for opening a PR.
- If there is a diff (exit code
1), proceed to step 4 and open a PR. - Only if there is no diff at all (exit code
0) — meaning every dependency is already up to date — discard the working-tree changes and stop, as there is nothing to commit:
git checkout -- eng/emitter-package.json
4. Create Feature Branch
Read the (possibly updated) @azure-tools/typespec-python version and compare it with the
value recorded in step 1 to choose names:
- If typespec-python was bumped to
{version}:- branch:
bump-typespec-python-{version} - commit / PR title:
bump typespec-python {version} - PR body:
Bump @azure-tools/typespec-python to version {version}
- branch:
- Otherwise (only other dependencies changed):
- branch:
update-emitter-package-dependencies - commit / PR title:
update emitter-package dependencies - PR body:
Update emitter-package.json dependencies to their latest aligned versions.
- branch:
Create the branch, carrying over the working-tree changes:
git checkout -b {branch_name}
If a branch with that name already exists locally from a previous run, delete it first
(git branch -D {branch_name}) — or, if it holds work you want to keep, choose a different
name — before re-creating it.
5. Regenerate Lock File
tsp-client generate-lock-file
This regenerates eng/emitter-package-lock.json.
Restricted-network note:
tsp-client generate-lock-filealso resolves packages from the npm registry. If the registry is unreachable, the lock file cannot be regenerated in the sandbox. In that case commit only theeng/emitter-package.jsonchange (skip the lock file in step 6), and call out in the PR body thateng/emitter-package-lock.jsonstill needs to be regenerated in an environment with npm-registry access before merge.
6. Commit Changes
Stage both files when the lock file was regenerated:
git add eng/emitter-package.json eng/emitter-package-lock.json
git commit -m "{commit_message}"
If the lock file was not regenerated (restricted-network case in step 5), stage only the package file instead:
git add eng/emitter-package.json
git commit -m "{commit_message}"
7. Create Pull Request
Push the branch and create the PR:
git push -u origin {branch_name}
gh pr create --title "{pr_title}" --body "{pr_body}"
8. After Merge
Once the PR merges to main, the TypeSpec Python Regenerate Tests workflow triggers automatically because eng/emitter-package.json was modified. It will:
- Build
http-client-pythonfrommicrosoft/typespec@mainand regenerate all test code - Commit the regenerated files to the
regen/typespec-python-mainsource branch and force-push it - Create or update a tracking issue containing a pre-filled "compare" link (GitHub Actions cannot open PRs in this repo) so a maintainer can open the PR against the
typespec-python-generated-teststarget branch. Merging that PR does not auto-close the tracking issue — close it manually.- The tracking issue is assigned to whoever triggered a manual (
workflow_dispatch) run, or to @iscai-msft and @msyyc for automaticpush/scheduleruns.
- The tracking issue is assigned to whoever triggered a manual (
- If the workflow fails, a separate failure-notification issue is created (or commented on) and assigned to @iscai-msft and @msyyc
When not to use it
- →Manually updating SDK dependencies without automation
- →Projects outside the Azure SDK Python repo
Prerequisites
Limitations
- →Depends on external npm registry
- →Requires clean repository state
How it compares
Reduces manual sync steps and ensures consistency with the official Azure SDK regeneration workflow.
Compared to similar skills
emitter-package-update side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| emitter-package-update (this skill) | 1 | 2mo | Review | Intermediate |
| dev | 2 | 6mo | Review | Advanced |
| autogluon-conda-upgrade | 0 | 6mo | Review | Intermediate |
| pre-release | 1 | 3mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by Azure
View all by Azure →You might also like
dev
atopile
LLM-focused workflow for working in this repo: compile Zig, run the orchestrated test runner, consume test-report.json/html artifacts, and discover/debug ConfigFlags.
autogluon-conda-upgrade
autogluon
Automate AutoGluon conda-forge feedstock version upgrades. Use when the user wants to upgrade AutoGluon to a new version in conda-forge, create PRs for AutoGluon conda feedstocks, or update autogluon.common, autogluon.core, autogluon.features, autogluon.tabular, autogluon.multimodal, autogluon.timeseries, or autogluon meta-package feedstocks.
pre-release
ZhuoZhuoCrayon
Automates release preparation for throttled-py. Triggers when user message contains: - "release vX.Y.Z" with a GitHub release draft URL - "release vX.Y.Z" followed by changelog content Tasks: update version numbers, sync CHANGELOG_EN.rst and CHANGELOG.rst, run dependency sync.
klingai-ci-integration
jeremylongshore
Execute integrate Kling AI video generation into CI/CD pipelines. Use when automating video content generation in build pipelines. Trigger with phrases like 'klingai ci', 'kling ai github actions', 'klingai automation', 'automated video generation'.
uv
julianobarbosa
Guide for using uv - an extremely fast Python package and project manager written in Rust. Use when installing Python, managing virtual environments, adding dependencies, running scripts, building packages, or working with pyproject.toml. Replaces pip, pip-tools, pipx, poetry, pyenv, twine, and virt
airflow
ComeOnOliver
Apache Airflow lets you define workflows as Directed Acyclic Graphs (DAGs) in Python. Each DAG consists of tasks connected by dependencies, scheduled and monitored via a web UI.