golang-safety
CommunityPrevent panics and subtle bugs in Go code.
Authorsamber
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Golang safety helps teams write robust Go code by preventing nil/interface traps, nil maps, unsafe slice and map aliasing, and silent numeric conversions that lead to panics or subtle bugs.
Core Features & Use Cases
- Defensive patterns for nil values, zero-value types, and safe initialization in production Go projects.
- Defensive copying guidance for exported APIs to protect internal state when returning slices or maps.
- Practical rules & examples for common pitfalls with loops, defer, and conversions, illustrated with concrete code patterns.
Quick Start
Analyze a Go function for nil safety risks and refactor it to use defensive copying and safe initialization patterns.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: golang-safety Download link: https://github.com/samber/cc-skills-golang/archive/main.zip#golang-safety Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.