[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75XP9066ZBBM4THV2GZ67PJ":3,"skill-same:01M75XP9066ZBBM4THV2GZ67PJ":83},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":14,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":56},"01M75XP9066ZBBM4THV2GZ67PJ","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.","sushichan044\u002Fgo-cli-sub-command-completion","sushichan044","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F71284054?v=4","01M6CD61CFDCQYW4XTQ1CF5200","Kentaro Suzuki","01M75XMZ4B4C4XMZA1WKDQQBFK",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-naming\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: golang-naming\ndescription: \"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.\"\nuser-invocable: true\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\"\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\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, \\_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\n## Enforce with Linters\n\nMany naming convention issues are caught automatically by linters: `revive`, `predeclared`, `misspell`, `errname`. See `samber\u002Fcc-skills-golang@golang-lint` 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-lint` 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, \\_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\n## Enforce with Linters\n\nMany naming convention issues are caught automatically by linters: `revive`, `predeclared`, `misspell`, `errname`. See `samber\u002Fcc-skills-golang@golang-lint` 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-lint` skill for automated enforcement (revive, predeclared, misspell, errname)\n",{"name":5,"license":15,"metadata":24,"description":7,"allowed-tools":34,"compatibility":35,"user-invocable":36},{"author":25,"version":26,"openclaw":27},"samber","1.1.1",{"emoji":28,"install":29,"homepage":30,"requires":31},"🏷",[],"https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":32},[33],"go","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.",true,"main","5bd2e2880509d8934a47694565489e55d58d3040",".agents\u002Fskills\u002Fgolang-naming","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion","https:\u002F\u002Fgithub.com\u002Fsushichan044","A software engineer with a passion for novels and music.","2026-06-19 12:37:01",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":36},[46,49,52],{"tool":47,"command":48},"npx","npx skills add sushichan044\u002Fgo-cli-sub-command-completion --skill golang-naming",{"tool":50,"command":51},"bunx","bunx skills add sushichan044\u002Fgo-cli-sub-command-completion --skill golang-naming",{"tool":53,"command":54},"pnpm","pnpm dlx skills add sushichan044\u002Fgo-cli-sub-command-completion --skill golang-naming","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-naming\u002FSKILL.md",[57,63,67,71,75,79],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"evals\u002Fevals.json","REFERENCE","参考文档",28703,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-naming\u002Fevals\u002Fevals.json",{"path":64,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Ffunctions-methods.md",4055,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-naming\u002Freferences\u002Ffunctions-methods.md",{"path":68,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fidentifiers.md",5218,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-naming\u002Freferences\u002Fidentifiers.md",{"path":72,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fpackages-files.md",3049,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-naming\u002Freferences\u002Fpackages-files.md",{"path":76,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Ftesting.md",1263,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-naming\u002Freferences\u002Ftesting.md",{"path":80,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Ftypes-errors.md",4229,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-naming\u002Freferences\u002Ftypes-errors.md",[84,91,98,105,112,119],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M75XQZ90ZTFP09ZH20ZHGG5G","golang-troubleshooting","Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve debugger, race detection, GODEBUG tracing, and production debugging. Start here for any 'something is wrong' situation. Not for interpreting profiles or benchmarking (→ See `samber\u002Fcc-skills-golang@golang-benchmark` skill) or applying optimization patterns (→ See `samber\u002Fcc-skills-golang@golang-performance` skill).","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-troubleshooting\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M75XQS47M7BEJHGDBYB80GV7","golang-testing","Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI, or debugging flaky\u002Fslow tests. For testify-specific APIs see `samber\u002Fcc-skills-golang@golang-stretchr-testify`; for measurement methodology see `samber\u002Fcc-skills-golang@golang-benchmark`.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-testing\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M75XQJ26PB3HX3BE2Y9PQTRH","golang-structs-interfaces","Golang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers. Use this skill when designing Go types, defining or implementing interfaces, embedding structs or interfaces, writing type assertions or type switches, adding struct field tags for JSON\u002FYAML\u002FDB serialization, or choosing between pointer and value receivers. Also use when the user asks about \"accept interfaces, return structs\", compile-time interface checks, or composing small interfaces into larger ones.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-structs-interfaces\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M75XQDAYJ2CBD5TRWY1P9CXA","golang-stretchr-testify","Comprehensive guide to stretchr\u002Ftestify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification, suite lifecycle, and advanced patterns like Eventually, JSONEq, and custom matchers. Apply when the codebase imports github.com\u002Fstretchr\u002Ftestify.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-stretchr-testify\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M75XQ7S4862T0RMNYP9P468F","golang-spf13-cobra","Golang CLI command tree library using spf13\u002Fcobra — cobra.Command, RunE vs Run, PersistentPreRunE hook chain, Args validators (NoArgs, ExactArgs, MatchAll, custom), persistent vs local flags, command groups, ValidArgsFunction, RegisterFlagCompletionFunc, ShellCompDirective, usage\u002Fhelp template customization, man-page and markdown doc generation, and testing with SetArgs\u002FSetOut\u002FSetErr. Apply when using or adopting spf13\u002Fcobra, or when the codebase imports `github.com\u002Fspf13\u002Fcobra`. For configuration layering alongside cobra, see the `samber\u002Fcc-skills-golang@golang-spf13-viper` skill. For general CLI architecture (project layout, exit codes, signal handling, I\u002FO patterns), see `samber\u002Fcc-skills-golang@golang-cli`.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-spf13-cobra\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M75XQ289794Z4EVRBJCGM80V","golang-security","Security best practices and vulnerability prevention for Golang. Covers injection (SQL, command, XSS), cryptography, filesystem safety, network security, cookies, secrets management, memory safety, and logging. Apply when writing, reviewing, or auditing Go code for security, or when working on any risky code involving crypto, I\u002FO, secrets management, user input handling, or authentication. Includes configuration of security tools.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fgo-cli-sub-command-completion\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-security\u002FSKILL.md",[],[]]