Giverny

Golang Safety

Defensive Golang coding against accidental bugs — nil panics, typed-nil interfaces, `append` backing-array aliasing, silent int64-to-int32 truncation, float `==` comparison…

by samber★ 4,015Languages

What Golang Safety does

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-co

How to install Golang Safety in Claude Code

Giverny gives you a ready prompt with the exact install command from samber/cc-skills-golang. Sign in with GitHub, copy the prompt and paste it into Claude Code; Claude installs the skill and confirms it loaded. To install by hand, clone samber/cc-skills-golang and copy the skills/golang-safety folder into ~/.claude/skills/.

How to use it

Once installed, Claude loads Golang Safety on its own whenever your request matches what the skill does. You can also ask for it by name, for example: “Use the golang-safety skill on my current project.”

More Claude skills for languages