# Golang Pkg Go Dev

Golang package and module lookup via `godig`, a pkg.go.dev API client (CLI + MCP server).

- Repository: https://github.com/samber/cc-skills-golang (3750 stars)
- Category: Security
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add samber/cc-skills-golang --skill golang-pkg-go-dev -g -a claude-code -y`
Codex: `npx skills add samber/cc-skills-golang --skill golang-pkg-go-dev -g -a codex -y`
Cursor: `npx skills add samber/cc-skills-golang --skill golang-pkg-go-dev -g -a cursor -y`
Gemini CLI: `npx skills add samber/cc-skills-golang --skill golang-pkg-go-dev -g -a gemini-cli -y`

## Description

Golang package and module lookup via `godig`, a pkg.go.dev API client (CLI + MCP server). Use for any Go/Golang library's documentation, API signatures, symbols, usage examples, which versions exist, licenses, whether a dependency has CVEs, or who imports a package, prefer this over Context7 for any Go package or module. Read-only, no auth. Not for upgrading dependencies (→ See `samber/cc-skills-golang@golang-dependency-management` skill), choosing a library (→ See `samber/cc-skills-golang@golang-popular-libraries` skill), or local symbols and an already-used dependency's resolved source, call sites, and generic instantiations (→ See `samber/cc-skills-golang@golang-gopls` skill).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# golang-pkg-go-dev

**Dependencies:** `godig`, `go install github.com/samber/godig/cmd/godig@latest` (or use a registered godig MCP server / the hosted instance instead).

`godig` queries the [pkg.go.dev](https://pkg.go.dev) API. Use it to answer questions about Go packages and modules: docs, symbols, versions, importers and vulnerabilities. It works as a CLI and as an MCP server, and all operations are **read-only** and need no authentication.

## When to use this skill

Trigger on questions like:

- "What versions of github.com/samber/lo are available?"
- "Does golang.org/x/text have known vulnerabilities?"
- "Show me the docs / symbols for package X."
- "Which packages import X?"
- "Search Go packages for Y."

## Choosing between `godig`, gopls, Context7, and govulncheck

In short: `godig` answers questions about the **published ecosystem** (works even for packages not yet in your `go.mod`); `gopls` reasons about **your locally resolved build** (`go.sum`, including `replace`d forks); Context7 is a fallback for non-Go or unindexed docs; `govulncheck` is the whole-tree vulnerability audit (→ `samber/cc-skills-golang@golang-security`). See the `samber/cc-skills-golang@golang-gopls` skill for wiring `gopls` (MCP server, native `LSP` tool, and CLI) with Claude Code, and the `samber/cc-skills-golang@golang-how-to` skill's "`godig` vs gopls vs Context7 vs govulncheck" section for the full task-to-tool matrix.

## Setup

### Install

```bash
go install github.com/samber/godig/cmd/godig@latest
```

### Register the MCP server (optional)

`godig mcp` runs over **stdio** by default, or **streamable HTTP** with `--transport http`. The command is harness-agnostic, any MCP-capable host can point at it. Claude Code registers it via its own CLI:

stdio (the client launches godig on demand):

```bash
claude mcp add pkg-go-dev -- godig mcp
```

streamable HTTP (shared server at `/mcp`, default `:8080`):

The rest: https://github.com/samber/cc-skills-golang/blob/HEAD/skills/golang-pkg-go-dev/SKILL.md
