golang-modernize

Modernize Go codebases to Go 1.21–1.26 idioms and APIs.

5|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/omarluq/og-template --skill golang-modernize-omarluq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-modernize
Source: https://github.com/omarluq/og-template/tree/main/.agents/skills/golang-modernize
Command: npx skills add https://github.com/omarluq/og-template --skill golang-modernize-omarluq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go modernization automates the process of updating Go codebases to leverage the latest idioms, language features, and standard library improvements, reducing technical debt and improving safety and maintainability.

Core Features & Use Cases

  • Analyze and surface modernization opportunities aligned with Go 1.21–1.26, including min/max builtins, slices, maps, errors.Is/As usage, and idiomatic patterns.
  • Apply safe, incremental changes across the repository or targeted packages, with optional parallelization for large codebases and CI integration.
  • Document changes, provide guidance for upgrading Go version, and optionally flag ignored suggestions in a .modernize memo.

Quick Start

Run the modernization pass on your Go project to surface recommended changes and begin the upgrade process.

Frequently Asked Questions about golang-modernize

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I modernize Go code to use the latest standard library idioms?

Modernize Go code by upgrading usage to Go 1.21–1.26 idioms, APIs, and tooling. The process surfaces opportunities to adopt builtins like min/max, slices, maps, and errors.Is/As patterns, applying safe and incremental changes across the repository.

What Go language features should I target when upgrading an older codebase?

Target Go 1.21–1.26 features such as the min/max builtins, slices and maps package usage, and idiomatic errors.Is/As patterns. Upgrading to these standard library improvements reduces technical debt and improves codebase maintainability.

Can I run a Go modernization pass across a large monorepo with targeted packages?

Yes, you can apply modernization changes across the entire repository or targeted packages. For large Go codebases, the process uses parallel sub-agents to analyze and update code efficiently while validating builds for safety.

How do I safely upgrade my Go version and integrate modernization checks into CI?

Safely upgrade your Go version by running a modernization pass that integrates with CI and performs go.mod version checks. It validates builds, updates documentation, and logs ignored suggestions in a .modernize memo.

What happens to modernization suggestions I choose to ignore in my Go project?

Ignored modernization suggestions are logged in a .modernize memo file. This optional feature documents skipped changes, ensuring you have a record of unapplied Go 1.21–1.26 idiomatic upgrades for future reference.