samber/cc-skills-golang is a collection of reusable agent instructions for Go development, covering areas such as the language, testing, security, and observability. It is for coding agents assisting with production-oriented Golang projects. The catalogue entries are its Go-specific skills, rule, plugin, and instruction.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add samber/cc-skills-golang --skill golang-data-structuresgit clone --depth 1 https://github.com/samber/cc-skills-golangWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/samber/cc-skills-golang/golang-data-structures)<a href="https://agentmods.dev/skills/samber/cc-skills-golang/golang-data-structures"><img src="https://agentmods.dev/badge/skills/samber/cc-skills-golang/golang-data-structures/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/samber/cc-skills-golang/golang-data-structures"><img src="https://agentmods.dev/badge/skills/samber/cc-skills-golang/golang-data-structures.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- Socket pass
- Snyk pass
- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00126 | $0.02646 |
| Opus 5.5 | $0.00050 | $0.01058 |
| Sonnet 5.5 | $0.00025 | $0.00529 |
| Haiku 4.5 | $0.00013 | $0.00265 |
Grade A, and why
golang-data-structures scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
2 near-identical copies found in the catalogue:
- golang-data-structures — 97% identical, 26 lines differ
- golang-data-structures — 97% identical, 22 lines differ
How it starts
The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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-safetyskill. - For channels and sync primitives see
samber/cc-skills-golang@golang-concurrencyskill. - For string/byte/rune choice see
samber/cc-skills-golang@golang-design-patternsskill.
Best Practices Summary
- Preallocate slices and maps with
make(T, 0, n)/make(map[K]V, n)when size is known or estimable — avoids repeated growth copies and rehashing - Arrays SHOULD be preferred over slices only for fixed, compile-time-known sizes (hash digests, IPv4 addresses, matrix dimensions)
- 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
- Use
container/heapfor priority queues,container/listonly when frequent middle insertions are needed,container/ringfor fixed-size circular buffers strings.BuilderMUST be preferred for building strings;bytes.BufferMUST be preferred for bidirectional I/O (implements bothio.Readerandio.Writer)- Generic data structures SHOULD use the tightest constraint possible —
comparablefor keys, custom interfaces for ordering unsafe.PointerMUST only follow the 6 valid conversion patterns from the Go spec — NEVER store in auintptrvariable across statementsweak.Pointer[T](Go 1.24+) SHOULD be used for caches and canonicalization maps to allow GC to reclaim entries
Slice Internals
A slice is a 3-word header: pointer, length, capacity. Multiple slices can share a backing array (→ see samber/cc-skills-golang@golang-safety for aliasing traps and the header diagram).
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago Changed · +8 lines 36d804754152
- 3mo ago Changed · +30 tokens per session 1be8c088a2c8
- 3mo ago First seen · 187 lines · 96 tokens per session scan A 68284ec2c6b9
golang-data-structures is a skill published in the GitHub repository samber/cc-skills-golang (4,051 stars, last pushed 2d ago), licensed MIT. It adds 126 tokens to every session and 2,646 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
golang-data-structures compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| golang-data-structuressamber/cc-skills-golang | Skill | 4.1k | 2d ago | MIT | A | 126 | Claude Code |
| stack-trace-go-probeopensquilla/opensquilla | Skill | 7.2k | 7d ago | Apache-2.0 | A | 42 | Claude Code |
| golang-prormyndharis/antigravity-skills | Skill | 2.2k | 2d ago | MIT | A | 57 | Claude Code, Codex |
| go-concurrency-patternsrmyndharis/antigravity-skills | Skill | 2.2k | 2d ago | MIT | A | 37 | Claude Code, Codex |
| site-launch-checklistsamber/cc-skills | Skill | 368 | 3d ago | MIT | A | 206 | Claude Code |
| copywriting-hookssamber/cc-skills | Skill | 368 | 3d ago | MIT | A | 172 | Claude Code |
| chrome-extensionsamber/cc-skills | Skill | 368 | 3d ago | MIT | A | 143 | Claude Code |