golang-naming

Enforce idiomatic Go naming conventions for packages and identifiers.

Updated Apr 24, 2026
One-click install
npx skills add https://github.com/Utchash007/TermTales --skill golang-naming-utchash007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-naming
Source: https://github.com/Utchash007/TermTales/tree/main/.agents/skills/golang-naming
Command: npx skills add https://github.com/Utchash007/TermTales --skill golang-naming-utchash007

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Go projects often suffer from inconsistent identifiers that hamper readability and maintainability. This skill provides a concise guide to idiomatic Go naming, helping teams apply consistent rules across packages, types, variables, and functions.

Core Features & Use Cases

  • Enforces MixedCaps for all exported identifiers and discourages underscores or Hungarian-style prefixes.
  • Guides acronym handling (all caps or all lower) to avoid stuttering and improve readability.
  • Standardizes boolean predicate naming with is/has/can prefixes and consistent getter conventions.
  • Clarifies constructor naming and naming that avoids package-name stuttering.
  • Acts as a quick reference during code reviews, refactors, and new code creation to ensure uniform naming.

Quick Start

Review a Go package and apply MixedCaps, acronym casing, and boolean predicate naming to all identifiers.

Frequently Asked Questions about golang-naming

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

FAQPage Schema
What is idiomatic Go naming for packages, types, and variables?

Idiomatic Go naming enforces MixedCaps for exported identifiers, avoids underscores or Hungarian-style prefixes, and standardizes acronyms to all caps or all lower case for clean, consistent code.

How do I name constructors and getters in Go?

Name Go constructors using New and prefix boolean predicates with is, has, or can, while omitting Get from getter names to maintain idiomatic naming conventions.

What's the best way to avoid stuttering in Go package and type names?

Avoid Go naming stuttering by omitting the package name from exported type or function names, ensuring identifiers read cleanly without redundant repetition in code.

How do I capitalize acronyms like ID or URL in Go identifiers?

Capitalize Go acronyms consistently as either all caps or all lower case within MixedCaps identifiers, such as userID or ServeHTTP, to improve readability and avoid stuttering.

Can I use this for naming reviews during Go refactoring?

Yes, you can apply these Go naming conventions during code reviews, refactors, and new code creation to enforce uniform package, type, constant, and method naming.

Why does my Go code use underscores in variable names and how should I fix it?

Go code uses underscores when not following idiomatic conventions; fix this by applying MixedCaps to all exported identifiers and removing underscores or Hungarian-style prefixes.