samber avatar

Golang Data Structures

This is your reference when you need to think about Go data structure internals rather than just reaching for the first thing that works. It covers slice capacity growth mechanics, map bucket implementation, when to actually use container/heap or container/ring, and the strings.Builder versus bytes.Buffer question. The real value is in the preallocation guidance and the unsafe.Pointer patterns, which follow the six valid conversions from the spec. If you're writing generic collections or trying to decide whether a weak pointer makes sense for your cache, the examples are concrete. Pairs well with the golang-safety skill from the same author for the aliasing and nil map traps.

skills.sh installs
41.8K
GitHub stars
3.8K
last updated
Aug 21, 2026

Install

$ npx -y skills add samber/cc-skills-golang --skill golang-data-structures --agent claude-code

Installs into .claude/skills of the current project.

Files

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.

Go Data Structures

Built-in and standard library data structures: internals, correct usage, and selection guidance.

  • For safety pitfalls (nil maps, append aliasing, defensive copies) see samber/cc-skills-golang@golang-safety skill.
  • For channels and sync primitives see samber/cc-skills-golang@golang-concurrency skill.
  • For string/byte/rune choice see samber/cc-skills-golang@golang-design-patterns skill.

Best Practices Summary

Sponsors

Details

Repository
github.com/samber/cc-skills-golang
Categories
Rust, Go
First seen
Apr 16, 2026

More from samber/cc-skills-golang

All 47

Recommended

More Rust
1convex avatarconvex-authzconvex/agent-skillsAudit and harden a Convex app's authorization: identity-from-arg impersonation, missing per-document ownership checks, public queries leaking data by a client-s41.3Kskills.sh installs
2convex avatarconvex-explain-appconvex/agent-skillsExplain an existing Convex app — data model + relationships, public vs internal functions, auth/ownership model, components, a request→data flow — read from the41Kskills.sh installs
3jimliu avatarrelease-skillsjimliu/baoyu-skillsUniversal release workflow. Auto-detects version files and changelogs. Supports Node.js, Python, Rust, Claude Plugin, GitHub Releases, annotated tags, historica25.9Kskills.sh installs
4okx avatarokx-dapp-discoveryokx/onchainos-skillsPlugin router for 20 third-party DeFi protocols (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kami16.7Kskills.sh installs
5okx avatarokx-defiokx/onchainos-skillsOKX-aggregated DeFi (no specific DApp named) — product discovery, deposit/withdraw/claim execution, AND positions viewing. **If the user names ANY third-party p12Kskills.sh installs
6ljagiello avatarctf-reverseljagiello/ctf-skillsProvides reverse engineering techniques for CTF challenges. Use when the main job is to understand how a compiled, obfuscated, packed, or virtualized target wor10.9Kskills.sh installs