golang-naming

Enforce Go naming conventions for packages, types, and variables.

2.9k|191|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/samber/cc-skills-golang --skill golang-naming
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-naming
Source: https://github.com/samber/cc-skills-golang/tree/main/skills/golang-naming
Command: npx skills add https://github.com/samber/cc-skills-golang --skill golang-naming

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go naming conventions enforce MixedCaps, consistent acronym casing, and boolean predicate prefixes to improve readability and prevent stuttering across packages.

Core Features & Use Cases

  • Enforces idiomatic Go naming rules for packages, variables, constants, interfaces, and errors.
  • Guides constructor patterns (New for single primary type), boolean predicates (Is/Has/Can), and acronym capitalization (URL, ID).
  • Helps with code reviews, refactoring, and onboarding by maintaining a uniform naming style.

Quick Start

Use this skill to audit a Go module and apply consistent naming across new and existing code.

Frequently Asked Questions about golang-naming

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

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

Go naming conventions enforce MixedCaps and consistent acronym casing, such as URL or ID, to improve readability and prevent stuttering across packages. This ensures variables and types remain uniform and idiomatic.

How do I enforce boolean predicate prefixes in Go code reviews?

To enforce boolean predicate prefixes in Go code reviews, apply consistent naming rules using Is, Has, or Can prefixes for boolean values. This maintains clarity and prevents ambiguity when evaluating conditions.

What is the best way to name Go interfaces and constructors?

The best way to name Go interfaces and constructors is to use concise receiver names and apply the New pattern for single primary type construction. This prevents package stuttering and aligns with idiomatic Go standards.

Can I audit existing Go modules for naming consistency during refactoring?

Yes, you can audit existing Go modules during refactoring to apply consistent naming across packages, constants, and errors. This process identifies non-idiomatic MixedCaps and incorrect acronym casing to ensure uniform style.

Why does my Go code stutter when calling package-level functions?

Go code stutters when package names duplicate type or function names, violating idiomatic naming conventions. Auditing the module to enforce concise receiver names and proper package boundaries resolves this readability issue.

Do I need specific dependencies to check naming conventions in a Go codebase?

No specific dependencies are required to check naming conventions in a Go codebase. The skill operates independently to audit modules and enforce MixedCaps, boolean prefixes, and acronym casing without external tools.