golang-packages

Queries pkg.go.dev metadata for Go packages and modules via pkgsite-cli and the v1beta REST API.

1|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/lrstanley/skills --skill golang-packages-lrstanley
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: golang-packages
Source: https://github.com/lrstanley/skills/tree/main/golang-packages
Command: npx skills add https://github.com/lrstanley/skills --skill golang-packages-lrstanley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Finding and evaluating Go packages usually means manually browsing pkg.go.dev or cloning repositories just to check versions, licenses, vulnerabilities, or who depends on a package. This Skill provides structured, scriptable access to all of that metadata through pkgsite-cli and the pkg.go.dev v1beta REST API. ## Core Features & Use Cases - Package Discovery: Search pkg.go.dev by keyword or exported symbol name to find candidate libraries before adding a dependency. - Module & Package Inspection: List published versions, exported symbols, imports, reverse dependencies (imported-by), README contents, licenses, and known vulnerabilities for any module or package. - Scriptable JSON Output: Use -json with jq for CI pipelines, dependency audits, and automated tooling, or call the REST API directly for application integrations. - Use Case: Before adopting a logging library, search for candidates, compare their latest versions and vulnerability reports, check which projects already depend on them, and review their exported API surface — all from the terminal. ## Quick Start Ask the agent to search pkg.go.dev for a package matching your need, for example: find Go packages for structured logging and show the top results with their latest versions.

Frequently Asked Questions about golang-packages

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

FAQPage Schema
How do I search for Go packages on pkg.go.dev from the command line?▼

Run pkgsite-cli search followed by your query, such as pkgsite-cli search -limit 5 "structured logging". Add -json for machine-readable output, or -symbol to find packages exporting a specific symbol name.

How do I check vulnerabilities for a Go module version?▼

Run pkgsite-cli module -vulns followed by the module path, optionally with @version to scope the lookup to a specific release, for example pkgsite-cli module -vulns github.com/gin-gonic/gin@v1.9.1. Results include vulnerability IDs and fixed versions.

What is the difference between pkgsite-cli, go doc, and the pkg.go.dev API?▼

go doc reads documentation for local or versioned packages, pkgsite-cli queries remote pkg.go.dev metadata like versions, vulnerabilities, and imported-by, and the REST API exposes the same data for application integrations. Use go doc for local code and pkgsite-cli for remote discovery.

How do I find which packages import a Go package?▼

Use pkgsite-cli package -imported-by followed by the package path to list reverse dependencies. The result is paginated, so increase -limit to see more importers, or call the /v1beta/imported-by endpoint directly for full pagination control.

Why does pkgsite-cli report an ambiguous package path error?▼

The error occurs when a package path exists in multiple modules and the API cannot resolve it automatically. Retry with the -module flag set to one of the candidate module paths listed in the error response.

When should I not use pkgsite-cli for Go documentation?▼

Avoid pkgsite-cli when reading docs for local or private packages, since it only queries the public pkg.go.dev index. Use go doc for local code or the cmd/pkgsite web server to serve documentation for private modules.