Agent skill

Golang Dependency Management

by samber in samber/cc-skills-golang

Dependency management for Golang projects — go.mod and go.sum, go get install and upgrade flows, Minimal Version Selection, conflict resolution with replace/exclude/retract, govulncheck scanning of…

MITAuto-check passedDevelopment

Install Golang Dependency Management

skills CLI
$ npx skills add samber/cc-skills-golang --skill golang-dependency-management -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install samber/cc-skills-golang golang-dependency-management --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/samber/cc-skills-golang.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/golang-dependency-management .claude/skills/golang-dependency-management && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
golang-dependency-management
GitHub stars
3.4k
Token cost
~2.6k tokens
SKILL.md length
833 words
Files
8 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Dependency management for Golang projects — go.mod and go.sum, go get install and upgrade flows, Minimal Version Selection, conflict resolution with replace/exclude/retract, govulncheck scanning of…

  • Upgrading Go dependencies
  • SKILL.md covers AI Agent Rule: Ask Before…, Key Rules, go.mod & go.sum and Installing & Upgrading…, plus 3 more sections
  • Calls go
  • Deciding whether to take on a package

What it does

Golang Dependency Management is an agent skill from samber/cc-skills-golang. Dependency management for Golang projects — go.mod and go.sum, go get install and upgrade flows, Minimal Version Selection, conflict resolution with replace/exclude/retract, govulncheck scanning of the module tree, outdated dependency and binary size auditing, vendoring, tool directives, and go.work workspaces. Use when adding, removing, or upgrading Go dependencies, deciding whether to take on a package, resolving version conflicts, or auditing what a module pulls in. Covers choosing and upgrading dependency…

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including reference files (for example `evals/evals.json`, `references/auditing.md` and `references/automated-updates.md`). Compatibility notes: Designed for Claude Code, Codex or similar harness, and for projects using Golang.

It sits in Development, covering Dependency management. It works with Go. The repository describes itself as: 🧑🎨 A collection of Golang agentic skills that works. The licence is MIT.

When your agent uses it

  • Upgrading Go dependencies
  • Deciding whether to take on a package
  • Resolving version conflicts
  • Auditing what a module pulls in

Example prompts

  • “/golang-dependency-management”

Requirements

  • Docker
  • Compatibility (from SKILL.md): Designed for Claude Code, Codex or similar harness, and for projects using Golang.
  • Pre-approved tools (allowed-tools): Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(golangci-lint:*), Bash(git:*), Agent, Bash(govulncheck:*), AskUserQuestion

What it can do on your machine

Read from SKILL.md and the folder at commit 8e899e2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Edit
    • Write
    • Glob
    • Grep
    • Bash(go:*)
    • Bash(golangci-lint:*)
    • Bash(git:*)
    • Agent
    • Bash(govulncheck:*)

    …and 1 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code, Codex or similar harness, and for projects using Golang.

    From compatibility in the SKILL.md frontmatter.

Context cost

Golang Dependency Management loads about 2.6k tokens when it runs, and up to ~5.9k if it reads all its reference files. Until then it costs about 210 tokens; SKILL.md has 833 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~210
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from samber/cc-skills-golang at commit 8e899e2, republished under its MIT licence (© samber). 833 words, ~2,631 tokens.

Download SKILL.mdSave it as .claude/skills/golang-dependency-management/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
golang-dependency-management
description
Dependency management for Golang projects — go.mod and go.sum, `go get` install and upgrade flows, Minimal Version Selection, conflict resolution with replace/exclude/retract, `govulncheck` scanning of the module tree, outdated dependency and binary size auditing, vendoring, `tool` directives, and go.work workspaces. Use when adding, removing, or upgrading Go dependencies, deciding whether to take on a package, resolving version conflicts, or auditing what a module pulls in. Covers choosing and upgrading dependency versions, not the surrounding tooling: do NOT use for fixing an exploitable vulnerability in code (→ See `samber/cc-skills-golang@golang-security` skill) or for wiring Dependabot/Renovate update bots into CI workflows (→ See `samber/cc-skills-golang@golang-continuous-integration` skill).
allowed-tools
Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(golangci-lint:*), Bash(git:*), Agent, Bash(govulncheck:*), AskUserQuestion
compatibility
Designed for Claude Code, Codex or similar harness, and for projects using Golang.
user-invocable
true
license
MIT
metadata.author
samber
metadata.version
1.3.1

Persona: You are a Go dependency steward. You treat every new dependency as a long-term maintenance commitment — you ask whether the standard library already solves the problem before reaching for an external package.

Dependencies:

  • govulncheck: go install golang.org/x/vuln/cmd/govulncheck@latest

Go Dependency Management

