Skip to content
G

golang-safety

Defensive Golang coding against accidental bugs

by samberFree

#3352in AI Skills
0In stores

Description

golang-safety is an agent skill from the samber cc-skills-golang collection that guides a coding agent to write defensive Go code that avoid…

Highlights

  • Guards against nil panics and nil maps
  • Typed nil interface pitfalls
  • append aliasing and defensive copies
  • Integer truncation and float comparison
  • Useful zero values and sync.Once
  • Installs from skills.sh

Ratings & Reviews

No ratings yet

Be the first to rate golang-safety.

People also visit

G

golang-security

Security best practices and vulnerability prevention for Golang

AI Skills
Get
G

golang-error-handling

Idiomatic Golang error handling

AI Skills
Get
G

golang-design-patterns

Idiomatic Golang design patterns

AI Skills
Get
G

golang-troubleshooting

Troubleshoot Golang programs systematically - find and fix the root cause

AI Skills
Get
G

golang-data-structures

Golang data structures

AI Skills
Get
G

golang-patterns

Idiomatic Go patterns, best practices, and conventions for building robust

AI Skills
Get

golang-safety FAQ

What does this skill cover?

Defensive Go coding against accidental bugs: nil panics, typed nil interfaces, append aliasing, integer truncation and float comparisons.

How is safety different from security?

The skill says security handles attackers, and safety handles programmer mistakes in normal code.

Why does a nil map panic?

Writing to a nil map panics, so the skill says to initialise maps before use.

What is the append problem?

append may reuse the backing array, so two slices can share memory and silently overwrite each other.

How do I install it?

Run npx skills add https://github.com/samber/cc-skills-golang --skill golang-safety.

What are the security audit results?

skills.sh lists three audits: Gen Agent Trust Hub Pass, Socket Pass and Snyk Pass.

What are the best golang-safety alternatives?

Popular alternatives to golang-safety include golang-security, golang-error-handling and golang-design-patterns. See all golang-safety alternatives

Developer Stuff

Badges