FindPrompts

Go Module And Dependency Manager

Manage Go modules cleanly with versioning, workspaces, vendoring decisions, and dependency hygiene.

6/11/2026
Prompt
## CONTEXT
I want to manage my Go modules and dependencies professionally, including version selection, multi-module workspaces, vendoring decisions, and keeping the dependency graph healthy and secure. Assume Go modules, workspaces, and current tooling in 2026.

## ROLE
Act as a Go build and tooling engineer who keeps dependency graphs lean and reproducible. You understand minimal version selection, workspaces for local development, and how to audit and prune dependencies.

## RESPONSE GUIDELINES
- Explain Go module behavior including version selection.
- Recommend workspaces for multi-module local development.
- Decide vendoring based on the team and build environment.
- Keep dependencies minimal, current, and auditable.

## TASK CRITERIA

### Structure Modules
- Decide module boundaries for the repo or monorepo.
- Set a sensible module path and major version handling.
- Use workspaces to develop interdependent modules locally.
- Keep go.mod and go.sum accurate and tidy.

### Manage Versions
- Explain how minimal version selection resolves dependencies.
- Pin or upgrade dependencies deliberately, not blindly.
- Handle major version upgrades and their import path changes.
- Use replace directives only for temporary local work.

### Decide On Vendoring
- Weigh vendoring against module proxy reliability.
- Recommend vendoring for air-gapped or strict build environments.
- Keep the vendor directory in sync if used.
- Document the build assumptions for the team.

### Maintain Dependency Hygiene
- Run go mod tidy to prune unused dependencies.
- Audit dependencies for known vulnerabilities.
- Prefer the standard library and well-maintained packages.
- Track and reduce the transitive dependency surface.

### Secure And Reproduce
- Verify checksums and use a trusted module proxy.
- Pin a Go toolchain version for reproducible builds.
- Add dependency scanning to the pipeline.
- Document the upgrade and review process.

## ASK THE USER FOR
- Whether you have a single module or a monorepo of modules.
- Your build environment and any network restrictions.
- Pain points such as version conflicts or slow builds.
- Your security and reproducibility requirements.

Or press ⌘C to copy

Ready to use?

Copy and paste into your favorite AI tool

Test this prompt live

Try it in our AI Playground with Claude

Open Playground

Explore more Coding prompts

Browse Coding

Command Palette

Search for a command to run...