go-naming

Enforce Go naming conventions for identifiers, packages, and receivers.

Updated Feb 28, 2026
One-click install
npx skills add https://github.com/rondevz/phant --skill go-naming-rondevz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-naming
Source: https://github.com/rondevz/phant/tree/main/.agents/skills/go-naming
Command: npx skills add https://github.com/rondevz/phant --skill go-naming-rondevz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Go naming conventions address clarity and consistency across identifiers for packages, types, functions, variables, constants, and receivers to improve readability and maintainability.

Core Features & Use Cases

  • Enforces MixedCaps for identifiers to avoid snake_case and ensure idiomatic Go names
  • Defines lowercase, underscore-free package naming conventions for clarity and import stability
  • Standardizes initialisms (URL, ID, HTTP) for consistent spelling across codebases
  • Guides receiver naming to keep names short and contextually tied to their types
  • Helps teams apply these rules in new projects and refactor existing code for coherence

Quick Start

Apply these naming rules to your next Go package, type, or function to ensure idiomatic, readable code.

Frequently Asked Questions about go-naming

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

FAQPage Schema
What are the standard naming conventions for variables and packages in Go?

Go naming conventions enforce MixedCaps for identifiers and lowercase package names without underscores to ensure consistency and improve readability across codebases.

How do I format initialisms like ID and HTTP correctly in Go code?

Format initialisms like ID and HTTP with consistent capitalization across codebases. Standardizing initialisms ensures idiomatic Go names and prevents inconsistent spelling in APIs and internal libraries.

Should I use snake_case or MixedCaps for naming functions and types in Go?

Use MixedCaps for naming functions and types in Go. Idiomatic Go naming explicitly avoids snake_case, enforcing MixedCaps for all identifiers to maintain clarity across packages, variables, and constants.

What is the best way to name receiver variables in Go methods?

Name receiver variables in Go methods by keeping them short and contextually tied to their types. Consistent receiver naming prevents repetition and maintains coherence when refactoring existing code.

Can I apply Go naming rules to refactor identifiers in an existing project?

Yes, you can apply Go naming rules to existing projects. The conventions guide teams in refactoring packages, APIs, and internal libraries to enforce coherence and improve maintainability.

When should I avoid repetition in Go package and variable names?

Avoid repetition in Go package and variable names whenever the package context already provides the necessary meaning. Eliminating redundant identifiers enforces idiomatic Go naming and improves overall code clarity.