Document Go APIs Skill for ChatGPT: Write godoc Comments for Public Contracts
Draft clear comments for supplied exported Go types, functions, and methods. Preserve identifiers, parameter units, zero values, error conditions, and concurrency requirements.
中文Install in ChatGPT
Requires a ChatGPT workspace where you can create skills. This is a text adaptation of the pinned GitHub source.
- Review the inputs and outputs in the pinned .agents/skills/document-go-apis/SKILL.md.
- In ChatGPT, open Plugins, Skills, Create, and Create with editor.
- Write the skill rules using the workflow described here. Provide public identifiers, signatures, behavioral evidence, version, and checked examples.
- Save the skill and check the fictional example in a new chat.
Example task
Fictional WaitForTask takes a context and seconds and returns context.Canceled on cancellation. Concurrency is unspecified. Draft its comment and evidence gaps.What to check
Start with the function name, explain blocking, seconds, and cancellation, and leave concurrency safety unconfirmed.
Original SKILL.md on GitHub · Updated
Frequently asked question
Does the signature establish zero-value or error semantics?
It establishes types and return shape. Use confirmed implementation, tests, or maintainer notes for zero values, branchable errors, and concurrency.