Automated summary
Guides an agent through running Pulumi's upgrade-provider tool on a provider repository and iterating on errors until the upgrade pull request is created.
Strengths
- Automates the upgrade loop with an explicit 10-minute timeout and error tracking to avoid infinite loops.
- Defines clear stopping conditions, including environment failure when the command is not found (exit code 127).
- Includes post-run steps to review patch conflicts and the applied upstream commits.
- Keeps git operations read-only and lets the tool own branches, commits, and PRs.
Limitations
- Assumes the upgrade-provider binary and Go environment are already installed and configured, with no fallback.
- Specific fixes depend on an external reference file (references/upgrade-provider-errors.md) not included here.
- Applies only to Pulumi provider repositories and requires shell access for long-running commands.
Use when upgrading a Pulumi provider repository to a new upstream version with the upgrade-provider tool.
Do not use for non-Pulumi repositories, first-time tool installation, or environments that cannot run long shell commands.
Security analysis
CautionThe skill automates a legitimate Pulumi provider upgrade workflow. It does not contain destructive or exfiltrating commands, but it does execute third-party code and perform network-based write operations, which warrant caution.
- •Installs and runs a third-party Go tool from GitHub via `go install`, introducing supply chain risk.
- •Uses `gh api` to modify the PR body, which is a write operation to GitHub.
- •Relies on network access for tool installation and GitHub CLI commands.
Examples
Run upgrade-provider on pulumi/pulumi-aws from the repo root and fix any errors it reports until the upgrade PR is created.The upgrade-provider run for pulumi/pulumi-gcp failed with a patch conflict; inspect the output, apply a fix, and rerun it.After the Pulumi provider upgrade, run ./scripts/upstream.sh checkout and summarize the intent and risk of each applied upstream commit.name: pulumi-upgrade-provider
description: Automate Pulumi provider repo upgrades with the upgrade-provider tool. Use when upgrading a pulumi provider repository to a new upstream version, running upgrade-provider, and addressing its common failure modes like patch conflicts or missing module mappings.
Pulumi Upgrade Provider
Prerequisites
First, install the upgrade-provider tool:
go install github.com/pulumi/upgrade-provider@latest
After installation, the tool will be in your PATH and you can run it directly as upgrade-provider.
IMPORTANT:
- Do NOT try to modify PATH or use absolute paths to run the tool
- Do NOT try to find where the tool was installed
- Just run
upgrade-providerdirectly after installing - if it's not found (exit code 127), report this as an environment configuration issue and stop
CRITICAL: Session Completion Requirements
DO NOT end this session until one of these conditions is met:
- Success: The
upgrade-providercommand completes successfully AND you have retrieved the PR URL - Explicit failure: You have hit a stopping condition listed in "When to Stop and Report Failure" below
You MUST NOT end the session if:
- A command is still running or you haven't checked its output
- You encountered an error but haven't attempted to fix it
- You haven't yet run
upgrade-providerat least once - The upgrade-provider command failed but you haven't exhausted the error-fixing loop
Long-running commands: The upgrade-provider command can take up to 10 minutes. You MUST wait for it to complete. Use timeout: 600000 when running it via Bash.
Overview
Drive Pulumi provider upgrades by running the upgrade-provider tool and iterating on failures until the tool succeeds. Keep all git operations read-only in the repo; the tool owns branches, commits, and PRs.
Error Tracking
Track errors across iterations to avoid infinite loops:
- Maintain a mental list of errors encountered and fixes attempted
- An error is "the same" if it has the same error message and affects the same file/resource
- After 3 failed attempts at the same error, stop and report failure
Run Loop
- Create the output directory first:
mkdir -p .pulumi
- Run the upgrade tool from the repo root with a 10-minute timeout:
upgrade-provider $ORG/$REPO --repo-path . > .pulumi/upgrade-provider-stdout.txt 2> /dev/null
Use timeout: 600000 (10 minutes) when invoking via Bash.
If exit code is 127 (command not found): This is an environment configuration issue. Report failure immediately - do NOT try to install the tool or find it manually.
-
Wait for the command to fully complete (can take up to 10 minutes). Do not proceed or end the session until you see the final output.
-
Read the output file to check for errors:
cat .pulumi/upgrade-provider-stdout.txt
- Scan the output for lines starting with
error:. - If failed:
- Compare the error to previous attempts
- If you've seen the same error 3 times, stop and report failure (see "When to Stop")
- If this is a new/different error, fix it using
references/upgrade-provider-errors.md - Rerun the command (go back to step 2)
- If a conflict was fixed, report exactly what changed (file paths + concrete edits or kept intent).
- If the upgrade required changes to patches, run
./scripts/upstream.sh checkoutand review the applied commits:- List commit SHAs/titles from
upstream. - Summarize the intent of each commit in plain language.
- Call out any behavioral changes or risks.
- List commit SHAs/titles from
- When the tool completes successfully, proceed to Post-run Tasks.
When to Stop and Report Failure
Stop iterating and exit with failure if any of these conditions are met:
- Command not found (exit code 127): The
upgrade-providertool is not in PATH. This is an environment configuration issue - do NOT try to install the tool yourself - Same error 3 times: You've attempted to fix the same error 3 times without success
- Unknown error pattern: The error is not covered in
references/upgrade-provider-errors.mdand you cannot determine a safe fix - Requires human judgment: The fix requires decisions that need human input, such as:
- Choosing between multiple valid approaches
- Breaking changes that affect public API
- Deprecation strategies
- Architectural decisions about module organization
- Circular issues: Fix A causes error B, fix B causes error A
- Complexity escalation: Each fix attempt reveals more issues, suggesting deeper problems
When stopping, you MUST report:
- The error(s) encountered
- What fixes were attempted (with file paths and changes)
- Why you believe human intervention is needed
- Any partial progress that was made
Post-run Tasks
The tool creates a PR when the upgrade completes successfully.
- MUST fetch the PR URL for the current branch using read-only commands:
gh pr view --json url --jq .url || gh pr list --head "$(git branch --show-current)" --json url --jq '.[0].url'
- MUST append a "Fixes applied to unblock upgrade" section to the existing PR body if any fixes were applied (do not overwrite):
repo=$(gh repo view --json nameWithOwner --jq .nameWithOwner)
pr_number=$(gh pr view --json number --jq .number)
gh pr view --json body --jq .body > /tmp/pr_body.txt
cat <<'EOF' >> /tmp/pr_body.txt
---
### Fixes applied to unblock upgrade
- <list concrete unblocker edits here, with file paths and intent>
EOF
gh api -X PATCH "repos/$repo/pulls/$pr_number" --raw-field body="$(cat /tmp/pr_body.txt)"
Use REST (gh api) instead of gh pr edit to avoid GraphQL project-card errors. Keep the original content intact; only append the new section.
Notes
git rebase --continue --no-editis not supported in older git versions. Usegit rebase --continueand accept the existing commit message when prompted.- To avoid the editor prompt during
git rebase --continue, run it withGIT_EDITOR=true(orGIT_EDITOR=:).
Working Directory
IMPORTANT: Always run commands from the repository root. Do NOT use cd to change directories - it causes state confusion and is not allowed.
Working with the upstream submodule
The upstream/ directory is a git submodule containing the Terraform provider source. Use these patterns:
Git commands - use -C upstream:
# Check status
git -C upstream status
# View log
git -C upstream log --oneline -10
# Check current branch
git -C upstream branch --show-current
# Continue a rebase (with auto-accept message)
GIT_EDITOR=: git -C upstream rebase --continue
# Stage files after resolving conflicts
git -C upstream add <file>
Reading files - use the Read tool with path from repo root:
Read upstream/docs/resources/droplet.md
Read upstream/go.mod
Editing files - use the Edit tool with path from repo root:
Edit upstream/docs/resources/droplet.md
Listing files - use full paths:
ls -la upstream/
ls -la upstream/vendor/github.com/digitalocean/godo/
Scripts - run from repo root:
./scripts/upstream.sh checkout
./scripts/upstream.sh rebase -o refs/tags/v2.75.0
./scripts/upstream.sh check_in
Guardrails
- Never commit, push, or create branches manually; only run read-only git commands.
./scripts/upstream.sh checkout|rebase|check_inare allowed because the tool manages git state.- Do not stash changes; the tool manages git state.
- Do not use
cd- always work from the repository root.
References
- Use this skill's
references/upgrade-provider-errors.mdfor patch conflict and new module mapping fixes.
Final Reminder
Before ending this session, verify:
- [ ] You ran
upgrade-providerand waited for it to complete - [ ] If it failed, you attempted fixes per the error reference guide
- [ ] If it succeeded, you retrieved and reported the PR URL
- [ ] If stopping due to failure, you documented the error, attempted fixes, and why human intervention is needed
Do not end the session without completing one of the outcomes above.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/pulumi-provider-upgrade-automation-mu99jolf/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/pulumi-provider-upgrade-automation-mu99jolf' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/pulumi-provider-upgrade-automation-mu99jolf/download' --output '.skill-downloads/pulumi-provider-upgrade-automation-mu99jolf/SKILL.md.part' && mv '.skill-downloads/pulumi-provider-upgrade-automation-mu99jolf/SKILL.md.part' '.skill-downloads/pulumi-provider-upgrade-automation-mu99jolf/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Original excerpt: Prerequisites
First, install the upgrade-provider tool:
go install github.com/pulumi/upgrade-provider@latest
After installation, the tool will be in your PATH and you can run it directly as upgrade-provider.
IMPORTANT:
- Do NOT try to modify PATH or use absolute paths to run the tool
- Do NOT try to find where the tool was installed
- Just run
upgrade-providerdirectly after installing - if it's not found (exit code 127), report this as an environment configuration issue and stop
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/pulumi-provider-upgrade-automation-mu99jolf/SKILL.md' && test -s '.skill-downloads/pulumi-provider-upgrade-automation-mu99jolf/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pulumi-upgrade-provider' && cp -R '.skill-downloads/pulumi-provider-upgrade-automation-mu99jolf' '.claude/skills/pulumi-upgrade-provider'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/pulumi-provider-upgrade-automation-mu99jolf'openskills read 'pulumi-provider-upgrade-automation-mu99jolf'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/pulumi-provider-upgrade-automation-mu99jolf/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
Configure a Chat Channel with SecretRefs
DevOps
Set up chat channels using non-interactive commands, with secrets only as SecretRefs. Covers gather, mutate, repair, and prove steps for reliable delivery.
Investigate ClickHouse CI Failures
DevOps
Investigate a ClickHouse CI failure end-to-end from a PR or S3 report URL. Fetches failed tests, classifies flaky vs real regression, and checks for existing issues/fixes.
Ansible PR Review
DevOps
Reviews an Ansible PR following the project's standardized process, including changelog checks, test coverage validation, and feedback tracking.