golang-modernize

Modernize Go codebases with idiomatic patterns and updated tooling.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Many Go codebases lag behind recent language improvements, deprecated APIs accumulate, and CI/tooling configurations become outdated, causing maintenance burden and potential security or correctness issues. This Skill identifies safe modernization opportunities, prioritizes safety-critical fixes, and provides actionable, incremental changes so teams can adopt new Go features and tooling without risky large-scale rewrites.

Core Features & Use Cases

  • Context-aware suggestions: offers file-scoped inline modernizations during active development and broader full-repo scans for CI-driven modernization.
  • Language and standard library migrations: recommends replacements for deprecated packages and idioms across Go 1.21–1.26 (e.g., min/max, slices/maps, os.Root, errors.AsType).
  • Tooling and CI upgrades: detects lint/tooling gaps, suggests golangci-lint modernization, govulncheck integration, and safer dependency updates with changelog checks.
  • Safe, prioritized workflow: runs go.mod detection, respects a .modernize ignore list, validates changelogs before updating dependencies, and generates an ordered migration priority guide.

Quick Start

Run the golang-modernize skill to scan the repository, detect Go version and modernization opportunities, and produce prioritized, safety-first modernization suggestions.

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 codebases to use new language features safely?

You can modernize Go codebases by scanning the repository to detect the Go version via go.mod and identify opportunities to adopt recent standard library improvements like slices, maps, and os.Root. The process generates prioritized, incremental code changes.

What is the best way to integrate golangci-lint modernization into CI?

Integrating golangci-lint modernization into CI involves running full-repo scans that detect lint gaps and suggest tooling upgrades. This includes govulncheck integration and safer dependency updates validated by changelog checks.

Can I get inline modernization suggestions for deprecated Go APIs during active editing?

Yes, you can get inline modernization suggestions for deprecated Go APIs during active editing. The tool offers context-aware, file-scoped recommendations to replace deprecated packages and idioms across Go 1.21–1.26.

Does the modernization process respect existing ignore lists and safety constraints?

Yes, the modernization process respects existing ignore lists and safety constraints by checking .modernize ignore entries and verifying changelogs before updating dependencies. It prioritizes safety-critical fixes to avoid risky large-scale rewrites.

Why should I use an automated refactoring tool instead of manually updating deprecated Go packages?

Using an automated refactoring tool avoids risky large-scale rewrites and reduces maintenance burden. It identifies safe modernization opportunities across Go 1.21–1.26, providing actionable incremental changes for deprecated APIs and outdated tooling configurations.