go-naming
Skill7 starsChanged 10 days agoApache-2.0View on GitHub
Use when naming Go packages, types, functions, methods, variables, constants, or receiver names, including new types and exported APIs. Package organization belongs to go-packages.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- eduardo-sl/go-agent-skillstheir own version, first seen Nov 1, 2026
- infiniflow/ragflowtheir own version, first seen Mar 6, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- infiniflow/ragflow★ 94ksame name
- eduardo-sl/go-agent-skills★ 85same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- go-code-refactorSkill
- go-code-reviewSkill
- go-codeSkill
- go-concurrencySkill
- go-contextSkill
- go-databaseSkill
- go-data-structuresSkill
- go-defensiveSkill
- go-documentationSkill
- go-error-handlingSkill
- go-functionsSkill
- go-genericsSkill
- go-httpSkill
- go-interfacesSkill
- go-lintingSkill
- go-loggingSkill
- go-packagesSkill
- go-performanceSkill
- go-resilienceSkill
- go-securitySkill
- go-style-coreSkill
- go-testingSkill
- go-troubleshootingSkill
The file
Files
Go Naming Conventions
Resource Routing
scripts/check-naming.sh- Run when checking SCREAMING_SNAKE_CASE constants,Get-prefixed methods with no parameters, generic package names, or receivers namedthis/self.scripts/check-naming-ast.go- Implementation helper built and run bycheck-naming.sh; not run or read directly.references/IDENTIFIERS.md- Read for the conventions themselves — package, interface, receiver, constant, initialism, getter and type-suffix names — when a choice for an exported identifier or package-level symbol is in doubt.references/REPETITION.md- Read when names repeat package, receiver, type, or local context.references/VARIABLES.md- Read when choosing local variable names, receiver names, or loop identifiers.
Core Principle
A name is read where it is used, never where it is declared: it does not
repeat the package, the receiver, or the surrounding context, and its length
grows with the distance between declaration and use. Go names are shorter
than in most languages. The reader knows the conventions — MixedCaps,
lowercase packages, -er interfaces, short consistent receivers, no Get
prefix, initialisms in one case — so this skill carries the decisions and
references/ the rules. A package name is short, lowercase, and a single
word; layer directories take the plural layer names handlers, services,
repositories, models.
Error Names
Normative: Sentinel errors are
ErrNotFoundwhen exported anderrNotFoundwhen not; error types end inError(NotFoundError), neverErrNotFoundError.errnamein the lint baseline enforces theErr/errprefix and theErrorsuffix; it acceptsErrNotFoundError, so a name with both is a review item.
Where Review Sends Names Back
- Repetition against context.
widget.New()notwidget.NewWidget();p.Name()notp.ProjectName(); in packagesqldb,ConnectionnotDBConnection. A generic package name —util,common,helper— is a finding; name the package for what it provides (httpauth,stringutil). REPETITION.md has the cases. _prefix on unexported globals (Uber only; Google style does not use it): new code writesdefaultPort, not_defaultPort, including new code with no neighbor to match. Only a package that already prefixes its globals keeps doing so (VARIABLES.md).- Type in the name.
usersnotuserSlice,namenotnameString; when functions differ only by type, the type goes at the end (ParseInt,ParseInt64). - A predeclared identifier as a name.
error,string,len,cap,append,copy,new,makeas a variable, parameter, or type name compiles and hides the built-in for the rest of the scope (predeclaredin the gate reports it); SHADOWING.md owns detection.
Validation
Validation:
bash <installed-skill-dir>/scripts/check-naming.sh, run from the project, reports the four patterns its Resource Routing line names. Error names areerrname's and package stutter is reviveexported's, both in the go-linting gate; the rest of the repetition above has no check. Run the script once at the end of the task, beside that gate, which does not run it.
Related Skills
- go-interfaces: pointer versus value receivers; their names are IDENTIFIERS.md's Receiver Names.
- go-packages: splitting packages, import collisions; package names are IDENTIFIERS.md's Package Names.
- go-style-core: shadowing of built-ins, clarity against concision; name length by scope is VARIABLES.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

