golang-safety
golang-safety is an agent skill published by samber, listed under review & testing. It lives in the samber/cc-skills-golang repository, which has 3,672 GitHub stars and is licensed under MIT; we last read it on 2026-09-16.
Provides defensive coding practices in Golang to prevent common issues such as nil panics, typed-nil interfaces, append backing-array aliasing, int64-to-int32 truncation, float equality comparison, defer inside loops, and unsafe slice and map operations. Useful for ensuring nil safety, numeric conversions, and resource management in Go programs.
Install
skills is a generic installer for any repository of Claude agent skills -- it reads samber/cc-skills-golang’s own structure rather than assuming one, the same way this page reads the skill’s own SKILL.md rather than assuming a format.
npx skills add samber/cc-skills-golang
Maintenance
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 when designing a type whose zero value must be safe. Not for designing concurrent access with goroutines, channels, or sync primitives (→ See `samber/cc-skills-golang@golang-concurrency` skill), not for exploitable vulnerabilities such as injection, weak crypto, or leaked secrets (→ See `samber/cc-skills-golang@golang-security` skill), and not for debugging an already-failing program (→ See `samber/cc-skills-golang@golang-troubleshooting` skill).
golang-safety compared with similar skills
| Skill | Publisher | What it does | Repo stars | Last update |
|---|---|---|---|---|
| golang-safety (this page) | samber | Defensive Golang coding against accidental bugs — nil panics, typed-nil interfaces, `append` backing-array al… | 3,672 | 2026-10-23 |
| golang-benchmark(same repository) | samber | Golang benchmarking, profiling, and performance measurement. Use when writing, running, or comparing Go bench… | 3,672 | 2026-10-23 |
| golang-cli(same repository) | samber | Golang CLI application development. Use when building, modifying, or reviewing a Go CLI tool — especially for… | 3,672 | 2026-10-23 |
| golang-concurrency(same repository) | samber | Golang concurrency design — goroutine lifecycle and leak prevention, channels and `select`, channel ownership… | 3,672 | 2026-10-23 |
| golang-context(same repository) | samber | Idiomatic context.Context usage in Golang — propagation through API boundaries, cancellation, timeouts and de… | 3,672 | 2026-10-23 |
| golang-database(same repository) | samber | Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transa… | 3,672 | 2026-10-23 |
| golang-grpc(same repository) | samber | Provides gRPC usage guidelines, protobuf organization, and production-ready patterns for Golang microservices… | 3,672 | 2026-10-23 |
Skills from the same repository first, then others for this job by repository stars. Figures are from each repository when we last read it.
Common questions about golang-safety
- What does golang-safety do?
- Provides defensive coding practices in Golang to prevent common issues such as nil panics, typed-nil interfaces, append backing-array aliasing, int64-to-int32 truncation, float equality comparison, defer inside loops, and unsafe slice and map operations. Useful for ensuring nil safety, numeric conversions, and resource management in Go programs.
- How do I install golang-safety?
- Run npx skills add samber/cc-skills-golang. The skills installer reads the repository’s own structure, so it works for any repository of agent skills.
- Who publishes golang-safety?
- samber.
- Is golang-safety maintained, and what licence does it use?
- Its repository has 3,672 GitHub stars and its state in our directory is listed. Its last commit we recorded was on 2026-10-23. The repository declares the MIT licence.
More agent skills for review & testing
- browser-testing-with-devtoolsby addyosmani
- code-review-and-qualityby addyosmani
- code-simplificationby addyosmani
- doubt-driven-developmentby addyosmani
- vitestby antfu
- webapp-testingby anthropic