[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CFK09ZFB1C4QR8T2069BX0":3,"skill-same:01M6CFK09ZFB1C4QR8T2069BX0":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":59,"commitSha":60,"skillDirectory":61,"forksCount":62,"repositoryHtmlUrl":63,"repositoryHomepageUrl":6,"ownerHtmlUrl":64,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":65,"install":66,"resources":78},"01M6CFK09ZFB1C4QR8T2069BX0","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.","rockcookies\u002Fskills","rockcookies","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3498265?v=4","01M6CF9C16X3SDSKZX6ANH7HQM","Jacob He","01M6CF9C53JP821FCW6R9B00AJ",1,"MIT","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\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","package","do","functions","general","use","decisions","projects","refactoring","Bash","writing","harness","best practices","code","lint","packages","test","codex","github","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, getters\u002Fsetters,\n  functional options, acronyms, test functions, and subtest names. Use this\n  skill when writing new Go code, reviewing or refactoring, choosing between\n  naming alternatives (New vs NewTypeName, isConnected vs connected, ErrNotFound\n  vs NotFoundError, StatusReady vs StatusUnknown at iota 0), debating Go package\n  names (utils\u002Fhelpers anti-patterns), or asking about Go naming best practices.\n  Also trigger when the user mentions MixedCaps vs snake_case, ALL_CAPS\n  constants, Get-prefix on getters, or error string casing. Do NOT use for\n  general Go implementation questions that don't involve naming decisions.\nuser-invocable: true\nlicense: MIT\ncompatibility: >-\n  Designed for Claude Code, Codex or similar harness, and for projects using\n  Golang.\nmetadata:\n  author: samber\n  version: 1.2.0\n  openclaw:\n    emoji: ?\n    homepage: https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang\n    requires:\n      bins:\n        - go\n    install: []\nallowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent\npaths:\n  - '**\u002F*.go'\n---\n\n> **Community default.** A company skill that explicitly supersedes `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, \\_test suffix OK for test files | `json`, `http`, `tabwriter`, `http_test` |\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\nApplying these fixes means renaming existing identifiers — → See `golang-gopls` skill to do it safely: its rename updates every call site across the workspace and refuses a rename that would break interface satisfaction, which a grep\u002Fsed or manual Edit-based rename silently misses.\n\n## Enforce with Linters\n\nMany naming convention issues are caught automatically by linters: `revive`, `predeclared`, `misspell`, `errname`. See `golang-lint` skill for configuration and usage.\n\n## Cross-References\n\n- → See `golang-code-style` skill for broader formatting and style decisions\n- → See `golang-structs-interfaces` skill for interface naming depth and receiver design\n- → See `golang-lint` skill for automated enforcement (revive, predeclared, misspell, errname)\n- → See `golang-gopls` skill for safe rename when applying a naming fix\n- → See `golang-refactoring` skill for how to apply a rename safely at scale (gopls Rename\u002FInline, blast-radius mapping, staged PR workflow) once you've decided what to rename identifiers to\n","> **Community default.** A company skill that explicitly supersedes `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, \\_test suffix OK for test files | `json`, `http`, `tabwriter`, `http_test` |\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\nApplying these fixes means renaming existing identifiers — → See `golang-gopls` skill to do it safely: its rename updates every call site across the workspace and refuses a rename that would break interface satisfaction, which a grep\u002Fsed or manual Edit-based rename silently misses.\n\n## Enforce with Linters\n\nMany naming convention issues are caught automatically by linters: `revive`, `predeclared`, `misspell`, `errname`. See `golang-lint` skill for configuration and usage.\n\n## Cross-References\n\n- → See `golang-code-style` skill for broader formatting and style decisions\n- → See `golang-structs-interfaces` skill for interface naming depth and receiver design\n- → See `golang-lint` skill for automated enforcement (revive, predeclared, misspell, errname)\n- → See `golang-gopls` skill for safe rename when applying a naming fix\n- → See `golang-refactoring` skill for how to apply a rename safely at scale (gopls Rename\u002FInline, blast-radius mapping, staged PR workflow) once you've decided what to rename identifiers to\n",{"name":5,"paths":44,"license":15,"metadata":46,"description":7,"allowed-tools":56,"compatibility":57,"user-invocable":58},[45],"**\u002F*.go",{"author":47,"version":48,"openclaw":49},"samber","1.2.0",{"emoji":50,"install":51,"homepage":52,"requires":53},"?",[],"https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":54},[55],"go","Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent","Designed for Claude Code, Codex or similar harness, and for projects using Golang.",true,"main","c349be0704bffe54a7191d1412faf564b08983ca","skills\u002Fsamber-golang\u002Fgolang-naming",0,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills","https:\u002F\u002Fgithub.com\u002Frockcookies","2026-11-12 14:42:52",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":58},[68,71,74],{"tool":69,"command":70},"npx","npx skills add rockcookies\u002Fskills --skill golang-naming",{"tool":72,"command":73},"bunx","bunx skills add rockcookies\u002Fskills --skill golang-naming",{"tool":75,"command":76},"pnpm","pnpm dlx skills add rockcookies\u002Fskills --skill golang-naming","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-naming\u002FSKILL.md",[79,85,89,93,97,101],{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"evals\u002Fevals.json","REFERENCE","参考文档",28703,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-naming\u002Fevals\u002Fevals.json",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Ffunctions-methods.md",4055,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-naming\u002Freferences\u002Ffunctions-methods.md",{"path":90,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fidentifiers.md",5218,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-naming\u002Freferences\u002Fidentifiers.md",{"path":94,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fpackages-files.md",3049,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-naming\u002Freferences\u002Fpackages-files.md",{"path":98,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Ftesting.md",1263,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-naming\u002Freferences\u002Ftesting.md",{"path":102,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":103,"sourceHtmlUrl":104},"references\u002Ftypes-errors.md",4229,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-naming\u002Freferences\u002Ftypes-errors.md",[106,137,160,181,205,220],{"skillNo":107,"name":108,"nameZh":109,"description":110,"descriptionZh":111,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":125,"publishedAt":136},"01M6CFPKHRH0GD3W2GTGWE9WGP","kami","Kami 专业文档排版","Typeset professional documents with Kami templates: resumes, one-pagers, white papers, letters, portfolios, and slide decks. Use when asked to 做 PDF \u002F 排版 \u002F 简历 \u002F 一页纸 \u002F PPT \u002F slides, or to create a Kami landing page. Not for auditing or restyling an existing product site.","使用 Kami 模板排版专业文档：简历、一页纸、白皮书、信件、作品集和幻灯片。当用户要求做 PDF \u002F 排版 \u002F 简历 \u002F 一页纸 \u002F PPT \u002F slides，或创建 Kami 落地页时使用。不适用于审查或重新设计现有产品网站。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftw93-kami\u002Fkami\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Ftw93-kami\u002Fkami\u002FSKILL.md",[115,120],{"categoryNo":116,"categoryName":117,"taxonomyType":118,"taxonomyTypeDesc":119},"01M8BQ6TK1MPB82068236GSXDE","文档处理","SCENARIO","使用场景",{"categoryNo":121,"categoryName":122,"taxonomyType":123,"taxonomyTypeDesc":124},"01M8C55A3R2M9C8CAKG3W16HTA","内容创作者","PROFESSION","适用职业",[108,126,127,128,129,130,131,132,133,134,25,135],"create","PDF","pptx","slides","product","page","landing","templates","site","documents","2026-11-12 13:55:43",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":39},"01M6WMNKD3Y4H9FGM8Q901F507","hierarchical-agents-md","层级 AGENTS.md \u002F README.md：init、update、audit、reorganize、trim。 初始化 Agent 指令、代码改动后同步文档、检查文档漂移、重组仓库文档层级、精简规则与 Skills。 Not for 写业务代码或生成文档站点。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcustom\u002Fhierarchical-agents-md\u002FSKILL.md",[],[144,145,35,146,147,148,149,150,151,152,153,154,155,156,157,158,159],"hierarchical agents md","agents md","change","maintenance","初始化","audit","for","README","update","python","init","git","true","party","third-party","文档",{"skillNo":161,"name":162,"nameZh":163,"description":164,"descriptionZh":165,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":174,"publishedAt":39},"01M6CFS6BRTQPFZCDHQP97HYXR","vueuse-functions","VueUse 组合式函数应用","Apply VueUse composables where appropriate to build concise, maintainable Vue.js \u002F Nuxt features.","在合适的地方应用 VueUse 组合式函数（composables），以构建简洁、可维护的 Vue.js \u002F Nuxt 功能。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvueuse\u002Fvueuse-functions\u002FSKILL.md",[168,171],{"categoryNo":169,"categoryName":170,"taxonomyType":123,"taxonomyTypeDesc":124},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",{"categoryNo":172,"categoryName":173,"taxonomyType":118,"taxonomyTypeDesc":119},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[175,23,176,177,178,179,38,180],"vueuse functions","nuxt","https","vue","build","js",{"skillNo":182,"name":183,"nameZh":184,"description":185,"descriptionZh":186,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":195,"publishedAt":39},"01M6CFS34MDQXZPAWQFE5D7VGT","vue-testing-best-practices","Vue.js 测试最佳实践","Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.","用于 Vue.js 测试。涵盖 Vitest、Vue Test Utils、组件测试、模拟（mocking）、测试模式，以及用于 E2E 测试的 Playwright。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-testing-best-practices\u002FSKILL.md",[189,192],{"categoryNo":190,"categoryName":191,"taxonomyType":123,"taxonomyTypeDesc":124},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":193,"categoryName":194,"taxonomyType":118,"taxonomyTypeDesc":119},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[196,197,198,178,32,180,199,200,25,36,201,202,38,203,204],"vue testing best practices","testing","testing best practices","e2e testing","playwright","testing patterns","component","vitest","e2e",{"skillNo":206,"name":207,"nameZh":208,"description":209,"descriptionZh":210,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":211,"categories":212,"keywords":215,"publishedAt":39},"01M6CFS0N19MSJNTVM9AEQ7Z73","vue-router-best-practices","Vue Router 路由最佳实践","Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.","Vue Router 4 模式、导航守卫、路由参数以及路由与组件生命周期的交互。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-router-best-practices\u002FSKILL.md",[213,214],{"categoryNo":169,"categoryName":170,"taxonomyType":123,"taxonomyTypeDesc":124},{"categoryNo":172,"categoryName":173,"taxonomyType":118,"taxonomyTypeDesc":119},[32,216,178,217,202,38,218,219],"vue router best practices","router","navigation","lifecycle",{"skillNo":221,"name":222,"nameZh":223,"description":224,"descriptionZh":225,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":226,"categories":227,"keywords":230,"publishedAt":39},"01M6CFRYN31RFQFTE41Z6DCGKE","vue-pinia-best-practices","Pinia 状态管理最佳实践","Pinia stores, state management patterns, store setup, and reactivity with stores.","Pinia store、状态管理模式、store 配置以及 store 的响应式处理。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-pinia-best-practices\u002FSKILL.md",[228,229],{"categoryNo":169,"categoryName":170,"taxonomyType":123,"taxonomyTypeDesc":124},{"categoryNo":172,"categoryName":173,"taxonomyType":118,"taxonomyTypeDesc":119},[231,32,178,232,38,233,234,235,236],"vue pinia best practices","pinia","state","state management","management","setup"]