What problem does it solve? Choosing the wrong Go data structure causes hidden performance costs: repeated slice growth copies, map rehashing, unnecessary struct copies on map access, and GC pressure from poor pointer choices. This Skill provides internals-level guidance so you pick the right structure based on memory layout, allocation cost, and access patterns. ## Core Features & Use Cases - Slice and Map Internals: Explains capacity growth mechanics, preallocation with make(T, 0, n), the slices and maps packages (Go 1.21+), and why Go maps never shrink their bucket arrays. - Standard Library Containers: Covers container/list, container/heap, container/ring, and bufio, including when linked lists lose to slices due to cache locality. - Generics and Pointers: Guidance on tight constraints (comparable, cmp.Ordered), the 6 valid unsafe.Pointer patterns, and weak.Pointer[T] with runtime.AddCleanup for GC-friendly caches (Go 1.24+). - Use Case: When building a priority-queue task scheduler, an LRU cache, or a string interning table, this Skill tells you exactly which structure, constraint, and copy semantics to use. ## Quick Start Ask the AI to help you choose or implement the right Go data structure for your task, such as writing a generic Set or diagnosing why a map's memory never shrinks after deletions.