go-naming

Enforce Go identifier naming with MixedCaps and proper initialisms.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/HadiCherkaoui/opencode-config --skill go-naming-hadicherkaoui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-naming
Source: https://github.com/HadiCherkaoui/opencode-config/tree/main/skills/golang/go-naming
Command: npx skills add https://github.com/HadiCherkaoui/opencode-config --skill go-naming-hadicherkaoui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go projects often struggle with inconsistent naming across packages, types, functions, methods, variables, and constants, which harms readability and maintainability.

Core Features & Use Cases

  • Enforces MixedCaps naming for identifiers and discourages underscores.
  • Guides on package names, initialisms, receivers, and common naming pitfalls to improve code clarity.
  • Use during code reviews, onboarding, and refactoring to maintain idiomatic Go style across the codebase.

Quick Start

Explain and apply the standard Go naming conventions (MixedCaps, initialisms, package names) to a new or existing codebase.

Frequently Asked Questions about go-naming

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

FAQPage Schema
How do I enforce consistent Go naming conventions across my codebase?

Enforce consistent Go naming by applying MixedCaps for identifiers, avoiding underscores, and following initialism rules. This aligns packages, functions, variables, and constants with Google and Uber style guidelines.

What are the Google and Uber Go style guidelines for naming identifiers?

Google and Uber Go style guidelines require MixedCaps for identifiers without underscores. They provide specific rules for initialisms, receiver names, package names, and test names to maximize code clarity and maintainability.

How do I name receiver variables in Go methods correctly?

Name Go receiver variables consistently using short, clear abbreviations of the type name. Follow style guidelines to ensure receiver names remain uniform across methods, improving readability during code reviews.

Can I use underscores in Go variable and constant names?

No, you should not use underscores in Go variable and constant names. Idiomatic Go style mandates MixedCaps or camelCase for multi-word identifiers instead of snake_case to maintain codebase consistency.

What is the best way to handle initialisms like ID or HTTP in Go identifiers?

Handle initialisms like ID or HTTP in Go identifiers by keeping them consistently capitalized. Style guidelines dictate that initialisms should remain uppercase for acronyms to ensure visual consistency across the codebase.

When should I apply Go style guide rules during a project?

Apply Go style guide rules during code reviews, onboarding, and refactoring. Enforcing naming conventions at these stages maintains idiomatic Go style and prevents inconsistent identifier naming from harming codebase readability.