golang-modernize

Identify and apply Go 1.21–1.26 modernization opportunities across codebases.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/osmanozen/go-commerce --skill golang-modernize-osmanozen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golang-modernize
Source: https://github.com/osmanozen/go-commerce/tree/main/.agents/skills/golang-modernize
Command: npx skills add https://github.com/osmanozen/go-commerce --skill golang-modernize-osmanozen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps Go projects stay up-to-date by identifying modernization opportunities and applying Go 1.21–1.26 improvements across codebases, ensuring safer and more idiomatic code.

Core Features & Use Cases

  • Scans a repository for Go modernization opportunities aligned with targeted Go versions, including deprecations, idiom changes, and standard library upgrades.
  • Provides context-aware modernization prompts that you can apply in CI, code reviews, or during refactors, with prioritized recommendations.
  • Great for teams upgrading Go versions, auditing legacy code, or building CI automation that enforces modern Go practices.

Quick Start

Run the modernization flow on your Go project to generate actionable recommendations and migrated snippets.

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 idioms and standard library features?

Go modernization scans repositories for Go 1.21–1.26 upgrade opportunities, applying idiom improvements and standard library enhancements. It provides context-aware suggestions, checks go.mod files, consults release notes, and respects the .modernize ignore list for safe codebase transitions.

Can I use golangci-lint to automate Go modernization in CI pipelines?

Yes, golangci-lint modernize can be optionally run as part of the workflow to enforce modern Go practices in CI. This automation handles incremental changes for targeted Go versions, making it suitable for teams upgrading Go versions or auditing legacy code.

What is the best way to upgrade a legacy Go codebase to modern idioms?

Modernizing legacy Go code involves scanning for deprecations, idiom changes, and standard library upgrades aligned with targeted Go versions. Prioritized recommendations and migrated snippets are generated, ensuring safer and more idiomatic code during refactoring or code reviews.

Does Go modernization respect existing module configurations like go.work?

Yes, Go modernization enforces safety and correctness by checking go.mod and go.work files before applying changes. It respects the .modernize ignore list to skip specific files or directories, ensuring modernization fits your existing module setup.

How does Go modernization handle incremental version upgrades?

Go modernization handles incremental changes by targeting specific Go versions from 1.21 to 1.26. It consults release notes to provide context-aware suggestions, ensuring upgrades are applied gradually and safely across the codebase.