[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CFKTHD031EE5E7QSCF561N":3,"skill-same:01M6CFKTHD031EE5E7QSCF561N":104},{"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":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":64,"commitSha":65,"skillDirectory":66,"forksCount":67,"repositoryHtmlUrl":68,"repositoryHomepageUrl":6,"ownerHtmlUrl":69,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":70,"install":71,"resources":83},"01M6CFKTHD031EE5E7QSCF561N","golang-safety",null,"Defensive Golang coding to prevent panics, silent data corruption, and subtle runtime bugs. Use when encountering nil panics, append aliasing, map concurrent access, float comparison pitfalls, or zero-value design questions. Also use when reviewing code for nil-safety, numeric conversion overflow, resource lifecycle issues (defer in loops), or defensive copying of slices and maps.","rockcookies\u002Fskills","rockcookies","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F3498265?v=4","01M6CF9C16X3SDSKZX6ANH7HQM","Jacob He","01M6CF9C53JP821FCW6R9B00AJ",1,"MIT","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-safety\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"Safety","golang safety","golang","lifecycle","github","maps","conversion","use","read","projects","access","Bash","lint","design","ZeRO","https","codex","harness","issues","code","2026-11-10 10:12:30",false,"---\nname: golang-safety\ndescription: >-\n  Defensive Golang coding to prevent panics, silent data corruption, and subtle\n  runtime bugs. Use when encountering nil panics, append aliasing, map\n  concurrent access, float comparison pitfalls, or zero-value design questions.\n  Also use when reviewing code for nil-safety, numeric conversion overflow,\n  resource lifecycle issues (defer in loops), or defensive copying of slices and\n  maps.\nuser-invocable: true\nlicense: MIT\ncompatibility: >-\n  Designed for Claude Code, Codex or similar harness, and for projects using\n  Golang.\nmetadata:\n  author: samber\n  version: 1.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**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 `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 `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 `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 `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 `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## Cross-References\n\n- → See `golang-concurrency` skill for concurrent access patterns and sync primitives\n- → See `golang-data-structures` skill for slice\u002Fmap internals, capacity growth, and container\u002F packages\n- → See `golang-error-handling` skill for nil error interface trap\n- → See `golang-security` skill for security-relevant safety issues (memory safety, integer overflow)\n- → See `golang-troubleshooting` skill for debugging panics and race conditions\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 `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 `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 `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 `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 `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 `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 `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## Cross-References\n\n- → See `golang-concurrency` skill for concurrent access patterns and sync primitives\n- → See `golang-data-structures` skill for slice\u002Fmap internals, capacity growth, and container\u002F packages\n- → See `golang-error-handling` skill for nil error interface trap\n- → See `golang-security` skill for security-relevant safety issues (memory safety, integer overflow)\n- → See `golang-troubleshooting` skill for debugging panics and race conditions\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 `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 `golang-continuous-integration` skill for automated AI-driven code review in CI using these guidelines\n",{"name":5,"paths":49,"license":15,"metadata":51,"description":7,"allowed-tools":61,"compatibility":62,"user-invocable":63},[50],"**\u002F*.go",{"author":52,"version":53,"openclaw":54},"samber","1.3.0",{"emoji":55,"install":56,"homepage":57,"requires":58},"?",[],"https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":59},[60],"go","Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent","Designed for Claude Code, Codex or similar harness, and for projects using Golang.",true,"main","c349be0704bffe54a7191d1412faf564b08983ca","skills\u002Fsamber-golang\u002Fgolang-safety",0,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills","https:\u002F\u002Fgithub.com\u002Frockcookies","2026-11-11 22:09:57",{"source":8,"skillName":5,"commands":72,"prompt":82,"zipAvailable":63},[73,76,79],{"tool":74,"command":75},"npx","npx skills add rockcookies\u002Fskills --skill golang-safety",{"tool":77,"command":78},"bunx","bunx skills add rockcookies\u002Fskills --skill golang-safety",{"tool":80,"command":81},"pnpm","pnpm dlx skills add rockcookies\u002Fskills --skill golang-safety","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-safety\u002FSKILL.md",[84,90,96,100],{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"evals\u002Fevals.json","REFERENCE","参考文档",48573,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-safety\u002Fevals\u002Fevals.json",{"path":91,"resourceType":92,"resourceTypeDesc":93,"sizeBytes":94,"sourceHtmlUrl":95},"LICENSE.txt","LICENSE","许可证",142,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FBestLemoon\u002Fcodex-seo\u002Fskills\u002Fseo-hreflang\u002FLICENSE.txt",{"path":97,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Fnil-safety.md",4810,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-safety\u002Freferences\u002Fnil-safety.md",{"path":101,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Fslice-map-safety.md",5541,"https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsamber-golang\u002Fgolang-safety\u002Freferences\u002Fslice-map-safety.md",[105,129,145,167,178,192],{"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":44},"01M6WMNKD3Y4H9FGM8Q901F507","hierarchical-agents-md","init、update、audit 或 reorganize 以 AGENTS.md 与 README.md 为中心的层级项目文档： 初始化 Agent 指令、代码改动后更新文档、审计过期或冲突文档、重组仓库文档层级。","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fcustom\u002Fhierarchical-agents-md\u002FSKILL.md",[],[112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128],"hierarchical agents md","agents md","python","change","init","packages","update","git","audit","文档","README","maintenance","third-party","初始化","true","for","party",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":138,"publishedAt":44},"01M6CFS6BRTQPFZCDHQP97HYXR","vueuse-functions","Apply VueUse composables where appropriate to build concise, maintainable Vue.js \u002F Nuxt features.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvueuse\u002Fvueuse-functions\u002FSKILL.md",[135],{"categoryNo":136,"categoryName":137,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[139,140,39,141,142,143,144,28],"functions","vueuse functions","vue","js","nuxt","build",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":155,"publishedAt":44},"01M6CFS34MDQXZPAWQFE5D7VGT","vue-testing-best-practices","Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-testing-best-practices\u002FSKILL.md",[151,154],{"categoryNo":152,"categoryName":153,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":136,"categoryName":137,"taxonomyType":21,"taxonomyTypeDesc":22},[156,157,158,141,159,31,160,28,161,162,163,164,165,166,142],"best practices","vue testing best practices","testing best practices","testing","e2e testing","playwright","test","component","testing patterns","e2e","vitest",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":174,"publishedAt":44},"01M6CFS0N19MSJNTVM9AEQ7Z73","vue-router-best-practices","Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-router-best-practices\u002FSKILL.md",[173],{"categoryNo":136,"categoryName":137,"taxonomyType":21,"taxonomyTypeDesc":22},[175,176,141,156,28,163,27,177],"vue router best practices","router","navigation",{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":182,"categories":183,"keywords":185,"publishedAt":44},"01M6CFRYN31RFQFTE41Z6DCGKE","vue-pinia-best-practices","Pinia stores, state management patterns, store setup, and reactivity with stores.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-pinia-best-practices\u002FSKILL.md",[184],{"categoryNo":136,"categoryName":137,"taxonomyType":21,"taxonomyTypeDesc":22},[186,187,156,141,188,189,190,191,28],"vue pinia best practices","pinia","state","management","state management","setup",{"skillNo":193,"name":194,"nameZh":6,"description":195,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":196,"categories":197,"keywords":207,"publishedAt":44},"01M6CFRW2DKXJHP05DYJ3P3Y2S","vue-options-api-best-practices","Vue 3 Options API style (data(), methods, this context). Each reference shows Options API solution only.","https:\u002F\u002Fgithub.com\u002Frockcookies\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fvuejs-ai\u002Fvue-options-api-best-practices\u002FSKILL.md",[198,199,202],{"categoryNo":136,"categoryName":137,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":200,"categoryName":201,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":203,"categoryName":204,"taxonomyType":205,"taxonomyTypeDesc":206},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[156,208,141,209,210,211,28,212,213,214],"api","vue options api best practices","data","methods","reference","only","context"]