[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72YA6C44HSH42S0NE6W2F79":3,"skill-same:01M72YA6C44HSH42S0NE6W2F79":75},{"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":6,"ownerDescription":46,"updatedAt":47,"install":48,"resources":60},"01M72YA6C44HSH42S0NE6W2F79","golang-safety",null,"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).","marcioaltoe\u002Fskills","marcioaltoe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1562865?v=4","01M72Y3750J2CG00P0H2AHDRSZ","Marcio Altoé","01M72Y37642F46H36R4E4S7BNA",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F05-implementation-loop\u002Fgolang-safety\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: golang-safety\ndescription: \"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).\"\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.2\"\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**Persona:** You are a defensive Go engineer. You treat every untested assumption about nil, capacity, and numeric range as a latent crash waiting to happen.\n\n# Go Safety: Correctness & Defensive Coding\n\nPrevents programmer mistakes — bugs, panics, and silent data corruption in normal (non-adversarial) code. Security handles attackers; safety handles ourselves.\n\n## Best Practices Summary\n\n1. **Prefer generics over `any`** when the type set is known — compiler catches mismatches instead of runtime panics\n2. **Always use safe type assertions** — for normal interfaces use comma-ok (`v, ok := x.(T)`); for reflection in Go 1.25+ prefer `reflect.TypeAssert[T](value)` over `value.Interface().(T)`.\n3. **Typed nil pointer in an interface is not `== nil`** — the type descriptor makes it non-nil\n4. **Writing to a nil map panics** — always initialize before use\n5. **`append` may reuse the backing array** — both slices share memory if capacity allows, silently corrupting each other\n6. **Return defensive copies** from exported functions — otherwise callers mutate your internals\n7. **`defer` runs at function exit, not loop iteration** — extract loop body to a function\n8. **Integer conversions truncate silently** — `int64` to `int32` wraps without error\n9. **Float arithmetic is not exact** — use epsilon comparison or `math\u002Fbig`\n10. **Design useful zero values** — nil map fields panic on first write; use lazy init\n11. **Use `sync.Once` for lazy init** — guarantees exactly-once even under concurrency\n\n## Nil Safety\n\nNil-related panics are the most common crash in Go.\n\n### The nil interface trap\n\nInterfaces store (type, value). An interface is `nil` only when both are nil. Returning a typed nil pointer sets the type descriptor, making it non-nil:\n\n```go\n\u002F\u002F ✗ Dangerous — interface{type: *MyHandler, value: nil} is not == nil\nfunc getHandler() http.Handler {\n    var h *MyHandler \u002F\u002F nil pointer\n    if !enabled {\n        return h \u002F\u002F interface{type: *MyHandler, value: nil} != nil\n    }\n    return h\n}\n\n\u002F\u002F ✓ Good — return nil explicitly\nfunc getHandler() http.Handler {\n    if !enabled {\n        return nil \u002F\u002F interface{type: nil, value: nil} == nil\n    }\n    return &MyHandler{}\n}\n```\n\n### Nil map, slice, and channel behavior\n\n| Type    | Index into nil | Write to nil   | Len\u002FCap of nil | Range over nil |\n| ------- | -------------- | -------------- | -------------- | -------------- |\n| Map     | Zero value     | **panic**      | 0              | 0 iterations   |\n| Slice   | **panic**      | **panic**      | 0              | 0 iterations   |\n| Channel | Blocks forever | Blocks forever | 0              | Blocks forever |\n\n```go\n\u002F\u002F ✗ Bad — nil map panics on write\nvar m map[string]int\nm[\"key\"] = 1\n\n\u002F\u002F ✓ Good — initialize or lazy-init in methods\nm := make(map[string]int)\n\nfunc (r *Registry) Add(name string, val int) {\n    if r.items == nil { r.items = make(map[string]int) }\n    r.items[name] = val\n}\n```\n\nSee **[Nil Safety Deep Dive](.\u002Freferences\u002Fnil-safety.md)** for nil receivers, nil in generics, and nil interface performance.\n\n## Slice & Map Safety\n\n### Slice aliasing — the append trap\n\n`append` reuses the backing array if capacity allows. Both slices then share memory:\n\n```go\n\u002F\u002F ✗ Dangerous — a and b share backing array\na := make([]int, 3, 5)\nb := append(a, 4)\nb[0] = 99 \u002F\u002F also modifies a[0]\n\n\u002F\u002F ✓ Good — full slice expression forces new allocation\nb := append(a[:len(a):len(a)], 4)\n```\n\n### Map concurrent access\n\nMaps MUST NOT be accessed concurrently — → see `samber\u002Fcc-skills-golang@golang-concurrency` for sync primitives.\n\nSee **[Slice and Map Deep Dive](.\u002Freferences\u002Fslice-map-safety.md)** for range pitfalls, subslice memory retention, and `slices.Clone`\u002F`maps.Clone`.\n\n## Numeric Safety\n\n### Implicit type conversions truncate silently\n\n```go\n\u002F\u002F ✗ Bad — silently wraps around if val > math.MaxInt32 (3B becomes -1.29B)\nvar val int64 = 3_000_000_000\ni32 := int32(val) \u002F\u002F -1294967296 (silent wraparound)\n\n\u002F\u002F ✓ Good — check before converting\nif val > math.MaxInt32 || val \u003C math.MinInt32 {\n    return fmt.Errorf(\"value %d overflows int32\", val)\n}\ni32 := int32(val)\n```\n\n### Float comparison\n\n```go\n\u002F\u002F ✗ Bad — floating point arithmetic is not exact\nvar a, b, c float64 = 0.1, 0.2, 0.3\na+b == c \u002F\u002F false\n\n\u002F\u002F ✓ Good — use epsilon comparison\nconst epsilon = 1e-9\nmath.Abs((a+b)-c) \u003C epsilon \u002F\u002F true\n```\n\n### Division by zero\n\nInteger division by zero panics. Float division by zero produces `+Inf`, `-Inf`, or `NaN`.\n\n```go\nfunc avg(total, count int) (int, error) {\n    if count == 0 {\n        return 0, errors.New(\"division by zero\")\n    }\n    return total \u002F count, nil\n}\n```\n\nFor integer overflow as a security vulnerability, see the `samber\u002Fcc-skills-golang@golang-security` skill section.\n\n## Resource Safety\n\n### defer in loops — resource accumulation\n\n`defer` runs at _function_ exit, not loop iteration. Resources accumulate until the function returns:\n\n```go\n\u002F\u002F ✗ Bad — all files stay open until function returns\nfor _, path := range paths {\n    f, _ := os.Open(path)\n    defer f.Close() \u002F\u002F deferred until function exits\n    process(f)\n}\n\n\u002F\u002F ✓ Good — extract to function so defer runs per iteration\nfor _, path := range paths {\n    if err := processOne(path); err != nil { return err }\n}\nfunc processOne(path string) error {\n    f, err := os.Open(path)\n    if err != nil { return err }\n    defer f.Close()\n    return process(f)\n}\n```\n\n### Goroutine leaks\n\n→ See `samber\u002Fcc-skills-golang@golang-concurrency` for goroutine lifecycle and leak prevention.\n\n## Immutability & Defensive Copying\n\nExported functions returning slices\u002Fmaps SHOULD return defensive copies.\n\n### Protecting struct internals\n\n```go\n\u002F\u002F ✗ Bad — exported slice field, anyone can mutate\ntype Config struct {\n    Hosts []string\n}\n\n\u002F\u002F ✓ Good — unexported field with accessor returning a copy\ntype Config struct {\n    hosts []string\n}\n\nfunc (c *Config) Hosts() []string {\n    return slices.Clone(c.hosts)\n}\n```\n\n## Initialization Safety\n\n### Zero-value design\n\nDesign types so `var x MyType` is safe — prevents \"forgot to initialize\" bugs:\n\n```go\nvar mu sync.Mutex   \u002F\u002F ✓ usable at zero value\nvar buf bytes.Buffer \u002F\u002F ✓ usable at zero value\n\n\u002F\u002F ✗ Bad — nil map panics on write\ntype Cache struct { data map[string]any }\n```\n\n### sync.Once for lazy initialization\n\n```go\ntype DB struct {\n    once sync.Once\n    conn *sql.DB\n}\n\nfunc (db *DB) connection() *sql.DB {\n    db.once.Do(func() {\n        db.conn, _ = sql.Open(\"postgres\", connStr)\n    })\n    return db.conn\n}\n```\n\n### init() function pitfalls\n\n→ See `samber\u002Fcc-skills-golang@golang-design-patterns` for why init() should be avoided in favor of explicit constructors.\n\n## Enforce with Linters\n\nMany safety pitfalls are caught automatically by linters: `errcheck`, `forcetypeassert`, `nilerr`, `govet`, `staticcheck`. See the `samber\u002Fcc-skills-golang@golang-lint` skill for configuration and usage.\n\n### Go 1.25+ reflection type assertions\n\nFor reflection code, prefer `reflect.TypeAssert[T]` over `value.Interface().(T)`.\n\n```go\nv := reflect.ValueOf(x)\nif s, ok := reflect.TypeAssert[string](v); ok {\n    use(s)\n}\n```\n\n## Common Mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| Bare type assertion `v := x.(T)` | Panics on type mismatch, crashing the program. Use `v, ok := x.(T)` to handle gracefully |\n| Returning typed nil in interface function | Interface holds (type, nil) which is != nil. Return untyped `nil` for the nil case |\n| Writing to a nil map | Nil maps have no backing storage — write panics. Initialize with `make(map[K]V)` or lazy-init |\n| Assuming `append` always copies | If capacity allows, both slices share the backing array. Use `s[:len(s):len(s)]` to force a copy |\n| `defer` in a loop | `defer` runs at function exit, not loop iteration — resources accumulate. Extract body to a separate function |\n| `int64` to `int32` without bounds check | Values wrap silently (3B → -1.29B). Check against `math.MaxInt32`\u002F`math.MinInt32` first |\n| Comparing floats with `==` | IEEE 754 representation is not exact (`0.1+0.2 != 0.3`). Use `math.Abs(a-b) \u003C epsilon` |\n| Integer division without zero check | Integer division by zero panics. Guard with `if divisor == 0` before dividing |\n| Returning internal slice\u002Fmap reference | Callers can mutate your struct's internals through the shared backing array. Return a defensive copy |\n| Multiple `init()` with ordering assumptions | `init()` execution order across files is unspecified. → See `samber\u002Fcc-skills-golang@golang-design-patterns` — use explicit constructors |\n| Blocking forever on nil channel | Nil channels block on both send and receive. Always initialize before use |\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-concurrency` skill for concurrent access patterns and sync primitives\n- → See `samber\u002Fcc-skills-golang@golang-data-structures` skill for slice\u002Fmap internals, capacity growth, and container\u002F packages\n- → See `samber\u002Fcc-skills-golang@golang-error-handling` skill for nil error interface trap\n- → See `samber\u002Fcc-skills-golang@golang-security` skill for security-relevant safety issues (memory safety, integer overflow)\n- → See `samber\u002Fcc-skills-golang@golang-troubleshooting` skill for debugging panics and race conditions\n- → See `samber\u002Fcc-skills-golang@golang-continuous-integration` skill for automated AI-driven code review in CI using these guidelines\n","**Persona:** You are a defensive Go engineer. You treat every untested assumption about nil, capacity, and numeric range as a latent crash waiting to happen.\n\n# Go Safety: Correctness & Defensive Coding\n\nPrevents programmer mistakes — bugs, panics, and silent data corruption in normal (non-adversarial) code. Security handles attackers; safety handles ourselves.\n\n## Best Practices Summary\n\n1. **Prefer generics over `any`** when the type set is known — compiler catches mismatches instead of runtime panics\n2. **Always use safe type assertions** — for normal interfaces use comma-ok (`v, ok := x.(T)`); for reflection in Go 1.25+ prefer `reflect.TypeAssert[T](value)` over `value.Interface().(T)`.\n3. **Typed nil pointer in an interface is not `== nil`** — the type descriptor makes it non-nil\n4. **Writing to a nil map panics** — always initialize before use\n5. **`append` may reuse the backing array** — both slices share memory if capacity allows, silently corrupting each other\n6. **Return defensive copies** from exported functions — otherwise callers mutate your internals\n7. **`defer` runs at function exit, not loop iteration** — extract loop body to a function\n8. **Integer conversions truncate silently** — `int64` to `int32` wraps without error\n9. **Float arithmetic is not exact** — use epsilon comparison or `math\u002Fbig`\n10. **Design useful zero values** — nil map fields panic on first write; use lazy init\n11. **Use `sync.Once` for lazy init** — guarantees exactly-once even under concurrency\n\n## Nil Safety\n\nNil-related panics are the most common crash in Go.\n\n### The nil interface trap\n\nInterfaces store (type, value). An interface is `nil` only when both are nil. Returning a typed nil pointer sets the type descriptor, making it non-nil:\n\n```go\n\u002F\u002F ✗ Dangerous — interface{type: *MyHandler, value: nil} is not == nil\nfunc getHandler() http.Handler {\n    var h *MyHandler \u002F\u002F nil pointer\n    if !enabled {\n        return h \u002F\u002F interface{type: *MyHandler, value: nil} != nil\n    }\n    return h\n}\n\n\u002F\u002F ✓ Good — return nil explicitly\nfunc getHandler() http.Handler {\n    if !enabled {\n        return nil \u002F\u002F interface{type: nil, value: nil} == nil\n    }\n    return &MyHandler{}\n}\n```\n\n### Nil map, slice, and channel behavior\n\n| Type    | Index into nil | Write to nil   | Len\u002FCap of nil | Range over nil |\n| ------- | -------------- | -------------- | -------------- | -------------- |\n| Map     | Zero value     | **panic**      | 0              | 0 iterations   |\n| Slice   | **panic**      | **panic**      | 0              | 0 iterations   |\n| Channel | Blocks forever | Blocks forever | 0              | Blocks forever |\n\n```go\n\u002F\u002F ✗ Bad — nil map panics on write\nvar m map[string]int\nm[\"key\"] = 1\n\n\u002F\u002F ✓ Good — initialize or lazy-init in methods\nm := make(map[string]int)\n\nfunc (r *Registry) Add(name string, val int) {\n    if r.items == nil { r.items = make(map[string]int) }\n    r.items[name] = val\n}\n```\n\nSee **[Nil Safety Deep Dive](.\u002Freferences\u002Fnil-safety.md)** for nil receivers, nil in generics, and nil interface performance.\n\n## Slice & Map Safety\n\n### Slice aliasing — the append trap\n\n`append` reuses the backing array if capacity allows. Both slices then share memory:\n\n```go\n\u002F\u002F ✗ Dangerous — a and b share backing array\na := make([]int, 3, 5)\nb := append(a, 4)\nb[0] = 99 \u002F\u002F also modifies a[0]\n\n\u002F\u002F ✓ Good — full slice expression forces new allocation\nb := append(a[:len(a):len(a)], 4)\n```\n\n### Map concurrent access\n\nMaps MUST NOT be accessed concurrently — → see `samber\u002Fcc-skills-golang@golang-concurrency` for sync primitives.\n\nSee **[Slice and Map Deep Dive](.\u002Freferences\u002Fslice-map-safety.md)** for range pitfalls, subslice memory retention, and `slices.Clone`\u002F`maps.Clone`.\n\n## Numeric Safety\n\n### Implicit type conversions truncate silently\n\n```go\n\u002F\u002F ✗ Bad — silently wraps around if val > math.MaxInt32 (3B becomes -1.29B)\nvar val int64 = 3_000_000_000\ni32 := int32(val) \u002F\u002F -1294967296 (silent wraparound)\n\n\u002F\u002F ✓ Good — check before converting\nif val > math.MaxInt32 || val \u003C math.MinInt32 {\n    return fmt.Errorf(\"value %d overflows int32\", val)\n}\ni32 := int32(val)\n```\n\n### Float comparison\n\n```go\n\u002F\u002F ✗ Bad — floating point arithmetic is not exact\nvar a, b, c float64 = 0.1, 0.2, 0.3\na+b == c \u002F\u002F false\n\n\u002F\u002F ✓ Good — use epsilon comparison\nconst epsilon = 1e-9\nmath.Abs((a+b)-c) \u003C epsilon \u002F\u002F true\n```\n\n### Division by zero\n\nInteger division by zero panics. Float division by zero produces `+Inf`, `-Inf`, or `NaN`.\n\n```go\nfunc avg(total, count int) (int, error) {\n    if count == 0 {\n        return 0, errors.New(\"division by zero\")\n    }\n    return total \u002F count, nil\n}\n```\n\nFor integer overflow as a security vulnerability, see the `samber\u002Fcc-skills-golang@golang-security` skill section.\n\n## Resource Safety\n\n### defer in loops — resource accumulation\n\n`defer` runs at _function_ exit, not loop iteration. Resources accumulate until the function returns:\n\n```go\n\u002F\u002F ✗ Bad — all files stay open until function returns\nfor _, path := range paths {\n    f, _ := os.Open(path)\n    defer f.Close() \u002F\u002F deferred until function exits\n    process(f)\n}\n\n\u002F\u002F ✓ Good — extract to function so defer runs per iteration\nfor _, path := range paths {\n    if err := processOne(path); err != nil { return err }\n}\nfunc processOne(path string) error {\n    f, err := os.Open(path)\n    if err != nil { return err }\n    defer f.Close()\n    return process(f)\n}\n```\n\n### Goroutine leaks\n\n→ See `samber\u002Fcc-skills-golang@golang-concurrency` for goroutine lifecycle and leak prevention.\n\n## Immutability & Defensive Copying\n\nExported functions returning slices\u002Fmaps SHOULD return defensive copies.\n\n### Protecting struct internals\n\n```go\n\u002F\u002F ✗ Bad — exported slice field, anyone can mutate\ntype Config struct {\n    Hosts []string\n}\n\n\u002F\u002F ✓ Good — unexported field with accessor returning a copy\ntype Config struct {\n    hosts []string\n}\n\nfunc (c *Config) Hosts() []string {\n    return slices.Clone(c.hosts)\n}\n```\n\n## Initialization Safety\n\n### Zero-value design\n\nDesign types so `var x MyType` is safe — prevents \"forgot to initialize\" bugs:\n\n```go\nvar mu sync.Mutex   \u002F\u002F ✓ usable at zero value\nvar buf bytes.Buffer \u002F\u002F ✓ usable at zero value\n\n\u002F\u002F ✗ Bad — nil map panics on write\ntype Cache struct { data map[string]any }\n```\n\n### sync.Once for lazy initialization\n\n```go\ntype DB struct {\n    once sync.Once\n    conn *sql.DB\n}\n\nfunc (db *DB) connection() *sql.DB {\n    db.once.Do(func() {\n        db.conn, _ = sql.Open(\"postgres\", connStr)\n    })\n    return db.conn\n}\n```\n\n### init() function pitfalls\n\n→ See `samber\u002Fcc-skills-golang@golang-design-patterns` for why init() should be avoided in favor of explicit constructors.\n\n## Enforce with Linters\n\nMany safety pitfalls are caught automatically by linters: `errcheck`, `forcetypeassert`, `nilerr`, `govet`, `staticcheck`. See the `samber\u002Fcc-skills-golang@golang-lint` skill for configuration and usage.\n\n### Go 1.25+ reflection type assertions\n\nFor reflection code, prefer `reflect.TypeAssert[T]` over `value.Interface().(T)`.\n\n```go\nv := reflect.ValueOf(x)\nif s, ok := reflect.TypeAssert[string](v); ok {\n    use(s)\n}\n```\n\n## Common Mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| Bare type assertion `v := x.(T)` | Panics on type mismatch, crashing the program. Use `v, ok := x.(T)` to handle gracefully |\n| Returning typed nil in interface function | Interface holds (type, nil) which is != nil. Return untyped `nil` for the nil case |\n| Writing to a nil map | Nil maps have no backing storage — write panics. Initialize with `make(map[K]V)` or lazy-init |\n| Assuming `append` always copies | If capacity allows, both slices share the backing array. Use `s[:len(s):len(s)]` to force a copy |\n| `defer` in a loop | `defer` runs at function exit, not loop iteration — resources accumulate. Extract body to a separate function |\n| `int64` to `int32` without bounds check | Values wrap silently (3B → -1.29B). Check against `math.MaxInt32`\u002F`math.MinInt32` first |\n| Comparing floats with `==` | IEEE 754 representation is not exact (`0.1+0.2 != 0.3`). Use `math.Abs(a-b) \u003C epsilon` |\n| Integer division without zero check | Integer division by zero panics. Guard with `if divisor == 0` before dividing |\n| Returning internal slice\u002Fmap reference | Callers can mutate your struct's internals through the shared backing array. Return a defensive copy |\n| Multiple `init()` with ordering assumptions | `init()` execution order across files is unspecified. → See `samber\u002Fcc-skills-golang@golang-design-patterns` — use explicit constructors |\n| Blocking forever on nil channel | Nil channels block on both send and receive. Always initialize before use |\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-concurrency` skill for concurrent access patterns and sync primitives\n- → See `samber\u002Fcc-skills-golang@golang-data-structures` skill for slice\u002Fmap internals, capacity growth, and container\u002F packages\n- → See `samber\u002Fcc-skills-golang@golang-error-handling` skill for nil error interface trap\n- → See `samber\u002Fcc-skills-golang@golang-security` skill for security-relevant safety issues (memory safety, integer overflow)\n- → See `samber\u002Fcc-skills-golang@golang-troubleshooting` skill for debugging panics and race conditions\n- → See `samber\u002Fcc-skills-golang@golang-continuous-integration` skill for automated AI-driven code review in CI using these guidelines\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.2",{"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","dea450cfd9df78b5cf721964ef178a75cea55cbb","skills\u002F05-implementation-loop\u002Fgolang-safety",2,"https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills","https:\u002F\u002Fmarcioaltoe.github.io\u002Fskills\u002F","https:\u002F\u002Fgithub.com\u002Fmarcioaltoe","Senior Software Engineer · Backend, Systems & AI","2026-11-14 18:29:56",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":38},[50,53,56],{"tool":51,"command":52},"npx","npx skills add marcioaltoe\u002Fskills --skill golang-safety",{"tool":54,"command":55},"bunx","bunx skills add marcioaltoe\u002Fskills --skill golang-safety",{"tool":57,"command":58},"pnpm","pnpm dlx skills add marcioaltoe\u002Fskills --skill golang-safety","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F05-implementation-loop\u002Fgolang-safety\u002FSKILL.md",[61,67,71],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"evals\u002Fevals.json","REFERENCE","参考文档",48573,"https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F05-implementation-loop\u002Fgolang-safety\u002Fevals\u002Fevals.json",{"path":68,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fnil-safety.md",5715,"https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F05-implementation-loop\u002Fgolang-safety\u002Freferences\u002Fnil-safety.md",{"path":72,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fslice-map-safety.md",6344,"https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F05-implementation-loop\u002Fgolang-safety\u002Freferences\u002Fslice-map-safety.md",[76,84,91,98,105,112],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":83},"01M72YNVSF4JTTQG3YTR9QNT4Z","startup-validator","Comprehensive startup idea validation and market analysis tool. Use when users need to evaluate a startup idea, assess market fit, analyze competition, validate problem-solution fit, or determine market positioning. Triggers include requests to \"validate my startup idea\", \"analyze market opportunity\", \"check if there's demand for\", \"research competition for\", \"evaluate business idea\", or \"see if my idea is viable\". Provides data-driven analysis using web search, market frameworks, competitive research, and positioning recommendations.","https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F10-marketing\u002Fstartup-validator\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"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":83},"01M72YNN34B4MYKEX1X6BB1NS1","positioning-icp","When the user wants to define their ideal customer profile, position an AI product, build messaging architecture, or validate product-market fit. Also use when the user mentions 'ICP,' 'ideal customer profile,' 'positioning,' 'PMF,' 'product-market fit,' 'messaging,' 'buyer persona,' 'enrichment signals,' 'market positioning,' or 'competitive positioning.' This skill covers market positioning, ICP definition, messaging architecture, and PMF validation for AI-native products. Do NOT use for technical implementation, code review, or software architecture.","https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F10-marketing\u002Fpositioning-icp\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":83},"01M72YNG8XJ4RHRB5DQMCY9C1N","copywriting","When the user wants to write or rewrite page copy (homepage, landing, pricing, feature), or asks which headline, promise, or message to lead with. Diagnoses the input first (blank brief, real voice, or point edit) and changes only what it calls for. Claims must be supportable; a declined claim names the evidence that would unlock it. No AI tells like 'it's not X, it's Y' or 'no X, no Y, no Z'. For editing, see copy-editing. For emails, see emails. For the offer, see offers.","https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F10-marketing\u002Fcopywriting\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":83},"01M72YNBF4JMQ4VCFHTW0WS6SD","business-storyteller","Transforms technical work into persuasive business-language documents for non-technical stakeholders, including internal announcements, approval proposals, incident explainers, technical-debt cases, product explainers, and investor or partner memos. Use when the user asks to present technical work to the company, explain software to business teams, write a business case, make an approval document, or convert a technical artifact into stakeholder communication in the requested language. Do not use for READMEs, specs, ADRs, external marketing pages, or customer-facing sales copy.","https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F10-marketing\u002Fbusiness-storyteller\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":83},"01M72YN8NQ6QR0GHX2A8YW2K4T","brand-storytelling","Help users craft compelling brand narratives. Use when someone is defining brand strategy, writing company positioning, creating pitch narratives, developing messaging frameworks, or trying to make their company story more memorable.","https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F10-marketing\u002Fbrand-storytelling\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":116,"licenseFileUrl":117,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":83},"01M72YN3CJH7CKPF4AXNY79Q9S","skill-creator","Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F09-learning-loop\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fmarcioaltoe\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F09-learning-loop\u002Fskill-creator\u002FSKILL.md",[],[]]