go-nil-pointer

Implement nil-safe behavior for Go methods with pointer receivers.

3|Updated Nov 28, 2025
Search Tags:#go#nil#pointer
One-click install
npx skills add https://github.com/JamesPrial/claudefiles --skill go-nil-pointer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-nil-pointer
Source: https://github.com/JamesPrial/claudefiles/tree/main/skills/golang/nil/pointer
Command: npx skills add https://github.com/JamesPrial/claudefiles --skill go-nil-pointer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Methods with pointer receivers can be called on nil; define sensible nil-safe behavior.

Core Features & Use Cases

  • Nil Receiver Handling: Return sane defaults when receiver is nil.
  • Usage Guidance: Document when nil-safety is expected vs. when to panic.

Quick Start

Add a nil-check at method start and implement zero-value behavior for nil receivers.