use-modern-go

Apply version-appropriate Go syntax and APIs to Go code.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/jacexh/skills --skill use-modern-go
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: use-modern-go
Source: https://github.com/jacexh/skills/tree/main/skills/use-modern-go
Command: npx skills add https://github.com/jacexh/skills --skill use-modern-go

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes uncertainty about which Go language features and idioms are safe to use in a codebase by enforcing a single, project-targeted Go version and recommending idiomatic replacements when older or newer patterns exist.

Core Features & Use Cases

  • Enforces a target Go version discovered from the repository and instructs the assistant to only use features up to that version.
  • Provides concrete, version-scoped guidance for modern replacements (for example, built-ins, slices/maps helpers, and testing/benchmark conventions) and clarifies discouraged legacy patterns.
  • Use cases include refactoring code to be idiomatic for the project's Go version, reviewing pull requests for version-appropriate APIs, and generating new code that fits the repository's constraints.

Quick Start

Apply modern Go guidelines to this repository, targeting the detected Go version shown by the skill.

Frequently Asked Questions about use-modern-go

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

FAQPage Schema
How do I enforce a specific Go version for code generation?

To enforce a specific Go version for code generation, the Skill detects the target version from your repository and restricts syntax to only use features up to that version.

What are idiomatic modern Go code patterns for my project?

Idiomatic modern Go patterns involve using version-scoped built-ins, slices and maps helpers, and updated testing conventions while replacing discouraged legacy syntax.

How do I refactor Go code to use modern language features safely?

You can refactor Go code safely by applying the Skill to recommend idiomatic replacements and modern APIs that match your project's detected target version.

Can I review pull requests for version-appropriate Go APIs?

Yes, you can review pull requests for version-appropriate Go APIs by checking that new code adheres to the target Go version and avoids newer features.

Does this work with Go projects that lack a go.mod file?

The Skill targets repositories containing go.mod or standard Go projects, relying on a detected or user-specified Go target version to apply consistent idioms.

What happens if I use Go features newer than my target version?

If you use newer features, the Skill avoids recommending them and instead suggests idiomatic alternatives and replacements that are safe for your detected version.