.claude/skills/upstream-patches/SKILL.md
Working with upstream patches - creating, editing, deleting, and rebasing patches for the Terraform provider submodule in the upstream/ directory
npx skillsauth add pulumi/pulumi-docker upstream-patchesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The upstream/ directory is a git submodule pointing to the upstream Terraform provider. We maintain patches in the patches/ directory that are applied on top of the upstream code. Use ./scripts/upstream.sh to manage patches.
| Command | Description |
|---------|-------------|
| ./scripts/upstream.sh init | Initialize upstream and apply patches to working directory |
| ./scripts/upstream.sh init -f | Force re-initialize, discarding any changes |
| ./scripts/upstream.sh checkout | Create branch with patches as commits for editing |
| ./scripts/upstream.sh rebase -i | Interactively edit patch commits |
| ./scripts/upstream.sh rebase -o <commit> | Rebase patches onto a new upstream commit |
| ./scripts/upstream.sh check_in | Write commits back to patches and exit checkout mode |
# 1. Enter checkout mode (converts patches to commits)
./scripts/upstream.sh checkout
# 2. Make changes in the upstream/ directory
cd upstream
# ... make your changes ...
# 3. Commit your changes
git commit -am "Description of the change"
# 4. Exit checkout mode (converts commits back to patches)
cd ..
./scripts/upstream.sh check_in
# 5. The new patch is now in patches/ and staged for commit
# 1. Enter checkout mode
./scripts/upstream.sh checkout
# 2. Interactive rebase to delete the commit
./scripts/upstream.sh rebase -i
# In the editor, delete or 'drop' the line for the patch you want to remove
# 3. Exit checkout mode
./scripts/upstream.sh check_in
# 1. Enter checkout mode
./scripts/upstream.sh checkout
# 2. Interactive rebase
./scripts/upstream.sh rebase -i
# Mark the commit as 'edit' in the editor
# 3. Make your changes, then amend the commit
git commit --amend
# 4. Continue the rebase
git rebase --continue
# 5. Exit checkout mode
./scripts/upstream.sh check_in
# 1. Enter checkout mode
./scripts/upstream.sh checkout
# 2. Rebase onto the new upstream commit
./scripts/upstream.sh rebase -o <new_commit_sha>
# Resolve any conflicts that arise
# 3. Exit checkout mode
./scripts/upstream.sh check_in
# 4. Both patches/ and upstream are staged for commit
Patches are stored in patches/ as numbered .patch files:
0001-Description.patch0002-Another-change.patchTo understand what a patch does:
git log to see commitsupstream/ - Always use the checkout/check_in workflowcheck_in, both patches/ and upstream changes are staged./scripts/upstream.sh init -f to resettools
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.
development
Code review guidelines for Pulumi provider repositories - reviewing patches, resources.go changes, SDK changes, and CI workflows
devops
Local text-to-speech via sherpa-onnx (offline, no cloud)
devops
Feishu cloud storage file management. Activate when user mentions cloud space, folders, drive.