[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76H770V72WJSAG8FKTP40B3":3,"skill-same:01M76H770V72WJSAG8FKTP40B3":68},{"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":39,"commitSha":40,"skillDirectory":41,"forksCount":42,"repositoryHtmlUrl":43,"repositoryHomepageUrl":44,"ownerHtmlUrl":45,"ownerBlogUrl":46,"ownerDescription":47,"updatedAt":48,"install":49,"resources":61},"01M76H770V72WJSAG8FKTP40B3","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.","bg-szy\u002FTOP-SKILLS","bg-szy","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F106576190?v=4","01M73A4E8KPV67SFXRY8XZGNBX","ShuZhiyong","01M73A4E96MQ294MHM74TZBVQD",6,"MIT","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\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, Codex or similar harness, and for projects using Golang.\nmetadata:\n  author: samber\n  version: \"1.2.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\npaths:\n  - \"**\u002F*.go\"\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\nApplying these fixes means renaming existing identifiers — → See `samber\u002Fcc-skills-golang@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 `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- → See `samber\u002Fcc-skills-golang@golang-gopls` skill for safe rename when applying a naming fix\n- → See `samber\u002Fcc-skills-golang@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 `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\nApplying these fixes means renaming existing identifiers — → See `samber\u002Fcc-skills-golang@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 `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- → See `samber\u002Fcc-skills-golang@golang-gopls` skill for safe rename when applying a naming fix\n- → See `samber\u002Fcc-skills-golang@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":24,"license":15,"metadata":26,"description":7,"allowed-tools":36,"compatibility":37,"user-invocable":38},[25],"**\u002F*.go",{"author":27,"version":28,"openclaw":29},"samber","1.2.1",{"emoji":30,"install":31,"homepage":32,"requires":33},"🏷",[],"https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":34},[35],"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,"master","fd76f882a04e445e899d5cfb2732f2105ea054ee","skills\u002Fmarketplace\u002Fgolang-naming",0,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS","https:\u002F\u002Fbg-szy.github.io\u002FTOP-SKILLS\u002F","https:\u002F\u002Fgithub.com\u002Fbg-szy","https:\u002F\u002Fwww.ecust.edu.cn\u002F","a student of East China University of Science and Technology","2026-11-15 03:38:02",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":38},[51,54,57],{"tool":52,"command":53},"npx","npx skills add bg-szy\u002FTOP-SKILLS --skill golang-naming",{"tool":55,"command":56},"bunx","bunx skills add bg-szy\u002FTOP-SKILLS --skill golang-naming",{"tool":58,"command":59},"pnpm","pnpm dlx skills add bg-szy\u002FTOP-SKILLS --skill golang-naming","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fgolang-naming\u002FSKILL.md",[62],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"skill-report.json","REFERENCE","参考文档",105620,"https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fgolang-naming\u002Fskill-report.json",[69,77,84,91,98,105],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":76},"01M7DXW9N826PKXK174PVW3038","serpmaven","Scrape Google search results (SERP) to JSON with SERP Maven (serpmaven) - a real Chrome browser on a residential proxy with sticky sessions. Run it as a CLI, a Python library, a local HTTP search API (`serve`), an MCP server or a Docker image; set the proxy login, workers, pages and cost tracking. Use when the user wants Google results, rank tracking, a self-hosted SERP API, or live Google search for an AI agent.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fserpmaven\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":76},"01M7DXVHSTWDV65475QEQ915M7","revnu-landing-page-audit","Find out why a landing page isn't turning visitors into signups, demos or sales. Audits one page against what the ad, post or search that sends people there promised, then checks the first screen, proof, call to action, friction and mobile. Returns at most 7 prioritized fixes, plus what is fine and what could not be checked; rewrites specific lines and fixes the page in the repo when asked. Never promises a conversion lift. Works without a Revnu account. Use when the user says or asks: \"audit my landing page\", \"why isn't this page converting\", \"review my homepage\", \"my ads get clicks but no signups\", \"people bounce from the pricing page\", \"CRO review\", \"improve conversion rate\", \"is my hero section clear\", \"roast my landing page\", \"rewrite my headline\", \"what's wrong with this page\", \"landing page feedback\", \"make the signup page convert better\". Not for SEO or AI-search audits, page speed engineering on its own, or building a new page from scratch.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-landing-page-audit\u002FSKILL.md",[],[],{"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":76},"01M7DXV8X2D7B3VTD4HHYYHTGR","revnu-growth-context","Write down once who buys, what they're stuck on, what it costs, what proof you have and what you've already tried, so every growth task starts from facts instead of a questionnaire. Creates or updates .agents\u002Frevnu-growth.md from the repo, the live site and the user, and imports an existing product-marketing.md. Use when the user says \"set up our marketing context\", \"who is our ideal customer\", \"write our ICP\", \"describe the product for marketing\", \"positioning doc\", \"what's our brand voice\", \"remember this about our customers\", \"log what we tried\", \"what have we learned from marketing\", \"we changed pricing, update the context\", \"update our growth notes\", \"summarize the business for the agent\", \"import my product-marketing.md\", \"start a growth doc\", or before a first marketing, SEO, outreach or launch task when no context file exists. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-growth-context\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":76},"01M7DXV0DGJ1G0A60PAHC6J3C5","revnu-get-listed","Get onto the third-party pages AI answers and search cite when buyers ask for the best tool in your category: \"best X\" roundups, directories, review sites, GitHub awesome lists, community threads and comparison pages. Finds which ones are cited, ranks them by fit and effort, and drafts each submission, PR or pitch by the target's own rules. Use when the user says \"get us listed\", \"which directories should we submit to\", \"how do we get into best-of lists\", \"why does ChatGPT recommend competitors and not us\", \"get mentioned in AI answers\", \"submit to awesome lists\", \"get on G2\", \"where are our competitors listed\", \"pitch listicle authors\", \"find backlink opportunities\", \"launch directories\", \"get into roundups\", \"Product Hunt alternatives\", \"where should we be listed\", \"get cited by Perplexity\". Never submits, pays or posts without a yes. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-get-listed\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":76},"01M7DXTSPMGT9D6DSS0HP9BSTA","revnu-ai-readiness-audit","Audit whether your website gives ChatGPT, Perplexity, Claude, Gemini and Google's AI Overviews something worth quoting, and fix the pages that don't. Use when the user says or asks \"is my site ready for AI search\", \"audit my site for AI answers\", \"AEO audit\", \"GEO audit\", \"why doesn't ChatGPT quote our pricing\", \"make our pages citable by AI\", \"do I need llms.txt\", \"does schema help with ChatGPT\", \"check our structured data\", \"is our content visible without JavaScript\", \"AI SEO audit\", \"optimize our homepage for AI answers\", \"LLM SEO check\", \"why does AI get our product wrong\", \"fix our site for AI Overviews\". Checks fetchability and indexability, answers in the raw HTML, entity facts, schema (including JS-injected markup), headings, dates and llms.txt, then gives at most 10 prioritised fixes and edits the repo when asked. Works without a Revnu account.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Frevnu-ai-readiness-audit\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":76},"01M7DXSZHCVTRS620GC3S97JZV","proxy-troubleshooting","Diagnose residential proxy failures, with NodeMaven's gateway as the reference - 407 with correct credentials, 406, 410, 500, a connection that hangs, ERR_TUNNEL_CONNECTION_FAILED in a browser, Playwright or Puppeteer ignoring proxy credentials, a sticky session that changes IP, geo-targeting that is silently ignored, passwords with special characters, and unexpected traffic from headless Chrome. Use when a proxy connection fails, returns the wrong location, or costs more traffic than expected.","https:\u002F\u002Fgithub.com\u002Fbg-szy\u002FTOP-SKILLS\u002Fblob\u002Fmaster\u002Fskills\u002Fmarketplace\u002Fproxy-troubleshooting\u002FSKILL.md",[],[]]