go-nil

Apply nil-safety patterns to Go interfaces, maps, slices, and pointer receivers.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill introduces nil-safety patterns for interfaces, maps, slices, and pointer receivers to prevent panics and subtle bugs.

Core Features & Use Cases

  • Nil Interfaces: Pattern for typed-nil contained in interfaces.
  • Nil Maps: Safe initialization before writes.
  • Nil Slices: Understanding nil vs empty in encoding and iteration.

Quick Start

Apply nil-safety patterns to a sample Go module and verify with unit tests.