golang-modernize

Modernize Go source code by replacing outdated patterns and deprecated APIs.

4|Updated May 17, 2026
One-click install
npx skills add https://github.com/hellopoisonx/aim --skill golang-modernize-hellopoisonx
Or copy as Structured Prompt for Agentβ–Ό
Please help me install this Agent Skill.
Skill: golang-modernize
Source: https://github.com/hellopoisonx/aim/tree/main/skills/golang-modernize
Command: npx skills add https://github.com/hellopoisonx/aim --skill golang-modernize-hellopoisonx

SYSTEM DOCUMENTATION & REQUIREMENTS

πŸ’‘ This Skill includes references (resource) components.

What problem does it solve?

It reduces technical debt and bugs in Go projects by updating older patterns, deprecated APIs, and non-idiomatic code to modern Go language features and standard-library improvements.

Core Features & Use Cases

  • Version-aware modernization: Detects the target Go version from go.mod/go.work and prioritizes changes for Go 1.21–1.26+ (with guidance for older targets).
  • Safety-first and prioritized refactors: Emphasizes high-impact correctness and security fixes first (e.g., path traversal, crypto deprecations, vulnerability checks), then readability and maintainability improvements.
  • Tooling and CI support: Recommends running golangci-lint modernize linter when available and suggests additional tooling updates (govulncheck, golangci-lint v2, CI modernization).
  • Ignored-suggestion memory: Uses a project-level .modernize file to avoid re-suggesting previously ignored items.
  • Use Case: When reviewing a PR on an existing Go service, it proactively flags outdated crypto, risky filesystem path handling, and missed standard-library improvements, then suggests minimal, context-relevant changes rather than broad refactors.

Quick Start

Ask the agent: review this Go code for modernization opportunities and propose the safest changes first for our current Go version.

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 with idiomatic updates and deprecated API replacements?β–Ό

To modernize Go source code safely, scan the codebase to replace outdated patterns and deprecated APIs with standard-library improvements. The tool reads go.mod for the target Go version and prioritizes high-impact correctness and security fixes before readability changes.

What is the safest way to update deprecated crypto and risky filesystem paths in a Go PR review?β–Ό

The safest way to update deprecated crypto and risky filesystem paths is using a safety-first modernization approach that proactively flags these issues during PR review. It suggests minimal, context-relevant changes to fix vulnerabilities without broad refactors.

How do I use golangci-lint to find Go modernization opportunities in my current project?β–Ό

Use golangci-lint to find Go modernization opportunities by running its modernize linter during CI checks. This detects language, library, and testing improvements while suggesting additional tooling updates like govulncheck for comprehensive vulnerability scanning.

Does Go modernization respect the target version specified in go.mod or go.work?β–Ό

Yes, Go modernization detects and respects the target version specified in go.mod or go.work. This version-aware approach prioritizes changes for Go 1.21–1.26+ while providing appropriate guidance for older target versions to ensure safe updates.

How do I prevent a Go code reviewer from re-suggesting ignored modernization refactors?β–Ό

Prevent re-suggested modernization refactors by adding them to a project-level .modernize file. This ignored-suggestion memory ensures subsequent code reviews, explicit runs, and CI checks skip the items you have chosen to ignore.