Go nil safety patterns. Routes to specific traps.
Pro scans all 5 files and shows the line behind each finding
Scanned 2/12/2026
npx -y skills add JamesPrial/claudefiles --skill nil --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Nil?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/jamesprial-nil)More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.
---
name: go-nil
description: Go nil safety patterns. Routes to specific traps.
---
# 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
```go
var p *int
if p == nil { // true
fmt.Println("nil pointer")
}
```
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!