go-quirks-and-safety
Installation
SKILL.md
Go Quirks & Safety
What the agent should check for on every Go change, and how to fix each one. This is a defensive checklist — the goal is catching latent panics and leaks before they ship, not after.
Nil checks
Nil maps
| Operation | Result |
|---|---|
| Read from nil map | Returns the zero value — safe |
| Write to nil map | Panics |
len() / range over nil map |
Returns 0 / zero iterations — safe |
// Bad — panics on the write
var m map[string]int
m["key"] = 1