Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

use-modern-go — Claude Code skill: what it does, how to install

Checks Go code against current, version-specific idioms. Useful before writing, fixing, or refactoring project code.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add JetBrains/go-modern-guidelines --skill use-modern-go -a claude-code
Open on GitHub

What use-modern-go does

The skill connects the Modern Go Guidelines CLI to Go code changes. Before editing, it runs the list subcommand for the target file or a specified Go version, then applies the complete output from newest to oldest. Do not truncate that output with filters, because older applicable guidance may be missed.

The CLI resolves the Go version from go.mod, go.work, the local Go toolchain, or an explicit override. Use explain for details and examples of selected guideline IDs returned by list. On first use, the wrapper installs the CLI in a local cache.

Check go.mod or go.work before editing. They affect which guidance the CLI returns. The skill includes shell and PowerShell wrappers, and installation is provided separately for each supported platform.

What it helps with

  • check a Go file before editing it
  • match code choices to the project’s Go version
  • find applicable modern Go guidelines
  • inspect a specific guideline with explain
  • refactor Go code using current guidance

Example prompts for the agent

  • Apply `use-modern-go` before editing `path/to/file.go` and follow the CLI guidance.
  • Run `list` for `path/to/file.go`, then use `explain` for the returned rules that need more detail.
  • Refactor this Go code with `use-modern-go` using the version declared in `go.mod`.

How to install use-modern-go

1Skills CLI (Vercel)

npx skills add JetBrains/go-modern-guidelines --skill use-modern-go -a claude-code

2Manually: put the files in place

~/.claude/skills/use-modern-go/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/use-modern-go/

Similar

microsoft-agent-framework official github Guides GitHub Copilot through building, updating, reviewing, and explaining Microsoft Agent Framework applications. It also covers migrations from Semantic Kernel and AutoGen. GitHub Copilot 1,900installs javascript-pro https://github.com/Jeffallan Skill for writing, debugging, and refactoring JavaScript code with ES2023+, async/await, ESM modules, and Node.js APIs. Use it to build vanilla JavaScript applications or optimize performance in browsers and Node.js. Claude Code CX Codex Cursor +1 6,000installs java-architect https://github.com/Jeffallan Build Spring Boot services, implement reactive endpoints, tune JPA queries, and configure OAuth2 or JWT security with a skill that guides implementation and testing. Claude Code CX Codex Cursor +1 5,900installs creating-oracle-to-postgres-master-migration-plan official github This skill scans a .NET solution, finds Oracle dependencies, and builds a PostgreSQL migration plan. Use it before coordinating a migration across several projects. GitHub Copilot 1,800installs jscpd kucherenko Detects duplicate code across 220+ languages and formats findings for AI agents. It flags exact copies, renamed blocks, and refactoring hotspots. Claude Code CX Codex Cursor +1 2,600installs modern-python trailofbits Configures Python projects with a modern tooling stack: uv for dependency management, ruff for linting and formatting, ty for type checking. Use when starting new projects, writing scripts, or migrating from legacy tools. Claude Code CX Codex Cursor +1 8,700installs migrate-to-shoehorn Matt Pocock Replaces as type assertions in tests with helpers from @total-typescript/shoehorn. Use it when tests need partial objects or deliberately invalid data. Claude Code 475,388installs write-swift emilkowalski This skill guides Swift coding, reviews, and migrations using the language’s current practices. Use it to investigate concurrency errors, hangs, data races, or retain cycles. Claude Code CX Codex Cursor +1 117,500installs

Questions about use-modern-go

How do I install use-modern-go in Claude Code?

Run npx skills add JetBrains/go-modern-guidelines --skill use-modern-go -a claude-code, run npx skills add JetBrains/go-modern-guidelines --skill use-modern-go -a claude-code again, then check ~/.claude/skills/use-modern-go/SKILL.md.

What does use-modern-go do?

The skill runs the Modern Go Guidelines CLI before Go code is written, fixed, or refactored. It gets version-specific guidance with list and provides details through explain.

How does the CLI determine the Go version?

It checks go.mod, go.work, the local Go toolchain, or an explicit --go-version value. You can also pass a file with --file-path.

Source text

SKILL.md · Apache-2.0
---
name: use-modern-go
description: Use the Modern Go Guidelines CLI whenever writing, modifying, fixing, or refactoring Go code. Apply its version-specific guidance to generated changes.
---

# Modern Go Guidelines CLI

Always write modern, idiomatic Go code. Use the Modern Go Guidelines CLI as the source of truth for modern Go idioms that may be newer than your knowledge cutoff.

Command:

- Linux or macOS: `sh "<skill-dir>/scripts/run-tool.sh"`
- Windows PowerShell: `& '<skill-dir>\scripts\run-tool.ps1'`

First run and approvals:

On first use, the wrapper installs the Modern Go Guidelines CLI in a local cache directory.

Subcommands:

- `list`
- `explain`

Before editing Go code:

1. Call the wrapper's `list` subcommand for the relevant Go file.

   Prefer passing the file you are about to edit:

   ```sh
   sh "<skill-dir>/scripts/run-tool.sh" list --file-path path/to/file.go
   ```

   On Windows, use the PowerShell wrapper with the same arguments.

   The CLI resolves the applicable Go version from go.mod, go.work, the local Go toolchain, or an explicit override.

2. If the target Go version is already known, you may pass it directly:

   ```sh
   sh "<skill-dir>/scripts/run-tool.sh" list --go-version 1.24
   ```

3. Read the complete list output before deciding which guidelines apply.

   The list output is ordered newest first. Read the full output because older supported guidelines may still apply.

   Do not pipe the output through head, tail, grep, sed, or any other truncating/filtering command. Important guidelines may otherwise be missed.

4. Treat returned guidelines as authoritative for modern Go style choices in code you are editing.

   If a guideline applies, follow it even when nearby code or repository convention uses an older pattern. Skip it only when it would not compile, would change behavior, or clearly does not match the edited code. Before skipping a returned guideline that seems relevant, call the wrapper's `explain` subcommand for that guideline ID.

Call `explain` only when a specific guideline may apply and you need the detailed explanation or examples. Request only the guideline IDs you intend to evaluate or apply:

```sh
sh "<skill-dir>/scripts/run-tool.sh" explain sync_waitgroup_go
```

Multiple guideline IDs may be requested as positional arguments:

```sh
sh "<skill-dir>/scripts/run-tool.sh" explain atomic_types errors_as_type
```

Do not call `explain` without guideline IDs. Use `list` first to discover the short guideline list for the target Go version, then call `explain` for the specific returned IDs that need more context.

© JetBrains · Apache-2.0 · JetBrains/go-modern-guidelines

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor