golang-naming

Enforce idiomatic Go naming standards for variables, functions, and constants.

Updated May 4, 2026
One-click install
npx skills add https://github.com/VIethoangnguyenle/nexus-enterprise --skill golang-naming-viethoangnguyenle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-naming
Source: https://github.com/VIethoangnguyenle/nexus-enterprise/tree/main/.agent/skills/golang-naming
Command: npx skills add https://github.com/VIethoangnguyenle/nexus-enterprise --skill golang-naming-viethoangnguyenle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides developers in adhering to Go language naming standards to produce idiomatic, maintainable code.

Core Features & Use Cases

  • Conventions & Best Practices: Explains proper naming for variables, functions, constants, and types based on scope and purpose.
  • Code Consistency: Helps ensure consistent naming throughout a codebase, improving readability and reducing errors.
  • Use Case: When refactoring a Go project, apply this Skill to rename variables like userID, constants like MaxRetries, and function names such as Errorf for format strings for idiomatic style.

Quick Start

Use this Skill to review and correct your Go variable, function, and constant naming conventions in the codebase.

Frequently Asked Questions about golang-naming

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

FAQPage Schema
What are the idiomatic Go naming conventions for variables and functions?

Idiomatic Go naming conventions require using MixedCaps for variables and functions, proper casing for acronyms like userID, and specific prefixes for booleans. Following these standards ensures your Go code remains clean, readable, and consistent.

How do I format error strings and constructor names in Go?

To format error strings and constructor names in Go, use lowercase formatting for error strings and standard naming like New or Errorf for constructors. This maintains consistency with idiomatic Go standards across your codebase.

When should I use MixedCaps instead of underscores in Go code?

You should use MixedCaps instead of underscores in Go code for all variables, functions, constants, and types to adhere to idiomatic style. This approach eliminates the need for underscores and improves overall code readability.

Does this apply to naming constants like MaxRetries in a Go project?

Yes, this applies to naming constants like MaxRetries in a Go project by guiding proper capitalization based on scope and purpose. It ensures constants follow idiomatic Go best practices for maintainable code.

How do I refactor an existing Go codebase to follow naming best practices?

To refactor an existing Go codebase to follow naming best practices, review and correct variables, functions, and constants against idiomatic standards like MixedCaps and proper acronym casing. This process improves readability and reduces naming inconsistencies.