Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log aggregation 3rd-party tools.
安装
npx skills add samber/cc-skills-golang --skill golang-error-handlingnpx skills add samber/cc-skills-golang --skill golang-error-handling -a claude-code -gnpx skills add samber/cc-skills-golang --skill golang-error-handling -a codex -ggemini skills install https://github.com/samber/cc-skills-golang.git --path skills/golang-error-handlinggh skill install samber/cc-skills-golang golang-error-handlinggit clone --depth 1 https://github.com/samber/cc-skills-golang /tmp/samber__cc-skills-golang
mkdir -p ~/.claude/skills ~/.agents/skills
cp -R /tmp/samber__cc-skills-golang/skills/golang-error-handling ~/.claude/skills/golang-error-handling # Claude Code
cp -R /tmp/samber__cc-skills-golang/skills/golang-error-handling ~/.agents/skills/golang-error-handling # Codex, Cursor, Gemini CLI, Copilot, OpenCode