golang-dependency-management

Audit Go module integrity and resolve version conflicts with govulncheck.

2|Updated Feb 12, 2024
One-click install
npx skills add https://github.com/adibfirman/dotfiles --skill golang-dependency-management-adibfirman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-dependency-management
Source: https://github.com/adibfirman/dotfiles/tree/main/claude/.claude/skills/technical/golang/golang-dependency-management
Command: npx skills add https://github.com/adibfirman/dotfiles --skill golang-dependency-management-adibfirman

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires go, govulncheck, and includes references (resource) components.

What problem does it solve?

This Skill helps you manage Go dependencies reliably by preventing risky changes, keeping go.mod and go.sum accurate, and ensuring vulnerabilities are actually addressed before releases.

Core Features & Use Cases

  • Guided dependency lifecycle management: Add, upgrade, and remove Go modules with safe defaults (including patch-only upgrades) while maintaining clean module metadata.
  • Supply-chain integrity and vulnerability auditing: Commit go.sum and use govulncheck to verify vulnerabilities in the dependency graph and confirm call-path impact.
  • Conflict resolution and automation planning: Diagnose version conflicts, apply replace/exclude strategies correctly, and set up Dependabot/Renovate-style automated updates.

Use case example: You want to upgrade a service’s dependencies, then confirm that no known CVEs in transitive packages actually affect your code paths, and finally produce a clean go.mod/go.sum with tidy and verified builds.

Quick Start

Ask the AI to review your planned Go dependency change, recommend safe go.mod/go.sum steps (including govulncheck and go mod tidy), and provide an upgrade or conflict-resolution plan tailored to your module layout.

Frequently Asked Questions about golang-dependency-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scan Go dependencies for vulnerabilities using govulncheck before a release?

Scan Go dependencies for vulnerabilities by executing govulncheck to verify CVEs in your dependency graph and confirm actual call-path impact. This ensures vulnerabilities affecting your code paths are addressed before releases.

What is the best way to resolve version conflicts in go.mod?

Resolve version conflicts in go.mod by diagnosing dependency versions and applying replace or exclude directives correctly. This approach fixes conflicting module requirements while maintaining a clean dependency graph.

How do I safely upgrade Go modules without breaking my project?

Safely upgrade Go modules by applying patch-only upgrades with safe defaults, then running go mod tidy to clean module metadata. This maintains accurate go.mod and go.sum files while preventing risky changes.

How do I set up automated dependency updates for a Go project?

Set up automated dependency updates for a Go project by configuring Dependabot or Renovate to track outdated modules. This automation creates pull requests for routine upgrades while you maintain go.sum integrity.

Do I need to commit go.sum when managing Go dependencies?

Yes, you need to commit go.sum when managing Go dependencies to ensure supply-chain integrity. Committing go.sum provides reproducible builds and verifies that dependency hashes match expected module versions.

When should I use replace and retract directives in go.mod?

Use replace directives in go.mod to point modules to local paths or forked versions, and use retract to flag problematic versions. Correct handling of these directives prevents broken builds and guides safe dependency resolution.