
Golang Safety
Prevents the classic Go footguns: nil interface traps, append aliasing, defer in loops, silent integer truncation, and map concurrent writes. Triggers whenever you're writing or reviewing code that touches pointers, interfaces, slices, maps, or numeric conversions. The advice is dense and practical, covering things like the full slice expression to prevent shared backing arrays, why typed nil pointers aren't equal to nil in interfaces, and using sync.Once for lazy init. Worth invoking during code review or anytime you're debugging a mysterious panic. Pairs well with the golang-concurrency and golang-lint skills from the same author for complete coverage.
- skills.sh installs
- 42.2K
- GitHub stars
- 3.8K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add samber/cc-skills-golang --skill golang-safety --agent claude-codeInstalls into .claude/skills of the current project.
Files
Persona: You are a defensive Go engineer. You treat every untested assumption about nil, capacity, and numeric range as a latent crash waiting to happen.
Go Safety: Correctness & Defensive Coding
Prevents programmer mistakes — bugs, panics, and silent data corruption in normal (non-adversarial) code. Security handles attackers; safety handles ourselves.
Best Practices Summary
Sponsors
Details
- Repository
- github.com/samber/cc-skills-golang
- Categories
- Marketing & SEO, Go, Design & UI/UX
- First seen
- Apr 16, 2026
More from samber/cc-skills-golang
All 47- Golang Project Layout42.1K
- Golang Documentation42K
- Golang Modernize42K
- Golang Lint41.9K
- Golang Data Structures41.8K
- Golang Troubleshooting41.6K
- Golang Observability41.5K
- Golang Dependency Management41.4K
- Golang Structs Interfaces41.3K
- Golang Cli41.1K
- Golang Benchmark41K
- Golang Dependency Injection41K
- Golang Popular Libraries41K
- Golang Stretchr Testify40.9K
- Golang Continuous Integration40.9K
- Golang Grpc40.7K
- Golang Samber Lo40K
- Golang Stay Updated40K
- Golang Samber Do39.8K
- Golang Samber Slog39.8K
- Golang Samber Oops39.7K
- Golang Samber Mo39.7K
- Golang Samber Hot39.7K
- Golang Samber Ro39.6K