go-source-documentation

go-source-documentation is a skill for Claude Code, Codex from jmrplens/gitlab-mcp-server. It costs 75 tokens per session (3,271 once invoked), scanned A, original, MIT.

A guide for adding standard Go documentation comments to source and test files. These comments explain packages, types, functions, constants, variables, and tests in the format used by Go's documentation tools.

In plain words
What is it for?
Use it when documenting Go files or packages, adding or improving comments, or explaining what tests validate.
Why use it?
It makes Go code easier to understand and produces documentation that follows the language's conventions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/jmrplens/gitlab-mcp-server/go-source-documentation
Any agent
npx skills add jmrplens/gitlab-mcp-server --skill go-source-documentation
Clone the repo
git clone --depth 1 https://github.com/jmrplens/gitlab-mcp-server

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-source-documentation

README.md
[![agentmods](https://agentmods.dev/badge/skills/jmrplens/gitlab-mcp-server/go-source-documentation.svg)](https://agentmods.dev/skills/jmrplens/gitlab-mcp-server/go-source-documentation)
Your own site
<a href="https://agentmods.dev/skills/jmrplens/gitlab-mcp-server/go-source-documentation"><img src="https://agentmods.dev/badge/skills/jmrplens/gitlab-mcp-server/go-source-documentation.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,271 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00075 $0.03271
Opus 5 $0.00037 $0.01636
Sonnet 5 $0.00015 $0.00654
Haiku 4.5 $0.00007 $0.00327

Measured 4d ago against content hash 8a862508a663, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

go-source-documentation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/go-source-documentation/SKILL.md · 352 lines

How it starts

The opening of the file, as written. The whole thing — 352 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Go Source Documentation Skill

Activation

Activate this skill when the user:

  • Asks to document Go source files or test files
  • Asks to add doc comments to Go code
  • Asks to improve or fix Go documentation
  • Mentions /document-go or /doc-go
  • Asks to add file headers to Go files
  • Asks to document a Go package

Prerequisites

Before starting, gather context:

  1. Read the target file(s) completely to understand structure and purpose
  2. Read related files in the same package to understand the package API surface
  3. Check existing tests to understand what behavior the code implements
  4. Identify the package role within the project architecture
  5. Use Context7 to verify current Go doc comment conventions if uncertain

Documentation Patterns

Pattern 1: Package Comment

Every package needs exactly one Package comment, typically in the main file or a dedicated doc.go:

// Package tools implements MCP tool handlers for GitLab operations.
//
// Each tool follows a consistent pattern: a typed input struct with jsonschema
// tags defining the parameter schema, a handler function that calls the GitLab
// API, and a typed output struct for the response.
//
// Actions are exposed through [ActionSpecs], which feed catalog-backed meta,
// dynamic, gitlab://tools resources, and individual tool surfaces with
// appropriate annotations.
//
// # Supported Operations
//
//   - Branches: create, list, protect, unprotect
//   - Issues: create, list, get, update, search
//   - Merge Requests: create, list, get, update, merge
//   - Files: get content, create, update
//   - Commits: list, get details
package tools

Pattern 2: File Header Comment

For multi-file packages, each file gets a header describing its scope. The header goes immediately before the package declaration:

// branches.go implements MCP tool handlers for GitLab branch operations.
//
// It provides the following tools:
//   - gitlab_branch_create:     Create a new branch from a ref
//   - gitlab_branch_list:       List branches with optional search
//   - gitlab_branch_protect:    Protect a branch with access levels
//   - gitlab_branch_unprotect:  Remove protection from a branch
package tools

Read the full file on GitHub · 352 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 352 lines · 75 tokens per session scan A 8a862508a663

Subscribe to this mod's changes

go-source-documentation is a skill published in the GitHub repository jmrplens/gitlab-mcp-server (31 stars, last pushed 4d ago), licensed MIT. It adds 75 tokens to every session and 3,271 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

release-notes

Draft concise release notes.

ollama/ollama · 9 tokens

test-with-gt

Write Go test code using the gt library. Use when writing tests, creating test files, or when the user asks to add tests for Go code.

gollem-dev/gollem · 35 tokens

go-code-review

Use when reviewing Go code or checking code against community style standards. Also use proactively before submitting a Go PR or when reviewing any Go code changes, even if the user doesn't explicitly request a style review. Does not cover language-specific syntax — delegates to specialized skills.

cxuu/golang-skills · 56 tokens

go-concurrency

Use when writing concurrent Go code — goroutines, channels, mutexes, or thread-safety guarantees. Also use when parallelizing work, fixing data races, or protecting shared state, even if the user doesn't explicitly mention concurrency primitives. Does not cover context.Context patterns (see go-context).

cxuu/golang-skills · 62 tokens

go-defensive

Use when hardening Go code at API boundaries — copying slices/maps, verifying interface compliance, using defer for cleanup, time.Time/time.Duration, or avoiding mutable globals. Also use when reviewing for robustness concerns like missing cleanup or unsafe crypto usage, even if the user doesn't mention "defensive…

cxuu/golang-skills · 76 tokens

go-error-handling

Use when writing Go code that returns, wraps, or handles errors — choosing between sentinel errors, custom types, and fmt.Errorf (%w vs %v), structuring error flow, or deciding whether to log or return. Also use when propagating errors across package boundaries or using errors.Is/As, even if the user doesn't ask about…

cxuu/golang-skills · 88 tokens