Back to skills
SKILL.md
Nil
ASecurityGo nil safety patterns. Routes to specific traps.
- 3 stars
- 0 votes
- 0 copies
- 17 views
- Added February 7, 2026
Security analysis
100/100Pro scans all 5 files and shows the line behind each finding
npx -y skills add JamesPrial/claudefiles --skill nil --agent claude-codeAre you the author of Nil?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/jamesprial-nil)---
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")
}
```
Files in this skill
- SKILL.md
- interface/SKILL.md
- map/SKILL.md
- pointer/SKILL.md
- slice/SKILL.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.