bump-kubelogin
Skill7 starsChanged 9 months agoMITView on GitHub
Bump the kubelogin Homebrew formula to a new upstream release version. Triggers: "bump kubelogin", "update kubelogin", "kubelogin version bump", "new kubelogin release", "upgrade kubelogin".
- Deletes or force-pushes
- Commits and pushes
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 9 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
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
- Very specific: line 34
If the user provides a version (e.g., "bump kubelogin to 0.2.16"), use that version.
- Distinctive: line 36
If no version is provided, auto-detect the latest release:
- Distinctive: line 50
If the current version equals the target version, inform the user that the formula is already up to date and stop.
- Distinctive: line 54
Follow the standard branch hygiene protocol:
- Very specific: line 92
Use precise context (include the url line above each sha256 line) to ensure the Edit tool matches the correct location.
- Distinctive: line 112
After editing, read both files to confirm:
- Distinctive: line 114
All 3 SHA256 hashes are updated and match the downloaded values
- Distinctive: line 115
No other lines were changed
- Distinctive: line 118
Run git diff to review the changes -- there should be exactly 8 lines changed per file (4 removed, 4 added).
- Distinctive: line 130
Create a PR targeting master:
- Very specific: line 147
If gh release view fails, the version may not exist.
- Very specific: line 148
If any .sha256 file download returns a 404, the release assets may not be published yet.
- Distinctive: line 149
If SHA256 values are not valid 64-character hex strings, stop and report the issue.
- Very specific: line 150
If a branch named update-kubelogin-v<VERSION> already exists remotely, inform the user and ask how to proceed.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Bump kubelogin Version
Bump the kubelogin Homebrew formula to a new upstream release version.
Overview
This skill updates the two Homebrew formula files (Formula/kubelogin.rb and Formula/az-kubelogin.rb) to a new kubelogin release version. Both files share the same version string and SHA256 checksums -- only the installed binary name differs.
What Changes Per Version Bump
Each bump modifies exactly 4 values in 2 files (8 edits total):
| Value | Line pattern |
| Version string | version "X.Y.Z" (line 7) |
| darwin-amd64 SHA256 | sha256 after kubelogin-darwin-amd64.zip URL (line 13) |
| darwin-arm64 SHA256 | sha256 after kubelogin-darwin-arm64.zip URL (line 16) |
| linux-amd64 SHA256 | sha256 after kubelogin-linux-amd64.zip URL (line 19) |
Files to update:
Formula/kubelogin.rbFormula/az-kubelogin.rb
Workflow
Step 1: Determine Target Version
If the user provides a version (e.g., "bump kubelogin to 0.2.16"), use that version. Strip any leading v prefix.
If no version is provided, auto-detect the latest release:
gh release view --repo Azure/kubelogin --json tagName --jq '.tagName' | sed 's/^v//'Step 2: Read Current Version
Extract the current version from the formula:
grep -m1 'version "' Formula/kubelogin.rb | sed 's/.*version "\(.*\)"/\1/'If the current version equals the target version, inform the user that the formula is already up to date and stop.
Step 3: Branch Hygiene
Follow the standard branch hygiene protocol:
git fetch origin
git checkout master
git reset --hard origin/master
git checkout -b update-kubelogin-v<VERSION>Step 4: Fetch SHA256 Checksums
Download the .sha256 checksum files from the GitHub release for all 3 platforms:
ARCHIVES=("kubelogin-darwin-amd64.zip" "kubelogin-darwin-arm64.zip" "kubelogin-linux-amd64.zip")
for archive in "${ARCHIVES[@]}"; do
curl -sL "https://github.com/Azure/kubelogin/releases/download/v<VERSION>/${archive}.sha256"
doneEach .sha256 file contains a line like: <64-char-hex> <filename>
Extract just the hex hash from each. Validate that each hash is exactly 64 hex characters. If any download fails or hash is malformed, stop and report the error.
Assign the results:
SHA_DARWIN_AMD64= hash fromkubelogin-darwin-amd64.zip.sha256SHA_DARWIN_ARM64= hash fromkubelogin-darwin-arm64.zip.sha256SHA_LINUX_AMD64= hash fromkubelogin-linux-amd64.zip.sha256
Step 5: Update Both Formula Files
For each of Formula/kubelogin.rb and Formula/az-kubelogin.rb, make exactly 4 edits using the Edit tool:
- Version string: Replace
version "<OLD_VERSION>"withversion "<NEW_VERSION>" - darwin-amd64 sha256: Replace the
sha256 "..."on the line after thekubelogin-darwin-amd64.zipURL - darwin-arm64 sha256: Replace the
sha256 "..."on the line after thekubelogin-darwin-arm64.zipURL - linux-amd64 sha256: Replace the
sha256 "..."on the line after thekubelogin-linux-amd64.zipURL
Use precise context (include the url line above each sha256 line) to ensure the Edit tool matches the correct location.
Example edit for darwin-amd64 in kubelogin.rb:
oldString:
url "https://github.com/Azure/kubelogin/releases/download/v#{version}/kubelogin-darwin-amd64.zip"
sha256 "<OLD_HASH>"newString:
url "https://github.com/Azure/kubelogin/releases/download/v#{version}/kubelogin-darwin-amd64.zip"
sha256 "<NEW_HASH>"Repeat the same pattern for darwin-arm64 and linux-amd64 in both files.
Step 6: Verify Changes
After editing, read both files to confirm:
- The version string is correct
- All 3 SHA256 hashes are updated and match the downloaded values
- No other lines were changed
- Both files have identical version and checksums
Run git diff to review the changes -- there should be exactly 8 lines changed per file (4 removed, 4 added).
Step 7: Commit and Push
git add Formula/kubelogin.rb Formula/az-kubelogin.rb
git commit -m "Bump kubelogin to v<VERSION>"
git push -u origin update-kubelogin-v<VERSION>Step 8: Create Pull Request
Create a PR targeting master:
gh pr create \
--title "Bump kubelogin to v<VERSION>" \
--body "## Summary
- Bumps kubelogin from v<OLD_VERSION> to v<VERSION>
- Updates SHA256 checksums for all 3 platforms (darwin-amd64, darwin-arm64, linux-amd64)
**Release:** https://github.com/Azure/kubelogin/releases/tag/v<VERSION>" \
--base masterReport the PR URL to the user.
Error Handling
- If
gh release viewfails, the version may not exist. Ask the user to verify. - If any
.sha256file download returns a 404, the release assets may not be published yet. Inform the user. - If SHA256 values are not valid 64-character hex strings, stop and report the issue.
- If a branch named
update-kubelogin-v<VERSION>already exists remotely, inform the user and ask how to proceed.
Notes
- The repo also contains
get-sha256.shwhich can be used as an alternative to manually curling checksums:KUBELOGIN_VERSION=<VERSION> ./get-sha256.sh - The upstream release page is:
https://github.com/Azure/kubelogin/releases - The default branch is
master(notmain)
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
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.