AI Agent Rule: Ask Before Adding Dependencies

Before running go get to add any new dependency, AI agents MUST ask the user for confirmation. AI agents can suggest packages that are unmaintained, low-quality, or unnecessary when the standard library already provides equivalent functionality. Using go get -u to upgrade an existing dependency is safe.

Before proposing a dependency, evaluate:

  • Does the standard library already cover the use case?
  • Is the license compatible?
  • Are there well-known alternatives?
  • What it does and why it's needed?

The samber/cc-skills-golang@golang-popular-libraries skill contains a curated list of vetted, production-ready libraries. Prefer recommending packages from that list. When no vetted option exists, favor well-known packages from the Go team (golang.org/x/...) or established organizations over obscure alternatives.

Key Rules

  • go.sum MUST be committed — it records cryptographic checksums of every dependency version, letting go mod verify detect supply-chain tampering. Without it, a compromised proxy could silently substitute malicious code
  • govulncheck ./... or go tool govulncheck ./... before every release — catches known CVEs in your dependency tree before they reach production
  • Maintenance status, license compatibility, and stdlib alternatives are important considerations before adding a dependency — every dependency increases attack surface, maintenance burden, and binary size
  • go mod tidy before every commit that changes dependencies — removes unused modules and adds missing ones, keeping go.mod honest

go.mod & go.sum

Essential Commands
CommandPurpose
go mod tidyAdd missing deps, remove unused ones
go mod downloadDownload modules to local cache
go mod verifyVerify cached modules match go.sum checksums
go mod vendorCopy deps into vendor/ directory
go mod editEdit go.mod programmatically (scripts, CI)
go mod graphPrint the module requirement graph
go mod whyExplain why a module or package is needed
Vendoring

Use go mod vendor when you need hermetic builds (no network access), reproducibility guarantees beyond checksums, or when deploying to environments without module proxy access. CI pipelines and Docker builds sometimes benefit from vendoring. Run go mod vendor after any dependency change and commit the vendor/ directory.

Installing & Upgrading Dependencies

Adding a Dependency
bash
go get github.com/google/uuid          # Latest version
go get github.com/google/uuid@v1.6.0   # Specific version
go get github.com/google/uuid@latest   # Explicitly latest
go get github.com/google/uuid@<commit> # Specific commit (pseudo-version)

Before pinning a version, inspect the module's available versions, importers, and known vulnerabilities on pkg.go.dev → See samber/cc-skills-golang@golang-pkg-go-dev skill.

Upgrading
bash
go get -u ./...            # Upgrade ALL direct+indirect deps to latest minor/patch
go get -u=patch ./...      # Upgrade to latest patch only (safer)
go get github.com/pkg@v1.5 # Upgrade specific package

Prefer go get -u=patch for routine updates. Patch and minor updates are usually lower risk than major upgrades, but still require review. For dependency updates, run:

bash
go get -u=patch ./...
go mod tidy
go test ./...
go vet ./...
govulncheck ./...   # or: go tool govulncheck ./...

Release notes and changelogs for libraries affecting persistence, serialization, networking, authentication, authorization, cryptography, or public APIs may contain important information about breaking changes.

Removing a Dependency
bash
go get github.com/google/uuid@none  # Mark for removal
go mod tidy                          # Clean up go.mod and go.sum
Show full SKILL.md (388 more words)Show less
Installing CLI Tools

For Go 1.24+ modules, pin executable tools in go.mod with tool directives. Do not create a new tools.go blank-import file unless the module must support Go <1.24.

bash
# Add tools to the current module.
go get -tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
go get -tool golang.org/x/vuln/cmd/govulncheck@latest
go get -tool golang.org/x/perf/cmd/benchstat@latest

# Run pinned tools reproducibly.
go tool golangci-lint run ./...
go tool govulncheck ./...
go tool benchstat old.txt new.txt

# Install all module-pinned tools into GOBIN/PATH when needed.
go install tool

# Update pinned tools deliberately, then review go.mod/go.sum.
go get -u tool
go mod tidy

go.mod shape for a module targeting Go 1.27 or newer. This is an example target, not a cap; keep the project's actual go directive and do not change it just to add tools.

go.mod
module example.com/project

go 1.27

tool (
    github.com/golangci/golangci-lint/v2/cmd/golangci-lint
    golang.org/x/vuln/cmd/govulncheck
    golang.org/x/perf/cmd/benchstat
)

For go 1.27 or newer, go mod tidy auto-merges duplicate require blocks and enforces a two-block layout (direct dependencies, then indirect), preserving existing comments — no manual cleanup needed after a merge that introduces a second require block.

For Go <1.24 only, use the legacy tools.go blank-import workaround:

go
//go:build tools

package tools

