go-documentation

Standardize Go doc comments, package docs, and godoc formatting.

139|17|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/cxuu/golang-skills --skill go-documentation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-documentation
Source: https://github.com/cxuu/golang-skills/tree/main/skills/go-documentation
Command: npx skills add https://github.com/cxuu/golang-skills --skill go-documentation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Documentation quality for Go code is often inconsistent across projects. This skill provides comprehensive guidelines for writing clear, consistent doc comments, package docs, and godoc formatting to improve readability and maintainability.

Core Features & Use Cases

  • Establishes norms for doc comments in exported names, including capitalization and sentence structure.
  • Guides proper godoc formatting, package comments, and runnable examples to improve documentation quality.
  • Useful for code reviews and onboarding, ensuring new contributors follow a single standard when documenting Go code.

Quick Start

Apply these Go documentation guidelines when writing or reviewing Go packages, types, or functions.

Frequently Asked Questions about go-documentation

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

FAQPage Schema
How do I write idiomatic Go documentation for exported functions and types?

Idiomatic Go documentation begins doc comments with the exported name and uses complete sentences. This skill enforces normative capitalization and sentence structure rules for Go packages, types, and functions to ensure consistency.

What is the correct godoc formatting for package comments in Go?

Correct godoc formatting places package comments directly above the package clause using standard conventions. This skill provides structured guidelines for godoc formatting and package docs to improve code readability and maintainability.

How do I add runnable examples to my Go package documentation?

Runnable examples are added by writing functions named Example in your test files. This skill guides proper godoc formatting and example practices to demonstrate package usage and improve overall documentation quality.

How do I standardize Go code review guidelines for documentation?

Standardize Go code reviews by applying structured guidelines for doc comments and godoc formatting. This skill ensures new contributors follow a single standard when documenting Go code across codebases during onboarding and review.

Do I need any external dependencies to enforce Go doc comment rules?

You do not need external dependencies to enforce Go doc comment rules. This skill provides built-in structured guidelines for normative doc-comment rules and godoc formatting without requiring any additional components.

Why does my Go documentation appear inconsistent across different packages?

Go documentation appears inconsistent when exported names lack normative doc comments and standard godoc formatting. This skill solves inconsistent documentation by enforcing structured guidelines for package docs, types, and functions.