[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JGQSQV3BPH765S4KF8AYB6":3,"skill-same:01M6JGQSQV3BPH765S4KF8AYB6":105},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":6,"ownerHtmlUrl":54,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":55,"install":56,"resources":69},"01M6JGQSQV3BPH765S4KF8AYB6","golang-naming",null,"Go (Golang) naming conventions — covers packages, constructors, structs, interfaces, constants, enums, errors, booleans, receivers, getters\u002Fsetters, functional options, acronyms, test functions, and subtest names. Use this skill when writing new Go code, reviewing or refactoring, choosing between naming alternatives (New vs NewTypeName, isConnected vs connected, ErrNotFound vs NotFoundError, StatusReady vs StatusUnknown at iota 0), debating Go package names (utils\u002Fhelpers anti-patterns), or asking about Go naming best practices. Also trigger when the user mentions MixedCaps vs snake_case, ALL_CAPS constants, Get-prefix on getters, or error string casing. Do NOT use for general Go implementation questions that don't involve naming decisions.","muratovv\u002Fai-hats","muratovv","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7502801?v=4","01M6JGCBN4KEJX012GPJVSH04T","Fedor Muratov","01M6JGCBSNMN7CW3RGTPPE0MN2",3,"MIT","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fusage\u002Fskills\u002Fgolang-naming\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"golang","naming","golang naming","at","writing","utils","errors","functional","error","false","get","options","anti-patterns","read","projects","refactoring","Bash","code","packages","ai coding agents","2026-11-10 10:12:30",false,"---\nname: golang-naming\ndescription: >-\n  Go (Golang) naming conventions — covers packages, constructors, structs,\n  interfaces, constants, enums, errors, booleans, receivers,\n  getters\u002Fsetters, functional options, acronyms, test functions, and\n  subtest names. Use this skill when writing new Go code, reviewing or\n  refactoring, choosing between naming alternatives (New vs NewTypeName,\n  isConnected vs connected, ErrNotFound vs NotFoundError, StatusReady vs\n  StatusUnknown at iota 0), debating Go package names (utils\u002Fhelpers\n  anti-patterns), or asking about Go naming best practices. Also trigger\n  when the user mentions MixedCaps vs snake_case, ALL_CAPS constants,\n  Get-prefix on getters, or error string casing. Do NOT use for general Go\n  implementation questions that don't involve naming decisions.\nuser-invocable: false\nlicense: MIT\ncompatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang.\nmetadata:\n  author: samber\n  version: \"1.1.1\"\nallowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent\n---\n\n> **Community default.** A company skill that explicitly supersedes `samber\u002Fcc-skills-golang@golang-naming` skill takes precedence.\n\n# Go Naming Conventions\n\nGo favors short, readable names. Capitalization controls visibility — uppercase is exported, lowercase is unexported. All identifiers MUST use MixedCaps, NEVER underscores.\n\n> \"Clear is better than clever.\" — Go Proverbs\n>\n> \"Design the architecture, name the components, document the details.\" — Go Proverbs\n\nTo ignore a rule, just add a comment to the code.\n\n## Quick Reference\n\n| Element | Convention | Example |\n| --- | --- | --- |\n| Package | lowercase, single word | `json`, `http`, `tabwriter` |\n| File | lowercase, underscores OK | `user_handler.go` |\n| Exported name | UpperCamelCase | `ReadAll`, `HTTPClient` |\n| Unexported | lowerCamelCase | `parseToken`, `userCount` |\n| Interface | method name + `-er` | `Reader`, `Closer`, `Stringer` |\n| Struct | MixedCaps noun | `Request`, `FileHeader` |\n| Constant | MixedCaps (not ALL_CAPS) | `MaxRetries`, `defaultTimeout` |\n| Receiver | 1-2 letter abbreviation | `func (s *Server)`, `func (b *Buffer)` |\n| Error variable | `Err` prefix | `ErrNotFound`, `ErrTimeout` |\n| Error type | `Error` suffix | `PathError`, `SyntaxError` |\n| Constructor | `New` (single type) or `NewTypeName` (multi-type) | `ring.New`, `http.NewRequest` |\n| Boolean field | `is`, `has`, `can` prefix on **fields** and methods | `isReady`, `IsConnected()` |\n| Test function | `Test` + function name | `TestParseToken` |\n| Acronym | all caps or all lower | `URL`, `HTTPServer`, `xmlParser` |\n| Variant: context | `WithContext` suffix | `FetchWithContext`, `QueryContext` |\n| Variant: in-place | `In` suffix | `SortIn()`, `ReverseIn()` |\n| Variant: error | `Must` prefix | `MustParse()`, `MustLoadConfig()` |\n| Option func | `With` + field name | `WithPort()`, `WithLogger()` |\n| Enum (iota) | type name prefix, zero-value = unknown | `StatusUnknown` at 0, `StatusReady` |\n| Named return | descriptive, for docs only | `(n int, err error)` |\n| Error string | lowercase (incl. acronyms), no punctuation | `\"image: unknown format\"`, `\"invalid id\"` |\n| Import alias | short, only on collision | `mrand \"math\u002Frand\"`, `pb \"app\u002Fproto\"` |\n| Format func | `f` suffix | `Errorf`, `Wrapf`, `Logf` |\n| Test table fields | `got`\u002F`expected` prefixes | `input string`, `expected int` |\n\n## MixedCaps\n\nAll Go identifiers MUST use `MixedCaps` (or `mixedCaps`). NEVER use underscores in identifiers — the only exceptions are test function subcases (`TestFoo_InvalidInput`), generated code, and OS\u002Fcgo interop. This is load-bearing, not cosmetic — Go's export mechanism relies on capitalization, and tooling assumes MixedCaps throughout.\n\n```go\n\u002F\u002F ✓ Good\nMaxPacketSize\nuserCount\nparseHTTPResponse\n\n\u002F\u002F ✗ Bad — these conventions conflict with Go's export mechanism and tooling expectations\nMAX_PACKET_SIZE   \u002F\u002F C\u002FPython style\nmax_packet_size   \u002F\u002F snake_case\nkMaxBufferSize    \u002F\u002F Hungarian notation\n```\n\n## Avoid Stuttering\n\nGo call sites always include the package name, so repeating it in the identifier wastes the reader's time — `http.HTTPClient` forces parsing \"HTTP\" twice. A name MUST NOT repeat information already present in the package name, type name, or surrounding context.\n\n```go\n\u002F\u002F Good — clean at the call site\nhttp.Client       \u002F\u002F not http.HTTPClient\njson.Decoder      \u002F\u002F not json.JSONDecoder\nuser.New()        \u002F\u002F not user.NewUser()\nconfig.Parse()    \u002F\u002F not config.ParseConfig()\n\n\u002F\u002F In package sqldb:\ntype Connection struct{}  \u002F\u002F not DBConnection — \"db\" is already in the package name\n\n\u002F\u002F Anti-stutter applies to ALL exported types, not just the primary struct:\n\u002F\u002F In package dbpool:\ntype Pool struct{}        \u002F\u002F not DBPool\ntype Status struct{}      \u002F\u002F not PoolStatus — callers write dbpool.Status\ntype Option func(*Pool)   \u002F\u002F not PoolOption\n```\n\n## Frequently Missed Conventions\n\nThese conventions are correct but non-obvious — they are the most common source of naming mistakes:\n\n**Constructor naming:** When a package exports a single primary type, the constructor is `New()`, not `NewTypeName()`. This avoids stuttering — callers write `apiclient.New()` not `apiclient.NewClient()`. Use `NewTypeName()` only when a package has multiple constructible types (like `http.NewRequest`, `http.NewServeMux`).\n\n**Boolean struct fields:** Unexported boolean fields MUST use `is`\u002F`has`\u002F`can` prefix — `isConnected`, `hasPermission`, not bare `connected` or `permission`. The exported getter keeps the prefix: `IsConnected() bool`. This reads naturally as a question and distinguishes booleans from other types.\n\n**Error strings are fully lowercase — including acronyms.** Write `\"invalid message id\"` not `\"invalid message ID\"`, because error strings are often concatenated with other context (`fmt.Errorf(\"parsing token: %w\", err)`) and mixed case looks wrong mid-sentence. Sentinel errors should include the package name as prefix: `errors.New(\"apiclient: not found\")`.\n\n**Enum zero values:** Always place an explicit `Unknown`\u002F`Invalid` sentinel at iota position 0. A `var s Status` silently becomes 0 — if that maps to a real state like `StatusReady`, code can behave as if a status was deliberately chosen when it wasn't.\n\n**Subtest names:** Table-driven test case names in `t.Run()` should be fully lowercase descriptive phrases: `\"valid id\"`, `\"empty input\"` — not `\"valid ID\"` or `\"Valid Input\"`.\n\n## Detailed Categories\n\nFor complete rules, examples, and rationale, see:\n\n- **[Packages, Files & Import Aliasing](.\u002Freferences\u002Fpackages-files.md)** — Package naming (single word, lowercase, no plurals), file naming conventions, import alias patterns (only use on collision to avoid cognitive load), and directory structure.\n\n- **[Variables, Booleans, Receivers & Acronyms](.\u002Freferences\u002Fidentifiers.md)** — Scope-based naming (length matches scope: `i` for 3-line loops, longer names for package-level), single-letter receiver conventions (`s` for Server), acronym casing (URL not Url, HTTPServer not HttpServer), and boolean naming patterns (isReady, hasPrefix).\n\n- **[Functions, Methods & Options](.\u002Freferences\u002Ffunctions-methods.md)** — Getter\u002Fsetter patterns (Go omits `Get` so `user.Name()` reads naturally), constructor conventions (`New` or `NewTypeName`), named returns (for documentation only), format function suffixes (`Errorf`, `Wrapf`), and functional options (`WithPort`, `WithLogger`).\n\n- **[Types, Constants & Errors](.\u002Freferences\u002Ftypes-errors.md)** — Interface naming (`Reader`, `Closer` suffix with `-er`), struct naming (nouns, MixedCaps), constants (MixedCaps, not ALL_CAPS), enums (type name prefix like `StatusReady`), sentinel errors (`ErrNotFound` variables), error types (`PathError` suffix), and error message conventions (lowercase, no punctuation).\n\n- **[Test Naming](.\u002Freferences\u002Ftesting.md)** — Test function naming (`TestFunctionName`), table-driven test field conventions (`input`, `expected`), test helper naming, and subcase naming patterns.\n\n## Common Mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| `ALL_CAPS` constants | Go reserves casing for visibility, not emphasis — use `MixedCaps` (`MaxRetries`) |\n| `GetName()` getter | Go omits `Get` because `user.Name()` reads naturally at call sites. But `Is`\u002F`Has`\u002F`Can` prefixes are kept for boolean predicates: `IsHealthy() bool` not `Healthy() bool` |\n| `Url`, `Http`, `Json` acronyms | Mixed-case acronyms create ambiguity (`HttpsUrl` — is it `Https+Url`?). Use all caps or all lower |\n| `this` or `self` receiver | Go methods are called frequently — use 1-2 letter abbreviation (`s` for `Server`) to reduce visual noise |\n| `util`, `helper` packages | These names say nothing about content — use specific names that describe the abstraction |\n| `http.HTTPClient` stuttering | Package name is always present at call site — `http.Client` avoids reading \"HTTP\" twice |\n| `user.NewUser()` constructor | Single primary type uses `New()` — `user.New()` avoids repeating the type name |\n| `connected bool` field | Bare adjective is ambiguous — use `isConnected` so the field reads as a true\u002Ffalse question |\n| `\"invalid message ID\"` error | Error strings must be fully lowercase including acronyms — `\"invalid message id\"` |\n| `StatusReady` at iota 0 | Zero value should be a sentinel — `StatusUnknown` at 0 catches uninitialized values |\n| `\"not found\"` error string | Sentinel errors should include the package name — `\"mypackage: not found\"` identifies the origin |\n| `userSlice` type-in-name | Types encode implementation detail — `users` describes what it holds, not how |\n| Inconsistent receiver names | Switching names across methods of the same type confuses readers — use one name consistently |\n| `snake_case` identifiers | Underscores conflict with Go's MixedCaps convention and tooling expectations — use `mixedCaps` |\n| Long names for short scopes | Name length should match scope — `i` is fine for a 3-line loop, `userIndex` is noise |\n| Naming constants by value | Values change, roles don't — `DefaultPort` survives a port change, `Port8080` doesn't |\n| `FetchCtx()` context variant | `WithContext` is the standard Go suffix — `FetchWithContext()` is instantly recognizable |\n| `sort()` in-place but no `In` | Readers assume functions return new values. `SortIn()` signals mutation |\n| `parse()` panicking on error | `MustParse()` warns callers that failure panics — surprises belong in the name |\n| Mixing `With*`, `Set*`, `Use*` | Consistency across the codebase — `With*` is the Go convention for functional options |\n| Plural package names | Go convention is singular (`net\u002Furl` not `net\u002Furls`) — keeps import paths consistent |\n| `Wrapf` without `f` suffix | The `f` suffix signals format-string semantics — `Wrapf`, `Errorf` tell callers to pass format args |\n| Unnecessary import aliases | Aliases add cognitive load. Only alias on collision — `mrand \"math\u002Frand\"` |\n| Inconsistent concept names | Using `user`\u002F`account`\u002F`person` for the same concept forces readers to track synonyms — pick one name |\n\n## Enforce with Linters\n\nMany naming convention issues are caught automatically by linters: `revive`, `predeclared`, `misspell`, `errname`. See `samber\u002Fcc-skills-golang@golang-linter` skill for configuration and usage.\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-code-style` skill for broader formatting and style decisions\n- → See `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill for interface naming depth and receiver design\n- → See `samber\u002Fcc-skills-golang@golang-linter` skill for automated enforcement (revive, predeclared, misspell, errname)\n","> **Community default.** A company skill that explicitly supersedes `samber\u002Fcc-skills-golang@golang-naming` skill takes precedence.\n\n# Go Naming Conventions\n\nGo favors short, readable names. Capitalization controls visibility — uppercase is exported, lowercase is unexported. All identifiers MUST use MixedCaps, NEVER underscores.\n\n> \"Clear is better than clever.\" — Go Proverbs\n>\n> \"Design the architecture, name the components, document the details.\" — Go Proverbs\n\nTo ignore a rule, just add a comment to the code.\n\n## Quick Reference\n\n| Element | Convention | Example |\n| --- | --- | --- |\n| Package | lowercase, single word | `json`, `http`, `tabwriter` |\n| File | lowercase, underscores OK | `user_handler.go` |\n| Exported name | UpperCamelCase | `ReadAll`, `HTTPClient` |\n| Unexported | lowerCamelCase | `parseToken`, `userCount` |\n| Interface | method name + `-er` | `Reader`, `Closer`, `Stringer` |\n| Struct | MixedCaps noun | `Request`, `FileHeader` |\n| Constant | MixedCaps (not ALL_CAPS) | `MaxRetries`, `defaultTimeout` |\n| Receiver | 1-2 letter abbreviation | `func (s *Server)`, `func (b *Buffer)` |\n| Error variable | `Err` prefix | `ErrNotFound`, `ErrTimeout` |\n| Error type | `Error` suffix | `PathError`, `SyntaxError` |\n| Constructor | `New` (single type) or `NewTypeName` (multi-type) | `ring.New`, `http.NewRequest` |\n| Boolean field | `is`, `has`, `can` prefix on **fields** and methods | `isReady`, `IsConnected()` |\n| Test function | `Test` + function name | `TestParseToken` |\n| Acronym | all caps or all lower | `URL`, `HTTPServer`, `xmlParser` |\n| Variant: context | `WithContext` suffix | `FetchWithContext`, `QueryContext` |\n| Variant: in-place | `In` suffix | `SortIn()`, `ReverseIn()` |\n| Variant: error | `Must` prefix | `MustParse()`, `MustLoadConfig()` |\n| Option func | `With` + field name | `WithPort()`, `WithLogger()` |\n| Enum (iota) | type name prefix, zero-value = unknown | `StatusUnknown` at 0, `StatusReady` |\n| Named return | descriptive, for docs only | `(n int, err error)` |\n| Error string | lowercase (incl. acronyms), no punctuation | `\"image: unknown format\"`, `\"invalid id\"` |\n| Import alias | short, only on collision | `mrand \"math\u002Frand\"`, `pb \"app\u002Fproto\"` |\n| Format func | `f` suffix | `Errorf`, `Wrapf`, `Logf` |\n| Test table fields | `got`\u002F`expected` prefixes | `input string`, `expected int` |\n\n## MixedCaps\n\nAll Go identifiers MUST use `MixedCaps` (or `mixedCaps`). NEVER use underscores in identifiers — the only exceptions are test function subcases (`TestFoo_InvalidInput`), generated code, and OS\u002Fcgo interop. This is load-bearing, not cosmetic — Go's export mechanism relies on capitalization, and tooling assumes MixedCaps throughout.\n\n```go\n\u002F\u002F ✓ Good\nMaxPacketSize\nuserCount\nparseHTTPResponse\n\n\u002F\u002F ✗ Bad — these conventions conflict with Go's export mechanism and tooling expectations\nMAX_PACKET_SIZE   \u002F\u002F C\u002FPython style\nmax_packet_size   \u002F\u002F snake_case\nkMaxBufferSize    \u002F\u002F Hungarian notation\n```\n\n## Avoid Stuttering\n\nGo call sites always include the package name, so repeating it in the identifier wastes the reader's time — `http.HTTPClient` forces parsing \"HTTP\" twice. A name MUST NOT repeat information already present in the package name, type name, or surrounding context.\n\n```go\n\u002F\u002F Good — clean at the call site\nhttp.Client       \u002F\u002F not http.HTTPClient\njson.Decoder      \u002F\u002F not json.JSONDecoder\nuser.New()        \u002F\u002F not user.NewUser()\nconfig.Parse()    \u002F\u002F not config.ParseConfig()\n\n\u002F\u002F In package sqldb:\ntype Connection struct{}  \u002F\u002F not DBConnection — \"db\" is already in the package name\n\n\u002F\u002F Anti-stutter applies to ALL exported types, not just the primary struct:\n\u002F\u002F In package dbpool:\ntype Pool struct{}        \u002F\u002F not DBPool\ntype Status struct{}      \u002F\u002F not PoolStatus — callers write dbpool.Status\ntype Option func(*Pool)   \u002F\u002F not PoolOption\n```\n\n## Frequently Missed Conventions\n\nThese conventions are correct but non-obvious — they are the most common source of naming mistakes:\n\n**Constructor naming:** When a package exports a single primary type, the constructor is `New()`, not `NewTypeName()`. This avoids stuttering — callers write `apiclient.New()` not `apiclient.NewClient()`. Use `NewTypeName()` only when a package has multiple constructible types (like `http.NewRequest`, `http.NewServeMux`).\n\n**Boolean struct fields:** Unexported boolean fields MUST use `is`\u002F`has`\u002F`can` prefix — `isConnected`, `hasPermission`, not bare `connected` or `permission`. The exported getter keeps the prefix: `IsConnected() bool`. This reads naturally as a question and distinguishes booleans from other types.\n\n**Error strings are fully lowercase — including acronyms.** Write `\"invalid message id\"` not `\"invalid message ID\"`, because error strings are often concatenated with other context (`fmt.Errorf(\"parsing token: %w\", err)`) and mixed case looks wrong mid-sentence. Sentinel errors should include the package name as prefix: `errors.New(\"apiclient: not found\")`.\n\n**Enum zero values:** Always place an explicit `Unknown`\u002F`Invalid` sentinel at iota position 0. A `var s Status` silently becomes 0 — if that maps to a real state like `StatusReady`, code can behave as if a status was deliberately chosen when it wasn't.\n\n**Subtest names:** Table-driven test case names in `t.Run()` should be fully lowercase descriptive phrases: `\"valid id\"`, `\"empty input\"` — not `\"valid ID\"` or `\"Valid Input\"`.\n\n## Detailed Categories\n\nFor complete rules, examples, and rationale, see:\n\n- **[Packages, Files & Import Aliasing](.\u002Freferences\u002Fpackages-files.md)** — Package naming (single word, lowercase, no plurals), file naming conventions, import alias patterns (only use on collision to avoid cognitive load), and directory structure.\n\n- **[Variables, Booleans, Receivers & Acronyms](.\u002Freferences\u002Fidentifiers.md)** — Scope-based naming (length matches scope: `i` for 3-line loops, longer names for package-level), single-letter receiver conventions (`s` for Server), acronym casing (URL not Url, HTTPServer not HttpServer), and boolean naming patterns (isReady, hasPrefix).\n\n- **[Functions, Methods & Options](.\u002Freferences\u002Ffunctions-methods.md)** — Getter\u002Fsetter patterns (Go omits `Get` so `user.Name()` reads naturally), constructor conventions (`New` or `NewTypeName`), named returns (for documentation only), format function suffixes (`Errorf`, `Wrapf`), and functional options (`WithPort`, `WithLogger`).\n\n- **[Types, Constants & Errors](.\u002Freferences\u002Ftypes-errors.md)** — Interface naming (`Reader`, `Closer` suffix with `-er`), struct naming (nouns, MixedCaps), constants (MixedCaps, not ALL_CAPS), enums (type name prefix like `StatusReady`), sentinel errors (`ErrNotFound` variables), error types (`PathError` suffix), and error message conventions (lowercase, no punctuation).\n\n- **[Test Naming](.\u002Freferences\u002Ftesting.md)** — Test function naming (`TestFunctionName`), table-driven test field conventions (`input`, `expected`), test helper naming, and subcase naming patterns.\n\n## Common Mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| `ALL_CAPS` constants | Go reserves casing for visibility, not emphasis — use `MixedCaps` (`MaxRetries`) |\n| `GetName()` getter | Go omits `Get` because `user.Name()` reads naturally at call sites. But `Is`\u002F`Has`\u002F`Can` prefixes are kept for boolean predicates: `IsHealthy() bool` not `Healthy() bool` |\n| `Url`, `Http`, `Json` acronyms | Mixed-case acronyms create ambiguity (`HttpsUrl` — is it `Https+Url`?). Use all caps or all lower |\n| `this` or `self` receiver | Go methods are called frequently — use 1-2 letter abbreviation (`s` for `Server`) to reduce visual noise |\n| `util`, `helper` packages | These names say nothing about content — use specific names that describe the abstraction |\n| `http.HTTPClient` stuttering | Package name is always present at call site — `http.Client` avoids reading \"HTTP\" twice |\n| `user.NewUser()` constructor | Single primary type uses `New()` — `user.New()` avoids repeating the type name |\n| `connected bool` field | Bare adjective is ambiguous — use `isConnected` so the field reads as a true\u002Ffalse question |\n| `\"invalid message ID\"` error | Error strings must be fully lowercase including acronyms — `\"invalid message id\"` |\n| `StatusReady` at iota 0 | Zero value should be a sentinel — `StatusUnknown` at 0 catches uninitialized values |\n| `\"not found\"` error string | Sentinel errors should include the package name — `\"mypackage: not found\"` identifies the origin |\n| `userSlice` type-in-name | Types encode implementation detail — `users` describes what it holds, not how |\n| Inconsistent receiver names | Switching names across methods of the same type confuses readers — use one name consistently |\n| `snake_case` identifiers | Underscores conflict with Go's MixedCaps convention and tooling expectations — use `mixedCaps` |\n| Long names for short scopes | Name length should match scope — `i` is fine for a 3-line loop, `userIndex` is noise |\n| Naming constants by value | Values change, roles don't — `DefaultPort` survives a port change, `Port8080` doesn't |\n| `FetchCtx()` context variant | `WithContext` is the standard Go suffix — `FetchWithContext()` is instantly recognizable |\n| `sort()` in-place but no `In` | Readers assume functions return new values. `SortIn()` signals mutation |\n| `parse()` panicking on error | `MustParse()` warns callers that failure panics — surprises belong in the name |\n| Mixing `With*`, `Set*`, `Use*` | Consistency across the codebase — `With*` is the Go convention for functional options |\n| Plural package names | Go convention is singular (`net\u002Furl` not `net\u002Furls`) — keeps import paths consistent |\n| `Wrapf` without `f` suffix | The `f` suffix signals format-string semantics — `Wrapf`, `Errorf` tell callers to pass format args |\n| Unnecessary import aliases | Aliases add cognitive load. Only alias on collision — `mrand \"math\u002Frand\"` |\n| Inconsistent concept names | Using `user`\u002F`account`\u002F`person` for the same concept forces readers to track synonyms — pick one name |\n\n## Enforce with Linters\n\nMany naming convention issues are caught automatically by linters: `revive`, `predeclared`, `misspell`, `errname`. See `samber\u002Fcc-skills-golang@golang-linter` skill for configuration and usage.\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-code-style` skill for broader formatting and style decisions\n- → See `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill for interface naming depth and receiver design\n- → See `samber\u002Fcc-skills-golang@golang-linter` skill for automated enforcement (revive, predeclared, misspell, errname)\n",{"name":5,"license":15,"metadata":44,"description":7,"allowed-tools":47,"compatibility":48,"user-invocable":40},{"author":45,"version":46},"samber","1.1.1","Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent","Designed for Claude Code or similar AI coding agents, and for projects using Golang.","master","b4819add93efbaf4d80627118ec34680406b309b","packages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fusage\u002Fskills\u002Fgolang-naming",1,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats","https:\u002F\u002Fgithub.com\u002Fmuratovv","2026-11-05 20:59:10",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add muratovv\u002Fai-hats --skill golang-naming",{"tool":62,"command":63},"bunx","bunx skills add muratovv\u002Fai-hats --skill golang-naming",{"tool":65,"command":66},"pnpm","pnpm dlx skills add muratovv\u002Fai-hats --skill golang-naming","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fusage\u002Fskills\u002Fgolang-naming\u002FSKILL.md",true,[70,76,81,85,89,93,97,101],{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"evals\u002Fevals.json","REFERENCE","参考文档",27276,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fusage\u002Fskills\u002Fgolang-naming\u002Fevals\u002Fevals.json",{"path":77,"resourceType":77,"resourceTypeDesc":78,"sizeBytes":79,"sourceHtmlUrl":80},"LICENSE","许可证",1070,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fusage\u002Fskills\u002Fgolang-naming\u002FLICENSE",{"path":82,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":83,"sourceHtmlUrl":84},"metadata.yaml",643,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fusage\u002Fskills\u002Fgolang-naming\u002Fmetadata.yaml",{"path":86,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Ffunctions-methods.md",4055,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fusage\u002Fskills\u002Fgolang-naming\u002Freferences\u002Ffunctions-methods.md",{"path":90,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fidentifiers.md",5218,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fusage\u002Fskills\u002Fgolang-naming\u002Freferences\u002Fidentifiers.md",{"path":94,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fpackages-files.md",3049,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fusage\u002Fskills\u002Fgolang-naming\u002Freferences\u002Fpackages-files.md",{"path":98,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Ftesting.md",1263,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fusage\u002Fskills\u002Fgolang-naming\u002Freferences\u002Ftesting.md",{"path":102,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Ftypes-errors.md",4229,"https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fusage\u002Fskills\u002Fgolang-naming\u002Freferences\u002Ftypes-errors.md",[106,133,157,180,204,218],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":39},"01M6PVFB1SM738R2SRSRSF7CY6","tool-evaluation-protocol","Time-bounded protocol for evaluating new tools, libraries, or methodologies before adoption. Use when evaluating a candidate dependency for the project, researching a methodology (e.g. ML\u002FLLM frameworks, testing approaches), or following up on a hype-driven recommendation.","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fusage\u002Fskills\u002Ftool-evaluation-protocol\u002FSKILL.md",[],[113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132],"protocol","Evaluation","tool","tool evaluation protocol","testing","ml","libraries","adoption","methodology","Tools","use","dependency","up","frameworks","time","project","recommendation","for","bounded","candidate",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":39},"01M6PVF7HATBEX1G7N50E2QT57","systematic-debugging","4-phase bug-fix protocol (evidence, pattern, hypothesis, verify). Use when investigating any error, failure, or unexpected behavior, handling bug reports from users or monitoring, or diagnosing test failures with non-obvious causes.","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fusage\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[140,141,142,143,113,144,145,146,147,148,123,149,150,151,152,153,27,154,155,156],"systematic debugging","debugging","systematic","test","monitoring","hypothesis","verify","behavior","fix","evidence","bug","reports","pattern","users","with","bug-fix","phase",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":168,"publishedAt":39},"01M6PVF3MTQN3RPF73AN34856J","skill-template","Canonical template and validation guide for ai-hats skills. Use when creating a new skill, reviewing an existing one for structural compliance, or deciding which pattern fits a new behavior.","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fusage\u002Fskills\u002Fskill-template\u002FSKILL.md",[163],{"categoryNo":164,"categoryName":165,"taxonomyType":166,"taxonomyTypeDesc":167},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[169,170,171,172,173,147,174,123,175,152,176,177,178,130,179],"template","skill template","validation","compliance","hats","guide","new skill","structural","canonical","which","Existing",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":187,"publishedAt":39},"01M6PVF06SCV28QARM5MQPANC9","skill-optimization","Audit and refactor library components to eliminate redundancy and staleness. Use during periodic library maintenance, after adding multiple new skills or rules, when a role's token budget is too high, or after retrospectives identify component issues.","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fusage\u002Fskills\u002Fskill-optimization\u002FSKILL.md",[186],{"categoryNo":164,"categoryName":165,"taxonomyType":166,"taxonomyTypeDesc":167},[188,189,190,191,192,193,194,195,196,197,123,198,199,200,201,202,203],"Optimization","skill optimization","components","component","issues","library","audit","refactor","Budget","Rules","periodic","maintenance","token","token budget","role","high",{"skillNo":205,"name":206,"nameZh":6,"description":207,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":208,"categories":209,"keywords":210,"publishedAt":39},"01M6PVEXM9717016T9MW82HDCT","silent-fallback-gate","PreToolUse hook — refuses an Edit or Write that adds an inert broad except. Use when a Python edit was blocked for a silent fallback.","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fusage\u002Fskills\u002Fsilent-fallback-gate\u002FSKILL.md",[],[211,212,213,214,215,216,123,217,130],"gate","fallback","silent fallback gate","python","write","edit","hook",{"skillNo":219,"name":220,"nameZh":6,"description":221,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":222,"categories":223,"keywords":225,"publishedAt":39},"01M6PVESM49C5NT7SB7N3F76VS","retro-to-framework","Convert an observation about agent behavior — from a retrospective or from a single incident — into a framework-level change (hook, rule, skill, skill update). Use after a retrospective identifies problems that are not project-specific, after an incident where an agent misapplied a component it had read, when CLAUDE.md band-aids accumulate (more than 3 per-project rules that could be generic), or when the same problem recurs across multiple projects.","https:\u002F\u002Fgithub.com\u002Fmuratovv\u002Fai-hats\u002Fblob\u002Fmaster\u002Fpackages\u002Fai-hats-library\u002Fsrc\u002Fai_hats_library\u002Fexperimental\u002Fusage\u002Fskills\u002Fretro-to-framework\u002FSKILL.md",[224],{"categoryNo":164,"categoryName":165,"taxonomyType":166,"taxonomyTypeDesc":167},[226,227,228,229,191,230,33,231,197,147,123,232,233,128,234,235,236,237,238,239],"framework","retro","retro to framework","change","retrospective","convert","incident","across","problem","about","more","skill update","single","generic"]