golang-documentation

Audit and write Go documentation following godoc and llms.txt conventions.

2|Updated Mar 13, 2023
One-click install
npx skills add https://github.com/haipham22/golang-sample --skill golang-documentation-haipham22
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-documentation
Source: https://github.com/haipham22/golang-sample/tree/main/.agents/skills/golang-documentation
Command: npx skills add https://github.com/haipham22/golang-sample --skill golang-documentation-haipham22

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps Go teams produce documentation that is accurate, discoverable, and useful to both humans and AI assistants. It covers the full documentation surface of a Go repository, from package comments and exported symbol docs to README structure, changelogs, contributing guides, and AI-friendly summaries.

Core Features & Use Cases

  • Doc comment guidance: Write or review godoc comments for exported functions, methods, types, interfaces, constants, and variables.
  • Project documentation: Shape README files, CONTRIBUTING guides, CHANGELOG entries, and llms.txt files for Go libraries, applications, and hybrid repos.
  • Example-driven docs: Add and name Example test functions correctly, including method examples and output-verified snippets.
  • Architecture and API docs: Document complex Go files, ADRs, REST APIs, and gRPC/protobuf contracts with the right format and placement.
  • Use case: A team can hand this Skill an existing Go repository and get targeted guidance on what to document, where to place it, and how to keep the docs consistent with Go conventions.

Quick Start

Ask the skill to review your Go repository and rewrite the documentation so exported symbols, README sections, contributing instructions, changelog entries, and llms.txt all follow its conventions.

Frequently Asked Questions about golang-documentation

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

FAQPage Schema
How do I write godoc comments for exported Go functions and types?

Write godoc comments for exported symbols by starting with the symbol name, using complete sentences, and placing them directly above the code. This Skill audits and writes doc comments for functions, methods, types, interfaces, constants, and variables to ensure accurate Go documentation.

What is the best way to structure a README for a Go repository?

The best way to structure a Go README is to follow standard section ordering for usage guidance and maintainable documentation. This Skill shapes README files, contributing guides, and changelogs for Go libraries, applications, and hybrid repositories.

How do I name Go example test functions for godoc?

Name Go example test functions using ExampleXxx conventions, including method examples and output-verified snippets. This Skill adds and names example-driven API documentation correctly to ensure your examples display properly in godoc.

Does my Go project need an llms.txt file for AI assistants?

Your Go project needs an llms.txt file to provide accurate, discoverable documentation for AI assistants. This Skill generates AI-friendly project docs and summaries by applying llms.txt conventions alongside standard godoc and README structures.

How do I format a changelog for a Go library?

Format a changelog for a Go library by applying Keep a Changelog categories to maintain a consistent, readable history. This Skill writes and audits CHANGELOG entries to ensure your release notes follow standard documentation conventions.

Where should I place package and architecture documentation in a Go project?

Place package, file-level, and architecture documentation in the correct locations within your Go project structure. This Skill guides the correct placement for complex Go files, ADRs, REST APIs, and gRPC/protobuf contracts to maintain discoverable docs.