Skip to content
G

golang-safety

Defensive Golang coding against accidental bugs

by samberFree

Launch
#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

go-concurrency-patterns

Master Go concurrency with goroutines, channels, sync primitives, and context

AI Skills
Launch
G

golang-code-style

Golang code style conventions

AI Skills
Launch
G

golang-error-handling

Idiomatic Golang error handling

AI Skills
Launch
G

golang-testing

Production-ready Golang tests

AI Skills
Launch
G

golang-security

Security best practices and vulnerability prevention for Golang

AI Skills
Launch
G

golang-design-patterns

Idiomatic Golang design patterns

AI Skills
Launch

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 go-concurrency-patterns, golang-code-style and golang-error-handling. See all golang-safety alternatives

Developer Stuff

Badges