Go Module Management

VerifiedCaution

Manage Go dependencies with risk assessment and version support. Analyzes available updates and facilitates Go version changes.

Sby Skills Guide Bot
DevelopmentIntermediate
3/9/2026
Claude Code
#go#dependency-management#go-mod#semver#versioning

Recommended for

Automated summary

This skill manages Go modules: it lists outdated dependencies, rates each update by semantic-version risk, applies updates in stages, and adjusts the Go version declared in go.mod.

Strengths

  • Rates updates on three risk tiers (safe patch, caution minor, risky major) based on `go list -m -u all`
  • Backs up go.mod and go.sum before touching anything, then validates with `go build ./...` and `go test ./...`
  • Handles Go version bumps through `go mod edit -go=` and includes a table of notable changes per release
  • Produces a structured end report listing updated modules and those deliberately skipped

Limitations

  • Major upgrades are not automated: the skill flags them but leaves migration to the developer
  • No vulnerability scanning or govulncheck integration
  • The Go release notes table stops at version 1.24 and will need refreshing
When to use it

Use it to audit, plan, or run a dependency refresh on a Go project, or to move the language version declared in go.mod.

When not to use it

Avoid it for non-Go build systems or for major API migrations that require manual code rewrites.

Security analysis

Caution
Quality score82/100

The instructions only run standard Go toolchain commands (cat, go list, go get, go mod tidy, go build, go test, go mod edit) plus a simple cp backup. There is no obfuscation, no curl|sh, no credential/token handling, and no destructive filesystem operations. The risk is limited to legitimate but powerful build/dependency mutations and network fetches, so it lands at caution rather than safe.

Findings
  • •Uses Bash to run `go get -u ./...`, `go get -u <mod>@latest`, and `go mod tidy`, which fetch code from the network and modify go.mod/go.sum and the module cache
  • •Creates backup copies (go.mod.backup / go.sum.backup) in the repo working tree rather than a temp location, which could be accidentally committed
  • •`go get -u` on all dependencies simultaneously is a broad, hard-to-review mutation of the project state
How this analysis is made

Examples

Vérifier les mises à jour
go.mod の依存関係を確認して、更新可能なモジュールを危険度付きで一覧にして
Mise à jour progressive
パッチバージョンの依存関係だけを更新して、go mod tidy とテストまで実行して
Changer la version Go
go.mod の Go バージョンを 1.22 に変更して、ビルドとテストで互換性を確認して

name: manage-mod description: Go モジュールを管理する。「依存関係を更新」「go mod」「モジュール更新」「依存関係確認」「go.mod 更新」「パッケージ更新」「依存関係を整理」「Go バージョン変更」などで起動。更新可能なモジュールの一覧、危険度評価、段階的更新、バージョン管理をサポート。 allowed-tools: [Read, Bash, Glob, Grep]

Manage-Mod

Go モジュールを管理します。依存関係の更新、危険度評価、Go バージョン管理をサポート。

引数

  • --check: 更新可能なモジュールを確認のみ(更新しない)
  • --version: Go バージョンを確認・変更
  • --set <version>: Go バージョンを指定したバージョンに変更
  • --help: ヘルプを表示

依存関係更新

1. 現在の依存関係を確認

cat go.mod
go list -m -u all

2. 更新可能なモジュールを分析

各モジュールについて以下を評価:

| 危険度 | 基準 | 説明 | |--------|------|------| | 🟢 安全 | パッチバージョン (v1.2.3 → v1.2.4) | バグ修正のみ、後方互換性保証 | | 🟡 注意 | マイナーバージョン (v1.2.0 → v1.3.0) | 新機能追加、非推奨警告あり | | 🔴 危険 | メジャーバージョン (v1.x.y → v2.0.0) | 破壊的変更、API の変更 |

3. 更新実行

# バックアップ作成
cp go.mod go.mod.backup
cp go.sum go.sum.backup

# 特定モジュールの更新
go get -u github.com/xxx/yyy@latest

# すべての依存関係を更新
go get -u ./...

# go.mod の整理
go mod tidy

# 更新後の確認
go build ./...
go test ./...

4. 結果レポート

✅ 依存関係更新完了

更新されたモジュール:
- github.com/xxx/yyy: v1.2.0 → v1.3.0 (🟡 マイナー)
- github.com/aaa/bbb: v2.1.0 → v2.1.1 (🟢 パッチ)

更新をスキップ:
- github.com/ccc/ddd: v1.0.0 → v2.0.0 (🔴 メジャー - 手動確認推奨)

推奨アクション:
1. `go test ./...` でテストを実行
2. メジャーバージョンアップは個別に検討

Go バージョン管理

1. 現在のバージョンを確認

# go.mod の Go バージョンを確認
grep "^go " go.mod

# システムの Go バージョンを確認
go version

2. バージョン変更(--set オプション使用時)

# go.mod の Go バージョンを変更
go mod edit -go=1.22

# 依存関係の整理
go mod tidy

3. 互換性チェック

# ビルド確認
go build ./...

# テスト確認
go test ./...

Go バージョンの主な変更点

| バージョン | 主な変更 | |-----------|---------| | 1.24 | tool ディレクティブ、go run キャッシング改善 | | 1.23 | イテレータ関数(range over func) | | 1.22 | ループ変数スコープ変更、PGO デフォルト有効化 | | 1.21 | 標準ライブラリの min/max/clear 関数 | | 1.20 | カバレッジプロファイル、PGO サポート |

重要な注意事項

  • ✅ メジャーバージョンアップは慎重に
  • ✅ 更新後は必ずビルドとテストを実行
  • ✅ 依存関係更新は独立したコミットに
  • ✅ CHANGELOG を確認
  • ❌ 後方互換性に注意(Go バージョンを上げると古いバージョンでビルドできない可能性)

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 files

This 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.md

From the root of a test project, save the file as .skill-downloads/go-module-management-mmio717a/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/go-module-management-mmio717a' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/go-module-management-mmio717a/download' --output '.skill-downloads/go-module-management-mmio717a/SKILL.md.part' && mv '.skill-downloads/go-module-management-mmio717a/SKILL.md.part' '.skill-downloads/go-module-management-mmio717a/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.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

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/go-module-management-mmio717a/SKILL.md' && test -s '.skill-downloads/go-module-management-mmio717a/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/manage-mod' && cp -R '.skill-downloads/go-module-management-mmio717a' '.claude/skills/manage-mod'

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 installation
openskills install './.skill-downloads/go-module-management-mmio717a'

openskills read 'go-module-management-mmio717a'

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 sync

Manual 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/go-module-management-mmio717a/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.

Related skills