golang-modernize

Modernizes Go source code by updating deprecated APIs and standard-library usage.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill reduces technical debt and missed safety/correctness improvements by updating Go code to use more modern, idiomatic language features and standard-library patterns.

Core Features & Use Cases

  • Version-aware modernization: Reads your project Go version (go.mod/go.work) and prioritizes changes that fit the supported range from Go 1.21 to Go 1.26+.
  • Safety-first recommendations: Surfaces high-priority fixes such as vulnerability scanning via govulncheck, security-critical replacements (e.g., path traversal hardening with os.Root), and correctness issues.
  • Targeted or full-scan workflows: Offers lightweight, context-relevant guidance during active coding, and deeper multi-area audits in explicit invocation/CI modes (up to 5 parallel sub-agents).
  • Tooling-backed refactors: Suggests and leverages golangci-lint modernize checks when available, and provides guardrails for dependency updates (run go mod tidy + tests before changing modules).

Quick Start

Run /golang-modernize to scan the repository and propose the highest-priority Go modernization changes for your 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 to use newer idioms and standard library features?

To modernize Go code, you scan your repository to update deprecated APIs, adopt newer language idioms, and apply standard-library upgrades. The process reads your project Go version from go.mod to prioritize compatible changes.

What is the best way to find deprecated Go APIs and security issues in my project?

Finding deprecated Go APIs and security issues involves running category-based scans for vulnerability checks via govulncheck and security-critical replacements like path traversal hardening with os.Root, prioritizing fixes by safety and correctness.

How do I update my Go project to match recent language features safely?

To update your Go project safely, leverage version-aware modernization that respects a project .modernize ignore list and prioritizes changes fitting your supported Go version range, ensuring safety and correctness before applying refactors.

Does golang-modernize work with golangci-lint checks for code review?

Yes, golang-modernize integrates with golangci-lint by suggesting and leveraging its modernize checks during code review and CI modernization passes, providing tooling-backed refactors and guardrails for dependency updates.

Can I use Go modernization scanning in a CI pipeline with multiple parallel agents?

Yes, you can use Go modernization scanning in a CI pipeline by invoking explicit full-scan workflows that audit multiple areas, utilizing up to 5 parallel sub-agents to perform deeper analysis and propose high-priority changes.

What are the limitations of automated Go code modernization tooling?

Limitations of automated Go code modernization include respecting a project .modernize ignore list to skip specific files, requiring go mod tidy and tests to pass before changing modules, and focusing suggestions strictly within the Go 1.21 to 1.26+ supported range.