Updates Go module dependencies with full verification pipeline (get, tidy, fmt, lint, test).
This skill automates the process of updating Go dependencies in the order service. It handles the full lifecycle: checking for updates, applying them, and running the verification pipeline.
Before doing anything, verify the environment:
git branch --show-current. If on main, STOP and ask the user to switch to a feature branch first.git status --porcelain. If there are uncommitted changes, WARN the user and ask whether to proceed or abort.Run:
go list -m -u all 2>/dev/null | grep '\[.*\]'
This shows all modules with available updates. Present the list to the user clearly, highlighting:
connectrpc.com/connect, google.golang.org/protobuf, github.com/jmoiron/sqlx, github.com/lib/pqNote: github.com/cooli88/contracts2 uses a local replace directive and cannot be updated via go get. Skip it in the update list.
Ask the user which update strategy to use:
Based on the user's choice, run the appropriate commands:
go get -u ./...
go mod tidy
go get -u=patch ./...
go mod tidy
go get package@version
go mod tidy
For specific packages, the user provides the list. Use go get package@latest or go get [email protected] as requested.
Show the user what changed:
git diff go.mod go.sum
Summarize the key changes: which packages were updated, from which version to which version. If critical packages were updated, explicitly call them out.
Run the full verification pipeline in order. Stop on first failure.
task fmttask linttask buildtask testIf all steps pass, report success.
If any verification step fails:
go get package@old-version and re-run the pipelinegit checkout go.mod go.sumDo NOT auto-commit. When the user asks to commit:
go.mod, go.sum, and any other changed filesupdate go dependencies
Updated packages:
- package/name: v1.2.3 -> v1.4.0
- other/package: v0.5.0 -> v0.6.1
The module github.com/cooli88/contracts2 is replaced with a local path (../contracts). It cannot be updated via go get and should be excluded from the update list.
These packages are tightly coupled to core functionality. Updates may require code changes:
connectrpc.com/connect — Connect RPC framework, changes can affect handler signaturesgoogle.golang.org/protobuf — protobuf runtime, must be compatible with generated code in contractsgithub.com/jmoiron/sqlx — database access layer, changes may affect query executiongithub.com/lib/pq — PostgreSQL driver, changes may affect database connectivity