[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M785D0AVGJVVGT216Y6FSETG":3,"skill-same:01M785D0AVGJVVGT216Y6FSETG":69},{"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":14,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":58},"01M785D0AVGJVVGT216Y6FSETG","golang-code-style",null,"Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments help vs hurt. Use when writing or reviewing Go code, asking about style or clarity, or establishing project coding standards. Not for naming conventions (→ See `samber\u002Fcc-skills-golang@golang-naming` skill), linter configuration (→ See `samber\u002Fcc-skills-golang@golang-lint` skill), or doc comments (→ See `samber\u002Fcc-skills-golang@golang-documentation` skill).","gn00678465\u002Fapm-go","gn00678465","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F37042723?v=4","01M785CK18TS9AF7G28E00EYXZ","MADAO","01M785CK28RVWVYNVMJNJ48CQ7",0,"MIT","https:\u002F\u002Fgithub.com\u002Fgn00678465\u002Fapm-go\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-code-style\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: golang-code-style\ndescription: \"Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments help vs hurt. Use when writing or reviewing Go code, asking about style or clarity, or establishing project coding standards. Not for naming conventions (→ See `samber\u002Fcc-skills-golang@golang-naming` skill), linter configuration (→ See `samber\u002Fcc-skills-golang@golang-lint` skill), or doc comments (→ See `samber\u002Fcc-skills-golang@golang-documentation` skill).\"\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.3.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**Orchestration mode:** Fan out the sub-agents described in the \"Parallelizing Code Style Reviews\" section, each covering an independent style concern, when reviewing code style across a large codebase, and merge their findings. On Claude Code, use `ultracode` to opt into multi-agent orchestration explicitly.\n\n> **Community default.** A company skill that explicitly supersedes `samber\u002Fcc-skills-golang@golang-code-style` skill takes precedence.\n\n# Go Code Style\n\nStyle rules that require human judgment — linters handle formatting, this skill handles clarity. For naming see `samber\u002Fcc-skills-golang@golang-naming` skill; for design patterns see `samber\u002Fcc-skills-golang@golang-design-patterns` skill; for struct\u002Finterface design see `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill.\n\n> \"Clear is better than clever.\" — Go Proverbs\n\nWhen ignoring a rule, add a comment to the code.\n\n## Line Length & Breaking\n\nNo rigid line limit, but lines beyond ~120 characters MUST be broken. Break at **semantic boundaries**, not arbitrary column counts. Function calls with 4+ arguments MUST use one argument per line — even when the prompt asks for single-line code:\n\n```go\n\u002F\u002F Good — each argument on its own line, closing paren separate\nmux.HandleFunc(\"\u002Fapi\u002Fusers\", func(w http.ResponseWriter, r *http.Request) {\n    handleUsers(\n        w,\n        r,\n        serviceName,\n        cfg,\n        logger,\n        authMiddleware,\n    )\n})\n```\n\nWhen a function signature is too long, the real fix is often **fewer parameters** (use an options struct) rather than better line wrapping. For multi-line signatures, put each parameter on its own line.\n\n## Variable Declarations\n\nSHOULD use `:=` for non-zero values, `var` for zero-value initialization. The form signals intent: `var` means \"this starts at zero.\"\n\n```go\nvar count int              \u002F\u002F zero value, set later\nname := \"default\"          \u002F\u002F non-zero, := is appropriate\nvar buf bytes.Buffer       \u002F\u002F zero value is ready to use\n```\n\n### Slice & Map Initialization\n\nSlices and maps MUST be initialized explicitly, never nil. Nil maps panic on write; nil slices serialize to `null` in JSON (vs `[]` for empty slices), surprising API consumers.\n\n```go\nusers := []User{}                       \u002F\u002F always initialized\nm := map[string]int{}                   \u002F\u002F always initialized\nusers := make([]User, 0, len(ids))      \u002F\u002F preallocate when capacity is known\nm := make(map[string]int, len(items))   \u002F\u002F preallocate when size is known\n```\n\nDo not preallocate speculatively — `make([]T, 0, 1000)` wastes memory when the common case is 10 items.\n\n### Composite Literals\n\nComposite literals MUST use field names — positional fields break when the type adds or reorders fields:\n\n```go\nsrv := &http.Server{\n    Addr:         \":8080\",\n    ReadTimeout:  5 * time.Second,\n    WriteTimeout: 10 * time.Second,\n}\n```\n\n## Control Flow\n\n### Reduce Nesting\n\nErrors and edge cases MUST be handled first (early return). Keep the happy path at minimal indentation:\n\n```go\nfunc process(data []byte) (*Result, error) {\n    if len(data) == 0 {\n        return nil, errors.New(\"empty data\")\n    }\n\n    parsed, err := parse(data)\n    if err != nil {\n        return nil, fmt.Errorf(\"parsing: %w\", err)\n    }\n\n    return transform(parsed), nil\n}\n```\n\n### Eliminate Unnecessary `else`\n\nWhen the `if` body ends with `return`\u002F`break`\u002F`continue`, the `else` MUST be dropped. Use default-then-override for simple assignments — assign a default, then override with independent conditions or a `switch`:\n\n```go\n\u002F\u002F Good — default-then-override with switch (cleanest for mutually exclusive overrides)\nlevel := slog.LevelInfo\nswitch {\ncase debug:\n    level = slog.LevelDebug\ncase verbose:\n    level = slog.LevelWarn\n}\n\n\u002F\u002F Bad — else-if chain hides that there's a default\nif debug {\n    level = slog.LevelDebug\n} else if verbose {\n    level = slog.LevelWarn\n} else {\n    level = slog.LevelInfo\n}\n```\n\n### Complex Conditions & Init Scope\n\nWhen an `if` condition has 3+ operands, MUST extract into named booleans — a wall of `||` is unreadable and hides business logic. Keep expensive checks inline for short-circuit benefit. [Details](.\u002Freferences\u002Fdetails.md)\n\n```go\n\u002F\u002F Good — named booleans make intent clear\nisAdmin := user.Role == RoleAdmin\nisOwner := resource.OwnerID == user.ID\nisPublicVerified := resource.IsPublic && user.IsVerified\nif isAdmin || isOwner || isPublicVerified || permissions.Contains(PermOverride) {\n    allow()\n}\n```\n\nScope variables to `if` blocks when only needed for the check:\n\n```go\nif err := validate(input); err != nil {\n    return err\n}\n```\n\n### Switch Over If-Else Chains\n\nWhen comparing the same variable multiple times, prefer `switch`:\n\n```go\nswitch status {\ncase StatusActive:\n    activate()\ncase StatusInactive:\n    deactivate()\ndefault:\n    panic(fmt.Sprintf(\"unexpected status: %d\", status))\n}\n```\n\n## Function Design\n\n- Functions SHOULD be **short and focused** — one function, one job.\n- Functions SHOULD have **≤4 parameters**. Beyond that, use an options struct (see `samber\u002Fcc-skills-golang@golang-design-patterns` skill).\n- **Parameter order**: `context.Context` first, then inputs, then output destinations.\n- Naked returns help in very short functions (1-3 lines) where return values are obvious, but become confusing when readers must scroll to find what's returned — name returns explicitly in longer functions.\n\n```go\nfunc FetchUser(ctx context.Context, id string) (*User, error)\nfunc SendEmail(ctx context.Context, msg EmailMessage) error  \u002F\u002F grouped into struct\n```\n\n### Prefer `range` for Iteration\n\nSHOULD use `range` over index-based loops. Use `range n` (Go 1.22+) for simple counting.\n\n```go\nfor _, user := range users {\n    process(user)\n}\n```\n\n## Value vs Pointer Arguments\n\nPass small types (`string`, `int`, `bool`, `time.Time`) by value. Use pointers when mutating, for large structs (~128+ bytes), or when nil is meaningful. [Details](.\u002Freferences\u002Fdetails.md)\n\n## Code Organization Within Files\n\n- **Group related declarations**: type, constructor, methods together\n- **Order**: package doc, imports, constants, types, constructors, methods, helpers\n- **One primary type per file** when it has significant methods\n- **Blank imports** (`_ \"pkg\"`) register side effects (init functions). Restricting them to `main` and test packages makes side effects visible at the application root, not hidden in library code\n- **Dot imports** pollute the namespace and make it impossible to tell where a name comes from — never use in library code\n- **Unexport aggressively** — you can always export later; unexporting is a breaking change. → See `samber\u002Fcc-skills-golang@golang-gopls` skill to unexport safely — its rename updates every call site atomically and refuses the change when lowercasing a method would break interface satisfaction, a breakage grep\u002Fsed silently ships.\n\n## String Handling\n\nUse `strconv` for simple conversions (faster), `fmt.Sprintf` for complex formatting. Use `%q` in error messages to make string boundaries visible. Use `strings.Builder` for loops, `+` for simple concatenation.\n\n## Type Conversions\n\nPrefer explicit, narrow conversions. Use generics over `any` when a concrete type will do:\n\n```go\nfunc Contains[T comparable](slice []T, target T) bool  \u002F\u002F not []any\n```\n\n## Philosophy\n\n- **\"A little copying is better than a little dependency\"**\n- **Use `slices` and `maps` standard packages**; for filter\u002Fgroup-by\u002Fchunk, use `github.com\u002Fsamber\u002Flo`\n- **\"Reflection is never clear\"** — avoid `reflect` unless necessary\n- **Don't abstract prematurely** — extract when the pattern is stable\n- **Minimize public surface** — every exported name is a commitment\n\n## Parallelizing Code Style Reviews\n\nWhen reviewing code style across a large codebase, use up to 5 parallel sub-agents, each targeting an independent style concern (e.g. control flow, function design, variable declarations, string handling, code organization).\n\n## Enforce with Linters\n\nMany rules are enforced automatically: `gofmt`, `gofumpt`, `goimports`, `gocritic`, `revive`, `wsl_v5`. → See the `samber\u002Fcc-skills-golang@golang-lint` skill.\n\n## Cross-References\n\n- → See the `samber\u002Fcc-skills-golang@golang-naming` skill for identifier naming conventions\n- → See the `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill for pointer vs value receivers, interface design\n- → See the `samber\u002Fcc-skills-golang@golang-design-patterns` skill for functional options, builders, constructors\n- → See the `samber\u002Fcc-skills-golang@golang-lint` skill for automated formatting enforcement\n- → See `samber\u002Fcc-skills-golang@golang-continuous-integration` skill for automated AI-driven code review in CI using these guidelines\n- → See `samber\u002Fcc-skills-golang@golang-refactoring` skill for mechanically applying guard-clause conversion, function extraction, and options-struct migration safely across many call sites once a review surfaces violations at scale\n","**Orchestration mode:** Fan out the sub-agents described in the \"Parallelizing Code Style Reviews\" section, each covering an independent style concern, when reviewing code style across a large codebase, and merge their findings. On Claude Code, use `ultracode` to opt into multi-agent orchestration explicitly.\n\n> **Community default.** A company skill that explicitly supersedes `samber\u002Fcc-skills-golang@golang-code-style` skill takes precedence.\n\n# Go Code Style\n\nStyle rules that require human judgment — linters handle formatting, this skill handles clarity. For naming see `samber\u002Fcc-skills-golang@golang-naming` skill; for design patterns see `samber\u002Fcc-skills-golang@golang-design-patterns` skill; for struct\u002Finterface design see `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill.\n\n> \"Clear is better than clever.\" — Go Proverbs\n\nWhen ignoring a rule, add a comment to the code.\n\n## Line Length & Breaking\n\nNo rigid line limit, but lines beyond ~120 characters MUST be broken. Break at **semantic boundaries**, not arbitrary column counts. Function calls with 4+ arguments MUST use one argument per line — even when the prompt asks for single-line code:\n\n```go\n\u002F\u002F Good — each argument on its own line, closing paren separate\nmux.HandleFunc(\"\u002Fapi\u002Fusers\", func(w http.ResponseWriter, r *http.Request) {\n    handleUsers(\n        w,\n        r,\n        serviceName,\n        cfg,\n        logger,\n        authMiddleware,\n    )\n})\n```\n\nWhen a function signature is too long, the real fix is often **fewer parameters** (use an options struct) rather than better line wrapping. For multi-line signatures, put each parameter on its own line.\n\n## Variable Declarations\n\nSHOULD use `:=` for non-zero values, `var` for zero-value initialization. The form signals intent: `var` means \"this starts at zero.\"\n\n```go\nvar count int              \u002F\u002F zero value, set later\nname := \"default\"          \u002F\u002F non-zero, := is appropriate\nvar buf bytes.Buffer       \u002F\u002F zero value is ready to use\n```\n\n### Slice & Map Initialization\n\nSlices and maps MUST be initialized explicitly, never nil. Nil maps panic on write; nil slices serialize to `null` in JSON (vs `[]` for empty slices), surprising API consumers.\n\n```go\nusers := []User{}                       \u002F\u002F always initialized\nm := map[string]int{}                   \u002F\u002F always initialized\nusers := make([]User, 0, len(ids))      \u002F\u002F preallocate when capacity is known\nm := make(map[string]int, len(items))   \u002F\u002F preallocate when size is known\n```\n\nDo not preallocate speculatively — `make([]T, 0, 1000)` wastes memory when the common case is 10 items.\n\n### Composite Literals\n\nComposite literals MUST use field names — positional fields break when the type adds or reorders fields:\n\n```go\nsrv := &http.Server{\n    Addr:         \":8080\",\n    ReadTimeout:  5 * time.Second,\n    WriteTimeout: 10 * time.Second,\n}\n```\n\n## Control Flow\n\n### Reduce Nesting\n\nErrors and edge cases MUST be handled first (early return). Keep the happy path at minimal indentation:\n\n```go\nfunc process(data []byte) (*Result, error) {\n    if len(data) == 0 {\n        return nil, errors.New(\"empty data\")\n    }\n\n    parsed, err := parse(data)\n    if err != nil {\n        return nil, fmt.Errorf(\"parsing: %w\", err)\n    }\n\n    return transform(parsed), nil\n}\n```\n\n### Eliminate Unnecessary `else`\n\nWhen the `if` body ends with `return`\u002F`break`\u002F`continue`, the `else` MUST be dropped. Use default-then-override for simple assignments — assign a default, then override with independent conditions or a `switch`:\n\n```go\n\u002F\u002F Good — default-then-override with switch (cleanest for mutually exclusive overrides)\nlevel := slog.LevelInfo\nswitch {\ncase debug:\n    level = slog.LevelDebug\ncase verbose:\n    level = slog.LevelWarn\n}\n\n\u002F\u002F Bad — else-if chain hides that there's a default\nif debug {\n    level = slog.LevelDebug\n} else if verbose {\n    level = slog.LevelWarn\n} else {\n    level = slog.LevelInfo\n}\n```\n\n### Complex Conditions & Init Scope\n\nWhen an `if` condition has 3+ operands, MUST extract into named booleans — a wall of `||` is unreadable and hides business logic. Keep expensive checks inline for short-circuit benefit. [Details](.\u002Freferences\u002Fdetails.md)\n\n```go\n\u002F\u002F Good — named booleans make intent clear\nisAdmin := user.Role == RoleAdmin\nisOwner := resource.OwnerID == user.ID\nisPublicVerified := resource.IsPublic && user.IsVerified\nif isAdmin || isOwner || isPublicVerified || permissions.Contains(PermOverride) {\n    allow()\n}\n```\n\nScope variables to `if` blocks when only needed for the check:\n\n```go\nif err := validate(input); err != nil {\n    return err\n}\n```\n\n### Switch Over If-Else Chains\n\nWhen comparing the same variable multiple times, prefer `switch`:\n\n```go\nswitch status {\ncase StatusActive:\n    activate()\ncase StatusInactive:\n    deactivate()\ndefault:\n    panic(fmt.Sprintf(\"unexpected status: %d\", status))\n}\n```\n\n## Function Design\n\n- Functions SHOULD be **short and focused** — one function, one job.\n- Functions SHOULD have **≤4 parameters**. Beyond that, use an options struct (see `samber\u002Fcc-skills-golang@golang-design-patterns` skill).\n- **Parameter order**: `context.Context` first, then inputs, then output destinations.\n- Naked returns help in very short functions (1-3 lines) where return values are obvious, but become confusing when readers must scroll to find what's returned — name returns explicitly in longer functions.\n\n```go\nfunc FetchUser(ctx context.Context, id string) (*User, error)\nfunc SendEmail(ctx context.Context, msg EmailMessage) error  \u002F\u002F grouped into struct\n```\n\n### Prefer `range` for Iteration\n\nSHOULD use `range` over index-based loops. Use `range n` (Go 1.22+) for simple counting.\n\n```go\nfor _, user := range users {\n    process(user)\n}\n```\n\n## Value vs Pointer Arguments\n\nPass small types (`string`, `int`, `bool`, `time.Time`) by value. Use pointers when mutating, for large structs (~128+ bytes), or when nil is meaningful. [Details](.\u002Freferences\u002Fdetails.md)\n\n## Code Organization Within Files\n\n- **Group related declarations**: type, constructor, methods together\n- **Order**: package doc, imports, constants, types, constructors, methods, helpers\n- **One primary type per file** when it has significant methods\n- **Blank imports** (`_ \"pkg\"`) register side effects (init functions). Restricting them to `main` and test packages makes side effects visible at the application root, not hidden in library code\n- **Dot imports** pollute the namespace and make it impossible to tell where a name comes from — never use in library code\n- **Unexport aggressively** — you can always export later; unexporting is a breaking change. → See `samber\u002Fcc-skills-golang@golang-gopls` skill to unexport safely — its rename updates every call site atomically and refuses the change when lowercasing a method would break interface satisfaction, a breakage grep\u002Fsed silently ships.\n\n## String Handling\n\nUse `strconv` for simple conversions (faster), `fmt.Sprintf` for complex formatting. Use `%q` in error messages to make string boundaries visible. Use `strings.Builder` for loops, `+` for simple concatenation.\n\n## Type Conversions\n\nPrefer explicit, narrow conversions. Use generics over `any` when a concrete type will do:\n\n```go\nfunc Contains[T comparable](slice []T, target T) bool  \u002F\u002F not []any\n```\n\n## Philosophy\n\n- **\"A little copying is better than a little dependency\"**\n- **Use `slices` and `maps` standard packages**; for filter\u002Fgroup-by\u002Fchunk, use `github.com\u002Fsamber\u002Flo`\n- **\"Reflection is never clear\"** — avoid `reflect` unless necessary\n- **Don't abstract prematurely** — extract when the pattern is stable\n- **Minimize public surface** — every exported name is a commitment\n\n## Parallelizing Code Style Reviews\n\nWhen reviewing code style across a large codebase, use up to 5 parallel sub-agents, each targeting an independent style concern (e.g. control flow, function design, variable declarations, string handling, code organization).\n\n## Enforce with Linters\n\nMany rules are enforced automatically: `gofmt`, `gofumpt`, `goimports`, `gocritic`, `revive`, `wsl_v5`. → See the `samber\u002Fcc-skills-golang@golang-lint` skill.\n\n## Cross-References\n\n- → See the `samber\u002Fcc-skills-golang@golang-naming` skill for identifier naming conventions\n- → See the `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill for pointer vs value receivers, interface design\n- → See the `samber\u002Fcc-skills-golang@golang-design-patterns` skill for functional options, builders, constructors\n- → See the `samber\u002Fcc-skills-golang@golang-lint` skill for automated formatting enforcement\n- → See `samber\u002Fcc-skills-golang@golang-continuous-integration` skill for automated AI-driven code review in CI using these guidelines\n- → See `samber\u002Fcc-skills-golang@golang-refactoring` skill for mechanically applying guard-clause conversion, function extraction, and options-struct migration safely across many call sites once a review surfaces violations at scale\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.3.0",{"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,"main","03de2fd4cce66781f4eba68a6d0613fc2001c30f",".agents\u002Fskills\u002Fgolang-code-style","https:\u002F\u002Fgithub.com\u002Fgn00678465\u002Fapm-go","https:\u002F\u002Fgithub.com\u002Fgn00678465","まるでだめなおさん","2026-10-30 11:48:16",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":38},[48,51,54],{"tool":49,"command":50},"npx","npx skills add gn00678465\u002Fapm-go --skill golang-code-style",{"tool":52,"command":53},"bunx","bunx skills add gn00678465\u002Fapm-go --skill golang-code-style",{"tool":55,"command":56},"pnpm","pnpm dlx skills add gn00678465\u002Fapm-go --skill golang-code-style","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgn00678465\u002Fapm-go\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-code-style\u002FSKILL.md",[59,65],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"evals\u002Fevals.json","REFERENCE","参考文档",35853,"https:\u002F\u002Fgithub.com\u002Fgn00678465\u002Fapm-go\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-code-style\u002Fevals\u002Fevals.json",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fdetails.md",2722,"https:\u002F\u002Fgithub.com\u002Fgn00678465\u002Fapm-go\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-code-style\u002Freferences\u002Fdetails.md",[70,77,84,91,98,105],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M785HBB3TCKJBY61ESV12P93","golang-troubleshooting","Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, races, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve, 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), applying optimization patterns (→ See `samber\u002Fcc-skills-golang@golang-performance` skill), or designing new code (→ See `samber\u002Fcc-skills-golang@golang-safety` skill for defensive coding, `samber\u002Fcc-skills-golang@golang-concurrency` skill for concurrency design).","https:\u002F\u002Fgithub.com\u002Fgn00678465\u002Fapm-go\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgolang-troubleshooting\u002FSKILL.md",[],[],{"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":19},"01M785H2B0N08S730C7NG5JK9W","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\u002Fgn00678465\u002Fapm-go\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgolang-testing\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":19},"01M785GSK4XRCCMQ4SKAAHE1PN","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\u002Fgn00678465\u002Fapm-go\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgolang-spf13-cobra\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},"01M785GGB7M6KKVBGMHDHEABQK","golang-safety","Defensive Golang coding against accidental bugs — nil panics, typed-nil interfaces, `append` backing-array aliasing, silent int64-to-int32 truncation, float `==` comparison, `defer` inside loops, defensive copies of slices and maps, and usable zero values. Use when a Go program panics on a nil map write or nil pointer dereference, when reviewing code for nil-safety, numeric conversion overflow, or resource lifecycle, or when designing a type whose zero value must be safe. Not for designing concurrent access with goroutines, channels, or sync primitives (→ See `samber\u002Fcc-skills-golang@golang-concurrency` skill), not for exploitable vulnerabilities such as injection, weak crypto, or leaked secrets (→ See `samber\u002Fcc-skills-golang@golang-security` skill), and not for debugging an already-failing program (→ See `samber\u002Fcc-skills-golang@golang-troubleshooting` skill).","https:\u002F\u002Fgithub.com\u002Fgn00678465\u002Fapm-go\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgolang-safety\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},"01M785G9Z9BP2FFJFVTSCRC2TP","golang-lint","Linting best practices and golangci-lint configuration for Golang projects — running linters, configuring .golangci.yml, suppressing warnings with nolint directives, interpreting lint output, and selecting linters. Use when configuring golangci-lint, asking about lint warnings or nolint suppressions, setting up code quality tooling, or choosing linters. Also use when the user mentions golangci-lint, go vet, staticcheck, or revive. Not for wiring a lint step into a GitHub Actions pipeline (→ See `samber\u002Fcc-skills-golang@golang-continuous-integration` skill).","https:\u002F\u002Fgithub.com\u002Fgn00678465\u002Fapm-go\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgolang-lint\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},"01M785G3EFKSP6AFFXAW2CE6GG","golang-error-handling","Idiomatic Golang error handling — creation, wrapping with %w, errors.Is\u002FAs, errors.Join, custom error types, sentinel errors, panic\u002Frecover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber\u002Foops for production errors. Built to make logs usable at scale with log aggregation 3rd-party tools. Apply when creating, wrapping, inspecting, or logging errors in Go code. For samber\u002Foops specifics → See `samber\u002Fcc-skills-golang@golang-samber-oops` skill; for slog handler ecosystem → See `samber\u002Fcc-skills-golang@golang-samber-slog` skill.","https:\u002F\u002Fgithub.com\u002Fgn00678465\u002Fapm-go\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgolang-error-handling\u002FSKILL.md",[],[]]