smithery/JamesPrial

go-nil

Go nil safety patterns. Routes to specific traps.

Installation

$ npx skills add smithery/JamesPrial --skill go-nil

Also in this package

Other skills from smithery/JamesPrial · top by installs.

npx skills add smithery/JamesPrial

Browse all from smithery/JamesPrial

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 509 B
  • docs SUMMARY.md 63 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Nil Safety

Route by Type

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

Quick Check

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

Common Gotcha

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