go-enterprise-documentation

Write Google-style doc comments for Go packages, types, functions, and struct fields.

Updated Jul 24, 2026
One-click install
npx skills add https://github.com/urban233/ntn-ingest --skill go-enterprise-documentation-urban233
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: go-enterprise-documentation
Source: https://github.com/urban233/ntn-ingest/tree/main/.agents/skills/go-enterprise-documentation
Command: npx skills add https://github.com/urban233/ntn-ingest --skill go-enterprise-documentation-urban233

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Go codebases often ship with missing, inconsistent, or superficial comments that fail code review and confuse maintainers. This Skill enforces Google's Go style guide so every package, exported symbol, and unexported implementation detail carries complete, precise documentation. ## Core Features & Use Cases - Complete Comment Standards: Rules for package docs, exported types, interfaces, methods, struct fields, sentinel errors, and deprecation notices, all starting with the identifier name and written as full sentences. - Private Code Coverage: Guidance for documenting unexported types, helper functions, mutex ownership, and concurrency preconditions such as "caller must hold mu". - Review Checklist: A pre-submission checklist covering first-word rules, locking annotations, error taxonomy, and godoc rendering. - Use Case: When refactoring a Go service before a team review, activate this Skill to rewrite sparse comments into enterprise-grade godoc with concurrency guarantees and error conditions clearly stated. ## Quick Start Ask the AI to document your Go file or package following the Google style guide, for example by requesting full godoc comments for all exported and unexported symbols in a given source file.

Frequently Asked Questions about go-enterprise-documentation

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

FAQPage Schema
How do I write godoc comments that follow the Google Go style guide?▼

Start every comment with the exact identifier name, write complete sentences ending with a period, and explain why rather than what. Package comments begin with "Package <name>" and should cover purpose, concurrency model, and a usage example.

Should unexported Go functions and fields be documented?▼

Yes. Enterprise Go practice documents unexported types, helper functions, and private struct fields with the same rigor as public APIs. Annotate mutex guards and preconditions such as "caller must hold mu" so maintainers can modify internals safely.

How do I document concurrency and mutex ownership in Go comments?▼

State which mutex protects which fields using notes like "mu guards all fields below", mark types as safe for concurrent use, and declare lock preconditions on methods. Also document goroutine lifecycles and context cancellation expectations.

What is the correct format for deprecating a Go function?▼

Use the standard library format: a comment line beginning with "Deprecated:" followed by the replacement, for example "Deprecated: use [NewClientWithConfig] instead." This format is recognized by godoc and static analysis tools.

Does Go documentation support cross-reference links?▼

Yes. Go 1.19 added doc links using bracket syntax such as [Client] for same-package types and [context.Context] for external packages. Headings use "# Heading" and code blocks are indented by four spaces or a tab.