go-doc_skill

This skill retrieves Go package documentation using go doc, showing signatures, sources, and usage guidance for your chosen module.

203

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill caarlos0/dotfiles --skill go-doc

  • SKILL.md619 B

Overview

This skill fetches and presents Go package documentation by driving the go doc tool. It resolves the package version from go.mod (or uses @latest), optionally fetches the module, and returns API reference, function signatures, and source snippets. Use it to get authoritative docs for any Go package or symbol quickly.

How this skill works

The skill inspects go.mod in the current project to determine the package version; if none is found it defaults to @latest. It runs go get package@version when the package is missing, then invokes go doc package or go doc package.Symbol. It supports flags to include source, unexported symbols, or the entire package listing.

When to use it

  • You need the API reference or function signatures for a Go package or type.
  • You want to view docs for a specific symbol (function, method, type, const, var).
  • You need to confirm behavior or parameters before calling a library.
  • You want to inspect the source for a symbol while reading its documentation.
  • You need docs for a specific module version referenced in go.mod.

Best practices

  • Prefer targeting the exact version from go.mod to match your build environment.
  • Use the -src flag to include implementation details when behavior is unclear.
  • Use the -all flag for a full package overview, then narrow to symbols for focused results.
  • Run go get only when necessary to avoid modifying module cache unnecessarily.
  • Provide the full import path and optional symbol name to get precise output.

Example use cases

  • Show the signature and documentation for net/http.Client.Do.
  • Get the full listing of symbols in github.com/foo/bar using -all.
  • Inspect the source and docs for a type with -src to understand concurrency guarantees.
  • Resolve ambiguous names by requesting package.Type or package.Function explicitly.
  • Fetch docs for a dependency version specified in go.mod to verify breaking changes.

FAQ

The skill will run go get package@version to fetch the module before running go doc, unless you request only local inspection.

How do I view unexported symbols or source?

Use the -u flag to include unexported symbols and -src to include source code in the go doc output.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
go-doc skill by caarlos0/dotfiles | VeilStrat