import (
    _ "github.com/golangci/golangci-lint/v2/cmd/golangci-lint"
    _ "golang.org/x/vuln/cmd/govulncheck"
)

Rule: Go 1.24+ = tool directives. Go <1.24 = tools.go fallback.

Module target note

When using a newer toolchain, go mod init may create a module with an older default go directive. If the project intentionally targets the newer toolchain's APIs, update the directive deliberately:

bash
go mod edit -go=1.27
go mod tidy

For future Go versions, use the project's intended target version. Do not use APIs newer than the module's go directive until the project explicitly agrees to upgrade it.

Deep Dives

  • Versioning & MVS — Semantic versioning rules (major.minor.patch), when to increment each number, pre-release versions, the Minimal Version Selection (MVS) algorithm (why you can't just pick "latest"), and major version suffix conventions (v0, v1, v2 suffixes for breaking changes).

  • Auditing Dependencies — Vulnerability scanning with govulncheck, tracking outdated dependencies, analyzing which dependencies make the binary large (goweight), and distinguishing test-only vs binary dependencies to keep go.mod clean.

  • Dependency Conflicts & Resolution — Diagnosing version conflicts (what go get does when you request incompatible versions), resolution strategies (replace directives for local development, exclude for broken versions, retract for published versions that should be skipped), and workflows for conflicts across your dependency tree.

  • Go Workspaces — go.work files for multi-module development (e.g., library + example application), when to use workspaces vs monorepos, and workspace best practices.

  • Automated Dependency Updates — Setting up Dependabot or Renovate for automatic dependency update PRs, auto-merge strategies (when to merge automatically vs require review), and handling security updates.

  • Visualizing the Dependency Graph — go mod graph to inspect the full dependency tree, modgraphviz to visualize it, and interactive tools to find which dependency chains cause bloat.

Cross-References

  • → See samber/cc-skills-golang@golang-continuous-integration skill for Dependabot/Renovate CI setup
  • → See samber/cc-skills-golang@golang-security skill for vulnerability scanning with govulncheck
  • → See samber/cc-skills-golang@golang-popular-libraries skill for vetted library recommendations

Quick Reference

bash
# Start a new module
go mod init github.com/user/project

# Add a dependency
go get github.com/google/uuid@v1.6.0

# Upgrade all deps (patch only, safer)
go get -u=patch ./...

# Remove unused deps
go mod tidy

# Check for vulnerabilities
govulncheck ./...   # or: go tool govulncheck ./...

# Check for outdated deps
go list -u -m -json all | go-mod-outdated -update -direct

# Analyze binary size by dependency
goweight

# Understand why a dep exists
go mod why -m github.com/some/module

# Visualize dependency graph
go mod graph | modgraphviz | dot -Tpng -o deps.png

# Verify checksums
go mod verify

© samber, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in skills/golang-dependency-management of samber/cc-skills-golang.

  • SKILL.md
  • evals/evals.json
  • references/auditing.md
  • references/automated-updates.md
  • references/conflicts.md
  • references/versioning.md
  • references/visualization.md
  • references/workspaces.md

Open the folder on GitHubat commit 8e899e2

Compare with similar skills

Golang Dependency Management next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Golang Dependency Management compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Golang Dependency Management this skillsamber/cc-skills-golang3.4k—~2.6kAutomated safety check: PassMIT
CLIProxy Core Synccaidaoli/ccLoad419—~1.5kAutomated safety check: PassMIT
Golang Continuous Integrationcontext-labs/whip1.1k—~3.5kAutomated safety check: PassMIT
Databricks CLI SDK Bumpdatabricks/cli404—~2kAutomated safety check: NotesCustom licence
Dependency Updategocronx-team/gocron801—~891Automated safety check: PassMIT
Dep Auditorlaolaoshiren/claude-code-skills-zh880—~895Automated safety check: PassMIT

Similar skills

  • CLIProxy Core Sync

    caidaoli/ccLoad

    Syncs or audits ccLoad's CLIProxyAPI protocol-conversion core and registered provider adapters against one pinned upstream commit, then verifies the result.

    419 GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • CI/CD with GitHub Actions for Golang — testing, linting, SAST, security scanning, coverage, Dependabot, Renovate, GoReleaser, release pipelines.

    1.1k GitHub stars~3.5k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Official

    Bumps the databricks-sdk-go dependency in the Databricks CLI together with its pinned OpenAPI spec SHA, then regenerates the files that depend on them.

    404 GitHub stars~2k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Dependency Update

    gocronx-team/gocron

    Review, apply, verify, or merge gocron dependency updates from Dependabot or manual requests.

    801 GitHub stars~891 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Dep Auditor

    laolaoshiren/claude-code-skills-zh

    审计 Node.js、Python、Go、Rust、JVM、Ruby 项目的依赖漏洞、版本健康度与许可证事实;当用户要求检查 package.json、lockfile、requirements、go.mod、Cargo.toml、pom.xml、Gemfile.lock,或生成不改依赖的中文审计报告时使用

    880 GitHub stars~895 tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Unblock Dependabot PR

    kubernetes-sigs/cloud-provider-azure

    Official

    Diagnose and unblock failed Dependabot pull requests in cloud-provider-azure by closing Kubernetes minor-version dependency bumps, classifying CI failures, syncing Go modules, retesting quota-flaked…

    294 GitHub stars~1.5k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from samber/cc-skills-golang

  • Golang Continuous Integration

    samber/cc-skills-golang

    GitHub Actions CI/CD pipeline configuration for Golang projects — workflow files for test, lint, SAST, coverage and vulnerability-scan jobs, Dependabot and Renovate config files, GoReleaser release…

    3.4k GitHub stars~3.7k tokensUpdated 9 days ago
    Auto-check passed
  • Golang Dependency Injection

    samber/cc-skills-golang

    Comprehensive guide for dependency injection (DI) in Golang.

    3.4k GitHub stars~3.2k tokensUpdated 9 days ago
    Auto-check passed
  • Golang Troubleshooting

    samber/cc-skills-golang

    Troubleshoot Golang programs systematically - find and fix the root cause.

    3.4k GitHub stars~3.3k tokensUpdated 9 days ago
    Auto-check passed
  • Golang Samber Hot

    samber/cc-skills-golang

    In-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, sharding, stale-while-revalidate, missing…

    3.4k GitHub stars~2k tokensUpdated 9 days ago
    Auto-check passed
  • Golang Samber Mo

    samber/cc-skills-golang

    Monadic types for Golang using samber/mo — Option, Result, Either, Future, IO, Task, and State types for type-safe nullable values, error handling, and functional composition with pipeline…

    3.4k GitHub stars~2.9k tokensUpdated 9 days ago
    Auto-check passed

Works with

Categories

Questions about Golang Dependency Management

What does Golang Dependency Management do?

Dependency management for Golang projects — go.mod and go.sum, go get install and upgrade flows, Minimal Version Selection, conflict resolution with replace/exclude/retract, govulncheck scanning of…. Golang Dependency Management is an agent skill from samber/cc-skills-golang.work workspaces.

When should I use Golang Dependency Management?

Golang Dependency Management fits situations like: upgrading Go dependencies; deciding whether to take on a package; resolving version conflicts; auditing what a module pulls in.

How do I install Golang Dependency Management in Claude Code?

Run `npx skills add samber/cc-skills-golang --skill golang-dependency-management -a claude-code`. Or copy the skill folder (skills/golang-dependency-management in samber/cc-skills-golang) into .claude/skills/golang-dependency-management in your project. Claude Code loads it when a task matches its description.

How do I install Golang Dependency Management in Codex?

Run `npx skills add samber/cc-skills-golang --skill golang-dependency-management -a codex`. Or copy the skill folder (skills/golang-dependency-management in samber/cc-skills-golang) into .agents/skills/golang-dependency-management in your project. Codex loads it when a task matches its description.

Can I use Golang Dependency Management in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add samber/cc-skills-golang --skill golang-dependency-management -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/golang-dependency-management, .gemini/skills/golang-dependency-management, .github/skills/golang-dependency-management and .opencode/skills/golang-dependency-management in your project.

What does Golang Dependency Management need to run?

Going by SKILL.md and its folder, Golang Dependency Management needs the command-line tools its instructions call (go). Our summary lists: Docker. Its frontmatter pre-approves these tools: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(golangci-lint:*), Bash(git:*), Agent, Bash(govulncheck:*), AskUserQuestion. Compatibility (from SKILL.md): Designed for Claude Code, Codex or similar harness, and for projects using Golang..

Does Golang Dependency Management access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Golang Dependency Management safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Golang Dependency Management use?

Golang Dependency Management is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Golang Dependency Management use?

About 2.6k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.2k tokens, read only when the agent opens those files.

What are the alternatives to Golang Dependency Management?

Skills that share tags, products or a category with Golang Dependency Management: CLIProxy Core Sync (caidaoli/ccLoad, 419 stars), Golang Continuous Integration (context-labs/whip, 1.1k stars), Databricks CLI SDK Bump (databricks/cli, 404 stars) and Dependency Update (gocronx-team/gocron, 801 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Golang Dependency Management?

samber (a GitHub user) maintains it in samber/cc-skills-golang, which has 3,432 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 1, 2026.

Source: samber/cc-skills-golang on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.