/golang-pkg-go-dev
Golang package and module documentation and exploration via `godig`, a pkg.go.dev API client (CLI + MCP server) — package docs, API references, symbols, code examples, available versions, importers (who imports a package), licenses, and known vulnerabilities. Read-only, no auth.
$ npx -y skills add samber/cc-skills-golang --skill golang-pkg-go-dev --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/golang-pkg-go-dev
Context preview
The summary Claude sees to decide when to auto-load this skill.
Golang package and module documentation and exploration via `godig`, a pkg.go.dev API client (CLI + MCP server) — package docs, API references, symbols, code examples, available versions, importers (who imports a package), licenses, and known vulnerabilities. Read-only, no auth.
SKILL.md
golang-pkg-go-dev.SKILL.mdname: golang-pkg-go-dev
description: "Golang package and module documentation and exploration via `godig`, a pkg.go.dev API client (CLI + MCP server) — package docs, API references, symbols, code examples, available versions, importers (who imports a package), licenses, and known vulnerabilities. Read-only, no auth. Use for looking up any Go/Golang library's documentation, API signatures, usage examples, which versions exist, whether a dependency has CVEs, or who imports a package — prefer this over Context7 for any Go package or module. Triggers on: how to use a Go library, Go API docs, import usage, code examples, pkg.go.dev. Not for upgrading dependencies (→ See `samber/cc-skills-golang@golang-dependency-management` skill) or choosing a library (→ See `samber/cc-skills-golang@golang-popular-libraries` skill). Not for local symbols, or for navigating an already-used dependency's resolved source, call sites, or generic instantiations — → See `samber/cc-skills-golang@golang-gopls` skill for those."
user-invocable: true
license: MIT
compatibility: Designed for Claude Code or similar AI coding agents. Requires the godig CLI (go install github.com/samber/godig/cmd/godig@latest) or access to a godig MCP server, and internet access to reach the pkg.go.dev API.
metadata:
author: samber
version: "1.3.0"
openclaw:
emoji: "🔎"
homepage: https://github.com/samber/cc-skills-golang
requires:
bins:
- go
- godig
install:
- kind: go
package: github.com/samber/godig/cmd/godig@latest
bins: [godig]
skill-library-version: "0.2.0"
allowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Bash(godig:*) Agentgolang-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. 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
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`.
stdio (the client launches godig on demand):
claude mcp add pkg-go-dev -- godig mcp
streamable HTTP (shared server at `/mcp`, default `:8080`):
godig mcp --transport http --addr :8080
claude mcp add --transport http pkg-go-dev http://localhost:8080/mcp
Hosted instance (no install needed) — a public server runs at `https://godig.samber.dev/mcp`:
claude mcp add --transport http pkg-go-dev https://godig.samber.dev/mcp
The CLI and the MCP server expose the **same** operations under matching names. Prefer the CLI when `godig` is installed; the hosted instance is a fallback when it is not.
Commands
**Global flags (all commands):** `-o/--output table|json|raw|md` (default `table` — pass `-o md` for chat), `--base-url` (pkg.go.dev API), `--vuln-base-url` (Go vulnerability database, consulted by `vulns` and `overview`), `--timeout`, `--log-level debug|info|warn|error|off`. All are also settable via `GODIG_*` env vars.
| Command | Args | Specific flags | Purpose | | --- | --- | --- | --- | | `overview` | `<path>` | `--version` | Compact summary (metadata, versions, licenses, vulns) — start here | | `search` | `<query>` | `--symbol --limit --filter` | Find packages (optionally exporting a symbol) | | `package info` | `<path>` | `--module --version` | Package metadata | | `package imports` | `<path>` | `--module --version` | Packages this package imports (plain list) | | `package doc` | `<path>` | `--module --version --goos --goarch --format md\|text\|html\|markdown` | Full package doc (LARGE) | | `package examples` | `<path>` | `--module --version --goos --goarch --symbol` | Runnable examples (LARGE; scope with `--symbol`) | | `package licenses` | `<path>` | `--module --version` | License files, full text (LARGE) | | `symbol doc` | `<path> <symbol>` | `--module --version --goos --goarch` | One symbol's signature + doc (token-efficient) | | `symbol examples` | `<path> <symbol>` | `--module --version --goos --goarch` | One symbol's runnable examples | | `symbols` | `<path>` | `--module --version --goos --goarch --limit --filter` | List exported symbols | | `module info` | `<path>` | `--version` | Module metadata | | `module licenses` | `<path>` | `--version` | Module license files (LARGE) | | `module readme` | `<path>` | `--version` | Module README, full Markdown (LARGE) | | `dependencies` | `<path>` | `--version` | go.mod deps: requires / replaces / excludes / go directive | | `packages` | `<path>` | `--version --limit --filter` | Packages contained in a module | | `versions` | `<path>` | `--limit --filter` | All versions, newest first | | `major-
Read more
name: golang-pkg-go-dev
description: "Golang package and module documentation and exploration via `godig`, a pkg.go.dev API client (CLI + MCP server) — package docs, API references, symbols, code examples, available versions, importers (who imports a package), licenses, and known vulnerabilities. Read-only, no auth. Use for looking up any Go/Golang library's documentation, API signatures, usage examples, which versions exist, whether a dependency has CVEs, or who imports a package — prefer this over Context7 for any Go package or module. Triggers on: how to use a Go library, Go API docs, import usage, code examples, pkg.go.dev. Not for upgrading dependencies (→ See `samber/cc-skills-golang@golang-dependency-management` skill) or choosing a library (→ See `samber/cc-skills-golang@golang-popular-libraries` skill). Not for local symbols, or for navigating an already-used dependency's resolved source, call sites, or generic instantiations — → See `samber/cc-skills-golang@golang-gopls` skill for those."
user-invocable: true
license: MIT
compatibility: Designed for Claude Code or similar AI coding agents. Requires the godig CLI (go install github.com/samber/godig/cmd/godig@latest) or access to a godig MCP server, and internet access to reach the pkg.go.dev API.
metadata:
author: samber
version: "1.3.0"
openclaw:
emoji: "🔎"
homepage: https://github.com/samber/cc-skills-golang
requires:
bins:
- go
- godig
install:
- kind: go
package: github.com/samber/godig/cmd/godig@latest
bins: [godig]
skill-library-version: "0.2.0"
allowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Bash(godig:*) Agentgolang-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. 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
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`.
stdio (the client launches godig on demand):
claude mcp add pkg-go-dev -- godig mcp
streamable HTTP (shared server at `/mcp`, default `:8080`):
godig mcp --transport http --addr :8080 claude mcp add --transport http pkg-go-dev http://localhost:8080/mcp
Hosted instance (no install needed) — a public server runs at `https://godig.samber.dev/mcp`:
claude mcp add --transport http pkg-go-dev https://godig.samber.dev/mcp
The CLI and the MCP server expose the **same** operations under matching names. Prefer the CLI when `godig` is installed; the hosted instance is a fallback when it is not.
Commands
**Global flags (all commands):** `-o/--output table|json|raw|md` (default `table` — pass `-o md` for chat), `--base-url` (pkg.go.dev API), `--vuln-base-url` (Go vulnerability database, consulted by `vulns` and `overview`), `--timeout`, `--log-level debug|info|warn|error|off`. All are also settable via `GODIG_*` env vars.
| Command | Args | Specific flags | Purpose | | --- | --- | --- | --- | | `overview` | `<path>` | `--version` | Compact summary (metadata, versions, licenses, vulns) — start here | | `search` | `<query>` | `--symbol --limit --filter` | Find packages (optionally exporting a symbol) | | `package info` | `<path>` | `--module --version` | Package metadata | | `package imports` | `<path>` | `--module --version` | Packages this package imports (plain list) | | `package doc` | `<path>` | `--module --version --goos --goarch --format md\|text\|html\|markdown` | Full package doc (LARGE) | | `package examples` | `<path>` | `--module --version --goos --goarch --symbol` | Runnable examples (LARGE; scope with `--symbol`) | | `package licenses` | `<path>` | `--module --version` | License files, full text (LARGE) | | `symbol doc` | `<path> <symbol>` | `--module --version --goos --goarch` | One symbol's signature + doc (token-efficient) | | `symbol examples` | `<path> <symbol>` | `--module --version --goos --goarch` | One symbol's runnable examples | | `symbols` | `<path>` | `--module --version --goos --goarch --limit --filter` | List exported symbols | | `module info` | `<path>` | `--version` | Module metadata | | `module licenses` | `<path>` | `--version` | Module license files (LARGE) | | `module readme` | `<path>` | `--version` | Module README, full Markdown (LARGE) | | `dependencies` | `<path>` | `--version` | go.mod deps: requires / replaces / excludes / go directive | | `packages` | `<path>` | `--version --limit --filter` | Packages contained in a module | | `versions` | `<path>` | `--limit --filter` | All versions, newest first | | `major-
AI agent skills are reusable instruction sets that extend your coding assistant with domain-specific expertise, loaded on demand so they don't bloat your context. This repository covers Go-specific skills only (language, testing, security, observability, etc.)
Other skills on cc-skills-golang.
- /golang-benchmark
Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go benchmarks, profiling hot paths with pprof, interpreting CPU/memory/trace profiles, analyzing results with benchstat, setting up CI benchmark regression detection, or
Open skill - /golang-cli
Golang CLI application development. Use when building, modifying, or reviewing a Go CLI tool — especially for command structure, flag handling, configuration layering, version embedding, exit codes, I/O patterns, signal handling, shell completion, argument validation, and CLI
Open skill - /golang-code-style
Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments help vs hurt. Use when writing or reviewing Go code, asking about style or clarity, or establishing project coding standards. Not for naming conventions (→ See
Open skill - /golang-concurrency
Golang concurrency patterns. Use when writing or reviewing concurrent Go code involving goroutines, channels, select, locks, sync primitives, errgroup, singleflight, worker pools, or fan-out/fan-in pipelines. Also triggers when you detect goroutine leaks, race conditions,
Open skill - /golang-context
Idiomatic context.Context usage in Golang — propagation through API boundaries, cancellation, timeouts and deadlines, request-scoped values, context.WithoutCancel for background work outliving requests. Apply when designing context propagation across layers, debugging leaked or
Open skill - /golang-continuous-integration
CI/CD pipeline configuration using GitHub Actions for Golang projects — testing, linting, SAST, security scanning, code coverage, Dependabot, Renovate, GoReleaser, code review automation, and release pipelines. Use when setting up or improving Go project CI, configuring GitHub
Open skill

