Go naming rules for packages, types, functions, variables, and receivers, with a checker script and reference docs.

skills.sh installs
1.3K
GitHub stars
196
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers identifier rules for packages, interfaces, receivers, constants, initialisms, functions, and variables, plus avoiding repetition and built-in shadowing
  • Includes scripts/check-naming.sh for flagging SCREAMING_SNAKE_CASE constants, Get-prefixed getters, generic package names, and this/self receivers
  • Enforces MixedCaps for all identifiers and consistent case for initialisms such as userID and HTTPClient
  • Designed for writing or reviewing Go code and exported APIs; package organization is handled by go-packages

Install

$ npx -y skills add cxuu/golang-skills --skill go-naming -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Go Naming Conventions

Resource Routing

  • scripts/check-naming.sh - Run when checking SCREAMING_SNAKE_CASE constants, Get-prefixed getters, generic package names, or receivers named this/self.
  • references/IDENTIFIERS.md - Read when choosing names for initialisms, exported identifiers, or package-level symbols.
  • references/REPETITION.md - Read when names repeat package, receiver, type, or local context.
  • references/VARIABLES.md - Read when choosing local variable names, receiver names, or loop identifiers.

Core Principle

Names should:

  • Not feel repetitive when used
  • Take context into consideration
  • Not repeat concepts that are already clear

Naming is more art than science—Go names tend to be shorter than in other languages.


Naming Decision Flow

Details

Repository
github.com/cxuu/golang-skills
Categories
Go, Code Review & Quality
First seen
May 16, 2026

More from cxuu/golang-skills

All 20

Similar to Go Naming

More Go