LogoClawIndex
CasesSkillsAbout
LogoClawIndex

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-23
golangdefensive-codingnil-safetycode-correctnesslinter

Capabilities

Prevent nil-related runtime panicsPerform defensive slice copyingCheck integer overflow during conversionCompare floats using epsilon values

Typical Inputs

Go source code filesCodebase under review

Typical Outputs

Defensive Go code modificationsCode safety review recommendations

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

Source

  • Spec: SKILL.md

ClawIndex

OpenClaw Skills & Use Case Index

ClawIndex is an ecosystem-driven index of OpenClaw skills and real-world use cases.

Index

Skills·
Cases

Meta

About·
Disclaimer·
Email·
GitHub
© 2026 ClawIndex All Rights Reserved.