go-modernize

Community

Update Go code to modern language patterns

Authoreduardo-sl
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Modernize legacy Go codebases that still use pre-generics idioms, manual slice/map utilities, unstructured logging, and outdated error handling so they safely adopt newer language features and standard library improvements.

Core Features & Use Cases

  • Generics migration: Replace interface{} utilities with type parameters for type-safe containers and helpers.
  • Structured logging: Migrate ad-hoc log.Printf usage to log/slog for structured logs where appropriate.
  • Error and collection utilities: Replace manual error accumulation with errors.Join and hand-written slice/map loops with slices/maps helpers.
  • Language idioms: Convert classic for-loop patterns to range-over-int and adopt iterators where available.
  • Use Case: Upgrade a service repository from Go 1.16 to Go 1.22+ by updating go.mod, replacing utility code with stdlib features, and following the verification checklist.

Quick Start

Ask the agent to modernize the repository to Go 1.22+, replacing interface{} utilities with generics, switching log.Printf to slog where suitable, using errors.Join for aggregated errors, and applying slices and maps helpers as recommended.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 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: go-modernize
Download link: https://github.com/eduardo-sl/go-agent-skills/archive/main.zip#go-modernize

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.