[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77MVMGTDWFP0DFT18VHP610":3,"skill-same:01M77MVMGTDWFP0DFT18VHP610":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":14,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":56},"01M77MVMGTDWFP0DFT18VHP610","golang-data-structures",null,"Golang data structures — slices (internals, capacity growth, preallocation, slices package), maps (internals, hash buckets, maps package), arrays, container\u002Flist\u002Fheap\u002Fring, strings.Builder vs bytes.Buffer, generic collections, pointers (unsafe.Pointer, weak.Pointer), and copy semantics. Use when choosing or optimizing Go data structures, implementing generic containers, using container\u002F packages, unsafe or weak pointers, or questioning slice\u002Fmap internals.","sushichan044\u002Fmergeable-please","sushichan044","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F71284054?v=4","01M6CD61CFDCQYW4XTQ1CF5200","Kentaro Suzuki","01M77MTW96E9P0ZVAHK9FXG8TJ",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-data-structures\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: golang-data-structures\ndescription: \"Golang data structures — slices (internals, capacity growth, preallocation, slices package), maps (internals, hash buckets, maps package), arrays, container\u002Flist\u002Fheap\u002Fring, strings.Builder vs bytes.Buffer, generic collections, pointers (unsafe.Pointer, weak.Pointer), and copy semantics. Use when choosing or optimizing Go data structures, implementing generic containers, using container\u002F packages, unsafe or weak pointers, or questioning slice\u002Fmap internals.\"\nuser-invocable: true\nlicense: MIT\ncompatibility: Designed for Claude Code or similar AI coding agents, and for projects using Golang.\nmetadata:\n  author: samber\n  version: \"1.1.3\"\n  openclaw:\n    emoji: \"🗃\"\n    homepage: https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang\n    requires:\n      bins:\n        - go\n    install: []\nallowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent\n---\n\n**Persona:** You are a Go engineer who understands data structure internals. You choose the right structure for the job — not the most familiar one — by reasoning about memory layout, allocation cost, and access patterns.\n\n# Go Data Structures\n\nBuilt-in and standard library data structures: internals, correct usage, and selection guidance. For safety pitfalls (nil maps, append aliasing, defensive copies) see `samber\u002Fcc-skills-golang@golang-safety` skill. For channels and sync primitives see `samber\u002Fcc-skills-golang@golang-concurrency` skill. For string\u002Fbyte\u002Frune choice see `samber\u002Fcc-skills-golang@golang-design-patterns` skill.\n\n## Best Practices Summary\n\n1. **Preallocate slices and maps** with `make(T, 0, n)` \u002F `make(map[K]V, n)` when size is known or estimable — avoids repeated growth copies and rehashing\n2. **Arrays** SHOULD be preferred over slices only for fixed, compile-time-known sizes (hash digests, IPv4 addresses, matrix dimensions)\n3. **NEVER rely on slice capacity growth timing** — the growth algorithm changed between Go versions and may change again; your code should not depend on when a new backing array is allocated\n4. **Use `container\u002Fheap`** for priority queues, **`container\u002Flist`** only when frequent middle insertions are needed, **`container\u002Fring`** for fixed-size circular buffers\n5. **`strings.Builder`** MUST be preferred for building strings; **`bytes.Buffer`** MUST be preferred for bidirectional I\u002FO (implements both `io.Reader` and `io.Writer`)\n6. Generic data structures SHOULD use the **tightest constraint** possible — `comparable` for keys, custom interfaces for ordering\n7. **`unsafe.Pointer`** MUST only follow the 6 valid conversion patterns from the Go spec — NEVER store in a `uintptr` variable across statements\n8. **`weak.Pointer[T]`** (Go 1.24+) SHOULD be used for caches and canonicalization maps to allow GC to reclaim entries\n\n## Slice Internals\n\nA slice is a 3-word header: pointer, length, capacity. Multiple slices can share a backing array (→ see `samber\u002Fcc-skills-golang@golang-safety` for aliasing traps and the header diagram).\n\n### Capacity Growth\n\n- \u003C 256 elements: capacity doubles\n- > = 256 elements: grows by ~25% (`newcap += (newcap + 3*256) \u002F 4`)\n- Each growth copies the entire backing array — O(n)\n\n### Preallocation\n\n```go\n\u002F\u002F Exact size known\nusers := make([]User, 0, len(ids))\n\n\u002F\u002F Approximate size known\nresults := make([]Result, 0, estimatedCount)\n\n\u002F\u002F Pre-grow before bulk append (Go 1.21+)\ns = slices.Grow(s, additionalNeeded)\n```\n\n### `slices` Package (Go 1.21+)\n\nKey functions: `Sort`\u002F`SortFunc`, `BinarySearch`, `Contains`, `Compact`, `Grow`. For `Clone`, `Equal`, `DeleteFunc` → see `samber\u002Fcc-skills-golang@golang-safety` skill.\n\n**[Slice Internals Deep Dive](.\u002Freferences\u002Fslice-internals.md)** — Full `slices` package reference, growth mechanics, `len` vs `cap`, header copying, backing array aliasing.\n\n## Map Internals\n\nMaps are hash tables with 8-entry buckets and overflow chains. They are reference types — assigning a map copies the pointer, not the data.\n\n### Preallocation\n\n```go\nm := make(map[string]*User, len(users)) \u002F\u002F avoids rehashing during population\n```\n\n### `maps` Package Quick Reference (Go 1.21+)\n\n| Function          | Purpose                      |\n| ----------------- | ---------------------------- |\n| `Collect` (1.23+) | Build map from iterator      |\n| `Insert` (1.23+)  | Insert entries from iterator |\n| `All` (1.23+)     | Iterator over all entries    |\n| `Keys`, `Values`  | Iterators over keys\u002Fvalues   |\n\nFor `Clone`, `Equal`, sorted iteration → see `samber\u002Fcc-skills-golang@golang-safety` skill.\n\n**[Map Internals Deep Dive](.\u002Freferences\u002Fmap-internals.md)** — How Go maps store and hash data, bucket overflow chains, why maps never shrink (and what to do about it), comparing map performance to alternatives.\n\n## Arrays\n\nFixed-size, value types. Copied entirely on assignment. Use for compile-time-known sizes:\n\n```go\ntype Digest [32]byte           \u002F\u002F fixed-size, value type\nvar grid [3][3]int             \u002F\u002F multi-dimensional\ncache := map[[2]int]Result{}   \u002F\u002F arrays are comparable — usable as map keys\n```\n\nPrefer slices for everything else — arrays cannot grow and pass by value (expensive for large sizes).\n\n## container\u002F Standard Library\n\n| Package          | Data Structure                 | Best For                                      |\n| ---------------- | ------------------------------ | --------------------------------------------- |\n| `container\u002Flist` | Doubly-linked list             | LRU caches, frequent middle insertion\u002Fremoval |\n| `container\u002Fheap` | Min-heap (priority queue)      | Top-K, scheduling, Dijkstra                   |\n| `container\u002Fring` | Circular buffer                | Rolling windows, round-robin                  |\n| `bufio`          | Buffered reader\u002Fwriter\u002Fscanner | Efficient I\u002FO with small reads\u002Fwrites         |\n\nContainer types use `any` (no type safety) — consider generic wrappers. **[Container Patterns, bufio, and Examples](.\u002Freferences\u002Fcontainers.md)** — When to use each container type, generic wrappers to add type safety, and `bufio` patterns for efficient I\u002FO.\n\n## strings.Builder vs bytes.Buffer\n\nUse `strings.Builder` for pure string concatenation (avoids copy on `String()`), `bytes.Buffer` when you need `io.Reader` or byte manipulation. Both support `Grow(n)`. **[Details and comparison](.\u002Freferences\u002Fcontainers.md)**\n\n## Generic Collections (Go 1.18+)\n\nUse the tightest constraint possible. `comparable` for map keys, `cmp.Ordered` for sorting, custom interfaces for domain-specific ordering.\n\n```go\ntype Set[T comparable] map[T]struct{}\n\nfunc (s Set[T]) Add(v T)          { s[v] = struct{}{} }\nfunc (s Set[T]) Contains(v T) bool { _, ok := s[v]; return ok }\n```\n\n**[Writing Generic Data Structures](.\u002Freferences\u002Fgenerics.md)** — Using Go 1.18+ generics for type-safe containers, understanding constraint satisfaction, and building domain-specific generic types.\n\n## Pointer Types\n\n| Type                      | Use Case                                            | Zero Value |\n| ------------------------- | --------------------------------------------------- | ---------- |\n| `*T`                      | Normal indirection, mutation, optional values       | `nil`      |\n| `unsafe.Pointer`          | FFI, low-level memory layout (6 spec patterns only) | `nil`      |\n| `weak.Pointer[T]` (1.24+) | Caches, canonicalization, weak references           | N\u002FA        |\n\n**[Pointer Types Deep Dive](.\u002Freferences\u002Fpointers.md)** — Normal pointers, `unsafe.Pointer` (the 6 valid spec patterns), and `weak.Pointer[T]` for GC-safe caches that don't prevent cleanup.\n\n## Copy Semantics Quick Reference\n\n| Type                             | Copy Behavior                       | Independence          |\n| -------------------------------- | ----------------------------------- | --------------------- |\n| `int`, `float`, `bool`, `string` | Value (deep copy)                   | Fully independent     |\n| `array`, `struct`                | Value (deep copy)                   | Fully independent     |\n| `slice`                          | Header copied, backing array shared | Use `slices.Clone`    |\n| `map`                            | Reference copied                    | Use `maps.Clone`      |\n| `channel`                        | Reference copied                    | Same channel          |\n| `*T` (pointer)                   | Address copied                      | Same underlying value |\n| `interface`                      | Value copied (type + value pair)    | Depends on held type  |\n\n## Third-Party Libraries\n\nFor advanced data structures (trees, sets, queues, stacks) beyond the standard library:\n\n- **`emirpasic\u002Fgods`** — comprehensive collection library (trees, sets, lists, stacks, maps, queues)\n- **`deckarep\u002Fgolang-set`** — thread-safe and non-thread-safe set implementations\n- **`gammazero\u002Fdeque`** — fast double-ended queue\n\nWhen using third-party libraries, refer to their official documentation and code examples for current API signatures. Context7 can help as a discoverability platform.\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-performance` skill for struct field alignment, memory layout optimization, and cache locality\n- → See `samber\u002Fcc-skills-golang@golang-safety` skill for nil map\u002Fslice pitfalls, append aliasing, defensive copying, `slices.Clone`\u002F`Equal`\n- → See `samber\u002Fcc-skills-golang@golang-concurrency` skill for channels, `sync.Map`, `sync.Pool`, and all sync primitives\n- → See `samber\u002Fcc-skills-golang@golang-design-patterns` skill for `string` vs `[]byte` vs `[]rune`, iterators, streaming\n- → See `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill for struct composition, embedding, and generics vs `any`\n- → See `samber\u002Fcc-skills-golang@golang-code-style` skill for slice\u002Fmap initialization style\n\n## Common Mistakes\n\n| Mistake                                                | Fix                                                                                                   |\n| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |\n| Growing a slice in a loop without preallocation        | Each growth copies the entire backing array — O(n) per growth. Use `make([]T, 0, n)` or `slices.Grow` |\n| Using `container\u002Flist` when a slice would suffice      | Linked lists have poor cache locality (each node is a separate heap allocation). Benchmark first      |\n| `bytes.Buffer` for pure string building                | Buffer's `String()` copies the underlying bytes. `strings.Builder` avoids this copy                   |\n| `unsafe.Pointer` stored as `uintptr` across statements | GC can move the object between statements — the `uintptr` becomes a dangling reference                |\n| Large struct values in maps (copying overhead)         | Map access copies the entire value. Use `map[K]*V` for large value types to avoid the copy            |\n\n## References\n\n- [Go Data Structures (Russ Cox)](https:\u002F\u002Fresearch.swtch.com\u002Fgodata)\n- [The Go Memory Model](https:\u002F\u002Fgo.dev\u002Fref\u002Fmem)\n- [Effective Go](https:\u002F\u002Fgo.dev\u002Fdoc\u002Feffective_go)\n","**Persona:** You are a Go engineer who understands data structure internals. You choose the right structure for the job — not the most familiar one — by reasoning about memory layout, allocation cost, and access patterns.\n\n# Go Data Structures\n\nBuilt-in and standard library data structures: internals, correct usage, and selection guidance. For safety pitfalls (nil maps, append aliasing, defensive copies) see `samber\u002Fcc-skills-golang@golang-safety` skill. For channels and sync primitives see `samber\u002Fcc-skills-golang@golang-concurrency` skill. For string\u002Fbyte\u002Frune choice see `samber\u002Fcc-skills-golang@golang-design-patterns` skill.\n\n## Best Practices Summary\n\n1. **Preallocate slices and maps** with `make(T, 0, n)` \u002F `make(map[K]V, n)` when size is known or estimable — avoids repeated growth copies and rehashing\n2. **Arrays** SHOULD be preferred over slices only for fixed, compile-time-known sizes (hash digests, IPv4 addresses, matrix dimensions)\n3. **NEVER rely on slice capacity growth timing** — the growth algorithm changed between Go versions and may change again; your code should not depend on when a new backing array is allocated\n4. **Use `container\u002Fheap`** for priority queues, **`container\u002Flist`** only when frequent middle insertions are needed, **`container\u002Fring`** for fixed-size circular buffers\n5. **`strings.Builder`** MUST be preferred for building strings; **`bytes.Buffer`** MUST be preferred for bidirectional I\u002FO (implements both `io.Reader` and `io.Writer`)\n6. Generic data structures SHOULD use the **tightest constraint** possible — `comparable` for keys, custom interfaces for ordering\n7. **`unsafe.Pointer`** MUST only follow the 6 valid conversion patterns from the Go spec — NEVER store in a `uintptr` variable across statements\n8. **`weak.Pointer[T]`** (Go 1.24+) SHOULD be used for caches and canonicalization maps to allow GC to reclaim entries\n\n## Slice Internals\n\nA slice is a 3-word header: pointer, length, capacity. Multiple slices can share a backing array (→ see `samber\u002Fcc-skills-golang@golang-safety` for aliasing traps and the header diagram).\n\n### Capacity Growth\n\n- \u003C 256 elements: capacity doubles\n- > = 256 elements: grows by ~25% (`newcap += (newcap + 3*256) \u002F 4`)\n- Each growth copies the entire backing array — O(n)\n\n### Preallocation\n\n```go\n\u002F\u002F Exact size known\nusers := make([]User, 0, len(ids))\n\n\u002F\u002F Approximate size known\nresults := make([]Result, 0, estimatedCount)\n\n\u002F\u002F Pre-grow before bulk append (Go 1.21+)\ns = slices.Grow(s, additionalNeeded)\n```\n\n### `slices` Package (Go 1.21+)\n\nKey functions: `Sort`\u002F`SortFunc`, `BinarySearch`, `Contains`, `Compact`, `Grow`. For `Clone`, `Equal`, `DeleteFunc` → see `samber\u002Fcc-skills-golang@golang-safety` skill.\n\n**[Slice Internals Deep Dive](.\u002Freferences\u002Fslice-internals.md)** — Full `slices` package reference, growth mechanics, `len` vs `cap`, header copying, backing array aliasing.\n\n## Map Internals\n\nMaps are hash tables with 8-entry buckets and overflow chains. They are reference types — assigning a map copies the pointer, not the data.\n\n### Preallocation\n\n```go\nm := make(map[string]*User, len(users)) \u002F\u002F avoids rehashing during population\n```\n\n### `maps` Package Quick Reference (Go 1.21+)\n\n| Function          | Purpose                      |\n| ----------------- | ---------------------------- |\n| `Collect` (1.23+) | Build map from iterator      |\n| `Insert` (1.23+)  | Insert entries from iterator |\n| `All` (1.23+)     | Iterator over all entries    |\n| `Keys`, `Values`  | Iterators over keys\u002Fvalues   |\n\nFor `Clone`, `Equal`, sorted iteration → see `samber\u002Fcc-skills-golang@golang-safety` skill.\n\n**[Map Internals Deep Dive](.\u002Freferences\u002Fmap-internals.md)** — How Go maps store and hash data, bucket overflow chains, why maps never shrink (and what to do about it), comparing map performance to alternatives.\n\n## Arrays\n\nFixed-size, value types. Copied entirely on assignment. Use for compile-time-known sizes:\n\n```go\ntype Digest [32]byte           \u002F\u002F fixed-size, value type\nvar grid [3][3]int             \u002F\u002F multi-dimensional\ncache := map[[2]int]Result{}   \u002F\u002F arrays are comparable — usable as map keys\n```\n\nPrefer slices for everything else — arrays cannot grow and pass by value (expensive for large sizes).\n\n## container\u002F Standard Library\n\n| Package          | Data Structure                 | Best For                                      |\n| ---------------- | ------------------------------ | --------------------------------------------- |\n| `container\u002Flist` | Doubly-linked list             | LRU caches, frequent middle insertion\u002Fremoval |\n| `container\u002Fheap` | Min-heap (priority queue)      | Top-K, scheduling, Dijkstra                   |\n| `container\u002Fring` | Circular buffer                | Rolling windows, round-robin                  |\n| `bufio`          | Buffered reader\u002Fwriter\u002Fscanner | Efficient I\u002FO with small reads\u002Fwrites         |\n\nContainer types use `any` (no type safety) — consider generic wrappers. **[Container Patterns, bufio, and Examples](.\u002Freferences\u002Fcontainers.md)** — When to use each container type, generic wrappers to add type safety, and `bufio` patterns for efficient I\u002FO.\n\n## strings.Builder vs bytes.Buffer\n\nUse `strings.Builder` for pure string concatenation (avoids copy on `String()`), `bytes.Buffer` when you need `io.Reader` or byte manipulation. Both support `Grow(n)`. **[Details and comparison](.\u002Freferences\u002Fcontainers.md)**\n\n## Generic Collections (Go 1.18+)\n\nUse the tightest constraint possible. `comparable` for map keys, `cmp.Ordered` for sorting, custom interfaces for domain-specific ordering.\n\n```go\ntype Set[T comparable] map[T]struct{}\n\nfunc (s Set[T]) Add(v T)          { s[v] = struct{}{} }\nfunc (s Set[T]) Contains(v T) bool { _, ok := s[v]; return ok }\n```\n\n**[Writing Generic Data Structures](.\u002Freferences\u002Fgenerics.md)** — Using Go 1.18+ generics for type-safe containers, understanding constraint satisfaction, and building domain-specific generic types.\n\n## Pointer Types\n\n| Type                      | Use Case                                            | Zero Value |\n| ------------------------- | --------------------------------------------------- | ---------- |\n| `*T`                      | Normal indirection, mutation, optional values       | `nil`      |\n| `unsafe.Pointer`          | FFI, low-level memory layout (6 spec patterns only) | `nil`      |\n| `weak.Pointer[T]` (1.24+) | Caches, canonicalization, weak references           | N\u002FA        |\n\n**[Pointer Types Deep Dive](.\u002Freferences\u002Fpointers.md)** — Normal pointers, `unsafe.Pointer` (the 6 valid spec patterns), and `weak.Pointer[T]` for GC-safe caches that don't prevent cleanup.\n\n## Copy Semantics Quick Reference\n\n| Type                             | Copy Behavior                       | Independence          |\n| -------------------------------- | ----------------------------------- | --------------------- |\n| `int`, `float`, `bool`, `string` | Value (deep copy)                   | Fully independent     |\n| `array`, `struct`                | Value (deep copy)                   | Fully independent     |\n| `slice`                          | Header copied, backing array shared | Use `slices.Clone`    |\n| `map`                            | Reference copied                    | Use `maps.Clone`      |\n| `channel`                        | Reference copied                    | Same channel          |\n| `*T` (pointer)                   | Address copied                      | Same underlying value |\n| `interface`                      | Value copied (type + value pair)    | Depends on held type  |\n\n## Third-Party Libraries\n\nFor advanced data structures (trees, sets, queues, stacks) beyond the standard library:\n\n- **`emirpasic\u002Fgods`** — comprehensive collection library (trees, sets, lists, stacks, maps, queues)\n- **`deckarep\u002Fgolang-set`** — thread-safe and non-thread-safe set implementations\n- **`gammazero\u002Fdeque`** — fast double-ended queue\n\nWhen using third-party libraries, refer to their official documentation and code examples for current API signatures. Context7 can help as a discoverability platform.\n\n## Cross-References\n\n- → See `samber\u002Fcc-skills-golang@golang-performance` skill for struct field alignment, memory layout optimization, and cache locality\n- → See `samber\u002Fcc-skills-golang@golang-safety` skill for nil map\u002Fslice pitfalls, append aliasing, defensive copying, `slices.Clone`\u002F`Equal`\n- → See `samber\u002Fcc-skills-golang@golang-concurrency` skill for channels, `sync.Map`, `sync.Pool`, and all sync primitives\n- → See `samber\u002Fcc-skills-golang@golang-design-patterns` skill for `string` vs `[]byte` vs `[]rune`, iterators, streaming\n- → See `samber\u002Fcc-skills-golang@golang-structs-interfaces` skill for struct composition, embedding, and generics vs `any`\n- → See `samber\u002Fcc-skills-golang@golang-code-style` skill for slice\u002Fmap initialization style\n\n## Common Mistakes\n\n| Mistake                                                | Fix                                                                                                   |\n| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |\n| Growing a slice in a loop without preallocation        | Each growth copies the entire backing array — O(n) per growth. Use `make([]T, 0, n)` or `slices.Grow` |\n| Using `container\u002Flist` when a slice would suffice      | Linked lists have poor cache locality (each node is a separate heap allocation). Benchmark first      |\n| `bytes.Buffer` for pure string building                | Buffer's `String()` copies the underlying bytes. `strings.Builder` avoids this copy                   |\n| `unsafe.Pointer` stored as `uintptr` across statements | GC can move the object between statements — the `uintptr` becomes a dangling reference                |\n| Large struct values in maps (copying overhead)         | Map access copies the entire value. Use `map[K]*V` for large value types to avoid the copy            |\n\n## References\n\n- [Go Data Structures (Russ Cox)](https:\u002F\u002Fresearch.swtch.com\u002Fgodata)\n- [The Go Memory Model](https:\u002F\u002Fgo.dev\u002Fref\u002Fmem)\n- [Effective Go](https:\u002F\u002Fgo.dev\u002Fdoc\u002Feffective_go)\n",{"name":5,"license":15,"metadata":24,"description":7,"allowed-tools":34,"compatibility":35,"user-invocable":36},{"author":25,"version":26,"openclaw":27},"samber","1.1.3",{"emoji":28,"install":29,"homepage":30,"requires":31},"🗃",[],"https:\u002F\u002Fgithub.com\u002Fsamber\u002Fcc-skills-golang",{"bins":32},[33],"go","Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent","Designed for Claude Code or similar AI coding agents, and for projects using Golang.",true,"main","31f700aa9c9e5d7b2fd01b0e5317d543b5321edd",".agents\u002Fskills\u002Fgolang-data-structures","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please","https:\u002F\u002Fgithub.com\u002Fsushichan044","A software engineer with a passion for novels and music.","2026-07-27 19:13:11",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":36},[46,49,52],{"tool":47,"command":48},"npx","npx skills add sushichan044\u002Fmergeable-please --skill golang-data-structures",{"tool":50,"command":51},"bunx","bunx skills add sushichan044\u002Fmergeable-please --skill golang-data-structures",{"tool":53,"command":54},"pnpm","pnpm dlx skills add sushichan044\u002Fmergeable-please --skill golang-data-structures","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-data-structures\u002FSKILL.md",[57,63,67,71,75,79],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"evals\u002Fevals.json","REFERENCE","参考文档",21903,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-data-structures\u002Fevals\u002Fevals.json",{"path":64,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fcontainers.md",4642,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-data-structures\u002Freferences\u002Fcontainers.md",{"path":68,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fgenerics.md",2763,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-data-structures\u002Freferences\u002Fgenerics.md",{"path":72,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fmap-internals.md",2721,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-data-structures\u002Freferences\u002Fmap-internals.md",{"path":76,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fpointers.md",3787,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-data-structures\u002Freferences\u002Fpointers.md",{"path":80,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fslice-internals.md",2151,"https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-data-structures\u002Freferences\u002Fslice-internals.md",[84,91,98,105,112,119],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M77MZJHND7VXTPF66H9VCNPM","mergeable-please","Drive a GitHub pull request toward mergeable. Run when asked to \"make a PR mergeable\", \"loop until the PR is ready\", \"fix the PR until CI\u002Fconflicts\u002Freviews pass\", or similar. Repeatedly runs `mergeable-please check`, resolves each reported blocker (conflicts, behind-base, failing\u002Fpending required CI, reviewer-loop goals), and loops until the tool reports satisfied.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002Fskills\u002Fmergeable-please\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},"01M77MY6QVZ5GZE04ZBSSJARQ3","golang-troubleshooting","Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve debugger, race detection, GODEBUG tracing, and production debugging. Start here for any 'something is wrong' situation. Not for interpreting profiles or benchmarking (→ See `samber\u002Fcc-skills-golang@golang-benchmark` skill) or applying optimization patterns (→ See `samber\u002Fcc-skills-golang@golang-performance` skill).","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-troubleshooting\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},"01M77MXZ5D1S2951R8HJFCTWJG","golang-testing","Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI, or debugging flaky\u002Fslow tests. For testify-specific APIs see `samber\u002Fcc-skills-golang@golang-stretchr-testify`; for measurement methodology see `samber\u002Fcc-skills-golang@golang-benchmark`.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-testing\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},"01M77MXPRC35GB96PS0BHN15BN","golang-structs-interfaces","Golang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers. Use this skill when designing Go types, defining or implementing interfaces, embedding structs or interfaces, writing type assertions or type switches, adding struct field tags for JSON\u002FYAML\u002FDB serialization, or choosing between pointer and value receivers. Also use when the user asks about \"accept interfaces, return structs\", compile-time interface checks, or composing small interfaces into larger ones.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-structs-interfaces\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M77MXGQQ0VAA0N0V4HFPM8FV","golang-stretchr-testify","Comprehensive guide to stretchr\u002Ftestify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification, suite lifecycle, and advanced patterns like Eventually, JSONEq, and custom matchers. Apply when the codebase imports github.com\u002Fstretchr\u002Ftestify.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-stretchr-testify\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M77MXA0301S3ZMGNQFA1XYPQ","golang-spf13-cobra","Golang CLI command tree library using spf13\u002Fcobra — cobra.Command, RunE vs Run, PersistentPreRunE hook chain, Args validators (NoArgs, ExactArgs, MatchAll, custom), persistent vs local flags, command groups, ValidArgsFunction, RegisterFlagCompletionFunc, ShellCompDirective, usage\u002Fhelp template customization, man-page and markdown doc generation, and testing with SetArgs\u002FSetOut\u002FSetErr. Apply when using or adopting spf13\u002Fcobra, or when the codebase imports `github.com\u002Fspf13\u002Fcobra`. For configuration layering alongside cobra, see the `samber\u002Fcc-skills-golang@golang-spf13-viper` skill. For general CLI architecture (project layout, exit codes, signal handling, I\u002FO patterns), see `samber\u002Fcc-skills-golang@golang-cli`.","https:\u002F\u002Fgithub.com\u002Fsushichan044\u002Fmergeable-please\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgolang-spf13-cobra\u002FSKILL.md",[],[]]