Agent skill

go-nil

Go nil safety patterns. Routes to specific traps.

Stars 3
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/JamesPrial/claudefiles/tree/main/skills/golang/nil

SKILL.md

Nil Safety

Route by Type

  • Interface nil trap → see interface/
  • Map nil writes → see map/
  • Slice zero-value → see slice/
  • Pointer receivers → see pointer/

Quick Check

  • Check pointers before deref
  • Check maps before write
  • Typed nil != nil interface

Common Gotcha

go
var p *int
if p == nil {  // true
    fmt.Println("nil pointer")
}

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results