go-version-manager
Installation
SKILL.md
Go Version Manager
Choose the project-compatible Go toolchain before changing dependencies. Prefer the machine's existing goenv installation for real version switching. Fall back to explicit binary paths when no supported version manager is available.
Workflow
- Read
go.modcompletely enough to identifygo,toolchain, andreplacedirectives. - Run
.agents/skills/go-version-manager/scripts/go-version-manager.sh requirement <project-dir>,manager, andlist. - Run
.agents/skills/go-version-manager/scripts/go-version-manager.sh select <project-dir>to choose an installed binary. - Confirm the selected binary with
<go-binary> versionand<go-binary> env GOROOT GOTOOLCHAIN GOPATH GOMODCACHE GOCACHE. - Choose the switching scope:
- For one command, use the script's
execcommand. Withgoenv, it setsGOENV_VERSIONonly for that command. - For the current terminal, run the command printed by
shell-command(normallygoenv shell <version>). - For a repository-persistent selection, use
switch-local; this runsgoenv local <version>and writes.go-version, so do it only when the user authorizes a repository change. - Change
goenv globalonly when the user explicitly requests a machine-wide default change.
- For one command, use the script's
- Review
git diff -- go.mod go.sumafter any module command. - Report the selected version, commands run, dependency changes, and verification result.