Audits Go module dependencies: detects outdated packages, known vulnerabilities, go.mod hygiene issues, unused/redundant deps, and evaluates dependency quality. Use for dependency audits, CVE checks, go.mod cleanup, module upgrades, or third-party package evaluation.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Every dependency you add is code you don't control but are responsible for. Audit ruthlessly.
Detailed reference material, loaded on demand:
references/resolution-and-workspaces.md — minimal version selection,
replace/exclude/retract, go.work, tool dependencies.Read a reference file only when the summary below is not enough.
# Ad hoc, without touching go.mod
go run golang.org/x/vuln/cmd/govulncheck@latest ./...
# Pinned as a module tool (Go 1.24+) — recommend this to the project so
# every developer and CI job runs the same version
go get -tool golang.org/x/vuln/cmd/govulncheck
go tool govulncheck ./...
# Scan a built binary
go tool govulncheck -mode=binary ./bin/api-server
govulncheck checks against the Go vulnerability database and reports
only vulnerabilities that actually affect your code paths — not just
transitive deps you never call.
Run this in CI. No exceptions.
# Nancy (Sonatype OSS Index)
go list -json -deps ./... | nancy sleuth
# Trivy (container + deps)
trivy fs --scanners vuln .
go mod tidy
git diff go.mod go.sum # any changes = deps were stale
go mod tidy MUST be run before every commit. Add to CI:
go mod tidy
git diff --exit-code go.mod go.sum
A committed replace => ../local-path breaks every other checkout; local
multi-module work belongs in go.work. The one exception — a temporary
fork with a linked issue — is in section 8.
go mod verify
This confirms that downloaded modules match their expected checksums. Failures indicate supply-chain tampering.
Before adding any dependency, evaluate:
| Criterion | Check |
|---|---|
| Maintenance | Last commit < 6 months? Active issue responses? |
| Popularity | Stars/forks alone mean nothing. Usage in production projects matters. |
| License | Compatible with your project? MIT/Apache/BSD preferred. |
| Size | Does it pull in 50 transitive deps for one function? |
| Alternatives | Can you do this with stdlib in < 50 lines? |
| API stability | Is it v1+? Does it follow semver? Frequent breaking changes? |
| Test coverage | Does the project have meaningful tests? |
Go's standard library is excellent. Before adding a dependency, ask:
"Can I solve this with net/http, encoding/json, database/sql,
text/template, crypto/*, os/exec, etc.?"
If the answer is yes and the code is < 100 lines, write it yourself.
go list -m all
go list -m -u all # shows available updates
# Update one module to its latest minor/patch
go get github.com/foo/bar@latest
# Patch releases only, for every dependency of the packages
go get -u=patch ./...
# Latest minor/patch of every dependency (add -t to include test deps)
go get -u ./...
go get -u never crosses a major version: github.com/foo/bar/v2 is a
different module path. A major upgrade means changing the import paths
and reading the changelog — it is a migration, not an update.
ALWAYS run full test suite after updates:
go get github.com/foo/[email protected]
go mod tidy
go test -race ./...
# Why is this module in my dependency tree?
go mod why github.com/some/transitive-dep
# Full dependency graph
go mod graph
# Visual dependency graph (with modgraphviz)
go mod graph | modgraphviz | dot -Tpng -o deps.png
Watch for:
v1 and v2) linked side by side// go.mod
module github.com/myorg/myproject
go 1.22 // minimum Go version required
Rules:
go directive to the minimum version that supports features you use.toolchain directive (Go 1.21+) pins the exact toolchain version.Ask before adding one: a new module is code the team must audit, update and trust indefinitely, and the agent should not make that decision silently. When proposing one:
slog, slices/maps, errors.Join, ServeMux routing,
os.Root and uuid each removed a common reason to add a dependency.go mod graph after a trial go get), API stability.main, ORMs that hide the SQL, and code
generators nobody on the team understands.replace (temporary fork, with an issue link) and
exclude (a known-broken version). Both apply only in the main module.retract versions you published by mistake; it is the
only signal that reaches consumers.go.work, not committed
replace => ../path directives.go.mod tool dependencies (go get -tool, Go
1.24+), not a tools.go file.Examples: references/resolution-and-workspaces.md.
## Dependency Audit Report
**Module:** github.com/myorg/myproject
**Go version:** 1.22
**Direct deps:** N | **Indirect deps:** M
### 🔴 Vulnerabilities
- CVE-XXXX-YYYY in github.com/foo/[email protected] — upgrade to v1.2.5
### 🟡 Outdated Dependencies
- github.com/foo/bar v1.2.3 → v1.5.0 available (minor)
### 🟢 Observations
- go.mod is clean, no replace directives
- All deps actively maintained
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/go-agent-skills:go-dependency-auditfrom go-agent-skills
Claude never picks this skill on its own
Claude Code cannot parse its frontmatter, so it ignores every field there: the description on this page is for you to read, but Claude never sees it. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /go-agent-skills:go-dependency-audit still runs it.
npx claudepluginhub eduardo-sl/go-agent-skills --plugin go-agent-skills35 skills in this plugin
/git-commitStructured git commit messages following Conventional Commits format for Go projects. Generates well-scoped, atomic commits with clear descriptions. Use when committing changes, writing commit messages, preparing PRs, or reviewing commit history quality. Trigger examples: "commit these changes", "create commit", "commit message", "prepare PR", "squash commits". Not for: code review (go-code-review), changelog generation.
/go-api-designHTTP/REST API design for Go services: handlers, ServeMux routing, middleware, request validation, pagination, idempotency, health checks, error responses, and graceful shutdown. Use when designing APIs, writing HTTP handlers, implementing middleware, or structuring REST endpoints. Trigger examples: "design API", "REST endpoints", "HTTP handler", "middleware pattern", "graceful shutdown", "API versioning". Not for: gRPC services (go-grpc), spec-first OpenAPI work (go-openapi), general architecture (go-architecture-review), concurrency in handlers (go-concurrency-review).
/go-architecture-reviewReview Go project architecture: package structure, dependency direction, layering, separation of concerns, domain modeling, and module boundaries. Use when reviewing architecture, designing package layout, evaluating dependency graphs, or refactoring monoliths into modules. Trigger examples: "review architecture", "package structure", "project layout", "dependency direction", "clean architecture Go", "module boundaries". Not for: code-level style (go-coding-standards), endpoint design (go-api-design).
Other plugins' skills for the same job