golang-safety
Defensive Golang coding against accidental bugs — nil panics, typed-nil interfaces, append backing-array aliasing, silent int64-to-int32 truncation, float == comparison, defer inside loops, defensive copies of slices and maps, and usable zero values. Use when a Go program panics on a nil map write or nil pointer dereference, when reviewing code for nil-safety, numeric conversion overflow, or resource lifecycle, or…
- installs 8w
- 4,581
- 30-day movement
- starts with the next reading
- Related entries
- 1
- Connections
- 1
An agent skill (SKILL.md) covering defensive Go coding against accidental bugs: nil panics and typed-nil interfaces, slice/map aliasing, silent integer truncation, float comparison, defer in loops, defensive copies, and zero-value design. It bundles references on nil safety and slice/map safety, and cross-references separate skills for concurrency, security, and troubleshooting.
Reach for it when you want to catch common Go programmer mistakes — panics and silent data corruption — while writing or reviewing code, without conflating them with concurrency or security concerns.
Use it to
- Diagnose a nil map write or nil pointer dereference panic
- Review code for nil-safety and typed-nil interface bugs
- Check numeric conversions for silent overflow or float equality issues
- Fix defer-in-loop resource accumulation
- Design a type with a safe, usable zero value
For Go developers writing or reviewing everyday, non-adversarial code
- Host repository
- samber/cc-skills-golang
- Version
- 1.3.2
- Installs, lifetime
- 39k
- Installs, 8 weeks
- 4,581
- Allowed tools
- Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent
- Compatible with
- Designed for Claude Code, Codex or similar harness, and for projects using Golang.
- Licence
- MIT
- Invocable by
- user
- Host stars
- 3,292
- Host language
- Go