golang-safety - Defensive Golang Coding for Correctness and Safety
Provides defensive Go coding practices to prevent panics, silent data corruption, and subtle runtime bugs.
Tags
Updated: 2026-09-23Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Prevent nil-related runtime panics
- Perform defensive slice copying
- Check integer overflow during conversion
- Compare floats using epsilon values
- Extract loop body for defer execution
- Use safe comma-ok type assertions
Inputs
- Go source code files
- Codebase under review
Outputs
- Defensive Go code modifications
- Code safety review recommendations
Requirements
- Go toolchain
- golangci-lint binary
- Git binary
- Claude Code or compatible AI agent
