golang-packages
Skill1 starsChanged 14 days agoMITView on GitHub
Queries pkg.go.dev metadata for Go packages and modules via pkgsite-cli and the pkg.go.dev v1beta API. Use when discovering packages, inspecting module versions, symbols, imports, reverse dependencies, vulnerabilities, licenses, other projects that depend on a package, or pkg.go.dev documentation lookup.
- Installs packages
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- golang-tui-update-examplesSkill
- upstream-syncSkill
- apply-worktreeSkill
- babysit-prSkill
- documentation-writerSkill
- file-prSkill
- frontend-designSkill
- golangSkill
- golang-tuiSkill
- grill-meSkill
- karpathy-guidelinesSkill
- kubernetes-specialistSkill
- kubernetes-upgrade-analysisSkill
- leaving-gh-commentsSkill
- mermaid-diagramsSkill
- modernizeSkill
- nuclear-reviewSkill
- remotion-best-practicesSkill
- reviewSkill
- security-auditSkill
- shadcn-vueSkill
- sharpenSkill
- simplifySkill
- tui-designSkill
- unslopSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 70
Run pkgsite-cli <command> -h for command-specific flags.
- Distinctive: line 81
Place flags before positional arguments
- Very specific: line 82
Use -module when the API returns ambiguous path candidates
- Very specific: line 83
Use -json in scripts; check exit code for failures
- Very specific: line 84
Prefer pkgsite-cli or the REST API over scraping pkg.go.dev HTML
- Distinctive: line 90
Put flags after positional arguments
- Very specific: line 91
Use pkgsite-cli instead of go doc on local code
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Go Package Discovery (pkgsite-cli)
Specialist for querying pkg.go.dev metadata through
pkgsite-cli,
the reference CLI for the pkg.go.dev v1beta API. For
programmatic integrations, use the REST API directly; see references/api.md.
Introduced in the pkg.go.dev API blog post.
When to Use
- Discovering or comparing third-party Go packages not present locally
- Inspecting module versions, vulnerabilities, licenses, or README content
- Listing exported symbols, imports, or reverse dependencies for a package
- Scripting pkg.go.dev lookups with
-jsonoutput
When Not to Use
- Reading documentation for a known import path, including
package@version(usego doc) - Serving docs for local or private packages (use
cmd/pkgsiteweb server) - Resolving ambiguous import paths without specifying the module
Core Workflow
- Install --
go install golang.org/x/pkgsite/cmd/internal/pkgsite-cli@latest - Choose interface -- CLI for terminal/scripts; REST API for application code
- Pick command --
searchfor discovery;packageormodulefor inspection - Set flags -- Request only needed data; use
-jsonfor machine output - Handle ambiguity -- Pass
-modulewhen the API reports multiple candidates
Reference Guide
| Topic | Reference | Load When |
| Package inspection | references/package.md | Metadata, docs, symbols, imports, imported-by, licenses |
| Module inspection | references/module.md | Versions, packages, vulnerabilities, README |
| Search | references/search.md | Finding packages or symbols on pkg.go.dev |
| REST API | references/api.md | Direct HTTP access, OpenAPI spec, curl, pagination |
Commands
| Command | Purpose |
pkgsite-cli search <query> | Search for packages (or symbols with -symbol) |
pkgsite-cli package <path>[@version] | Inspect a package |
pkgsite-cli module <module>[@version] | Inspect a module |
pkgsite-cli help | Print usage for all commands |
pkgsite-cli version | Print CLI version and Go toolchain |
Shared flags on package, module, and search: -json, -limit (default 25),
-server (default https://pkg.go.dev), -timeout (default 30s), -x (print URLs).
Run pkgsite-cli <command> -h for command-specific flags.
Version Syntax
Append @version to paths for semver tags (v1.2.3) or master/main branches.
Omit @version for the latest tagged release.
Constraints
MUST DO
- Place flags before positional arguments
- Use
-modulewhen the API returns ambiguous path candidates - Use
-jsonin scripts; check exit code for failures - Prefer
pkgsite-clior the REST API over scraping pkg.go.dev HTML
MUST NOT DO
- Assume the CLI interface is stable (marked experimental upstream)
- Rely on the web UI's "longest module path" resolution
- Put flags after positional arguments
- Use
pkgsite-cliinstead ofgo docon local code
Quick Examples
pkgsite-cli search -limit 5 "structured logging"
pkgsite-cli package -symbols -imported-by github.com/google/go-cmp/cmp
pkgsite-cli module -versions -packages github.com/google/go-cmp
pkgsite-cli search -json -limit 10 uuid | jq '.items[].packagePath'Tool Comparison
| Tool | Scope |
go doc | Package/symbol docs, including package@version |
cmd/pkgsite | Local web server for downloaded packages |
pkgsite-cli | Remote metadata: search, versions, vulns, imported-by, licenses |
| REST API | Same data as CLI; best for application integrations |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

