Skip to content
Back to skills

Nil

ASecurity

Go nil safety patterns. Routes to specific traps.

  • 3 stars
  • 0 votes
  • 0 copies
  • 17 views
  • Added February 7, 2026
developmentgo

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add JamesPrial/claudefiles --skill nil --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nil?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nil
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jamesprial-nil/badge)](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.

Download with Pro
SKILL.md
---
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.md509 B
  • interface/SKILL.md1 KB
  • map/SKILL.md840 B
  • pointer/SKILL.md1.1 KB
  • slice/SKILL.md1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.