Skip to content
Back to search

goland-claude-marketplace

MarketplaceWorks with Claude CodeGitHub

Help AI coding agents write modern Go

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/jetbrains-go-modern-guidelines/badge.svg)](/listings/jetbrains-go-modern-guidelines)

HTML

<a href="/listings/jetbrains-go-modern-guidelines"><img src="/api/listings/jetbrains-go-modern-guidelines/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Run the following commands inside a Claude Code session.

1. Add this repository as a marketplace:

/plugin marketplace add JetBrains/go-modern-guidelines

2. Install the plugin:

/plugin install modern-go-guidelines@goland-claude-marketplace

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 18 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "goland-claude-marketplace",
  3. "owner": {
  4. "name": "JetBrains, GoLand Team",
  5. "email": "goland@jetbrains.com"
  6. },
  7. "metadata": {
  8. "description": "Marketplace for Golang Claude Code extensions",
  9. "version": "1.1.0"
  10. },
  11. "plugins": [
  12. {
  13. "name": "modern-go-guidelines",
  14. "description": "Enhances Claude Code with modern Go guidelines",
  15. "source": "./plugin"
  16. }
  17. ]
  18. }
README.md · README · 208 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. [![official JetBrains project](http://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
  2. # Modern Go Guidelines
  3. This repository contains guidelines for code agents that help them write modern Go code.
  4. For example, an agent with these guidelines uses `max(a, b)` instead of an if-else block, `slices.Contains` instead of a manual loop, `cmp.Or(a, b, c)` instead of a chain of nil checks. It also knows about recent additions like `new(42)` to get a pointer to a value and `errors.AsType[T](err)` for type-safe error matching—both from Go 1.26.
  5. The guidelines cover the most useful features from Go 1.0 through Go 1.27, including everything targeted by the `modernize` analyzer. See [FEATURES.md](FEATURES.md) for the complete list with detailed descriptions and examples. An agent will:
  6. - Detect the project's Go version from `go.mod`
  7. - Use language features and stdlib additions available up to and including that version
  8. - Prefer modern idioms over older patterns
  9. ## Motivation
  10. All coding agents tend to generate outdated Go. Two reasons:
  11. 1. **Training data lag.** Models don't know about features added after their training cutoff. They can't use `errors.AsType[T]` (Go 1.26) if they've never seen it.
  12. 2. **Frequency bias.** Even for features the model knows, it often picks older patterns. There's more `for i := 0; i < n; i++` in the training data than `for i := range n`, so that's what comes out.
  13. These guidelines fix both problems by giving the agent an explicit reference.
  14. This aligns with the Go team's direction. The `modernize` analyzer exists to automatically update existing code to use newer idioms (see [this talk](https://www.youtube.com/watch?v=_VePjjjV9JU) from the Go team). These guidelines serve the same goal for new code: agents write modern Go from the start, so there's less to fix later.
  15. ## Requirements
  16. The marketplace integrations run a small CLI that is installed on first use with `go install`. Because of that, the [Go toolchain](https://go.dev/dl/) must be installed and available on your `PATH`.
  17. The CLI is installed into a local cache (for example `~/.cache/go-modern-guidelines`) and never modifies your project. It targets **Go 1.25 or newer**; on an older Go it still works as long as automatic toolchain switching is enabled (`GOTOOLCHAIN=auto`, the default), which lets Go fetch a compatible toolchain on first run.
  18. ## Instructions
  19. The guidelines are available for Junie, Claude Code, Codex, and Cursor, and for other agents via skills.sh.
  20. ### [Junie](https://junie.jetbrains.com)
  21. #### Junie CLI
  22. Run the following commands inside a Junie CLI session.
  23. 1. Add this repository as a marketplace:
  24. ```
  25. /extensions marketplace add JetBrains/go-modern-guidelines
  26. ```
  27. 2. Install the extension:
  28. ```
  29. /extensions install modern-go-guidelines
  30. ```
  31. Junie invokes the skill automatically when it is relevant to a Go task.
  32. #### Updating
  33. Update the installed extension from inside a Junie CLI session:
  34. ```
  35. /extensions update modern-go-guidelines
  36. ```
  37. ### [Claude Code](https://claude.com/product/claude-code)
  38. #### Installation
  39. Run the following commands inside a Claude Code session.
  40. 1. Add this repository as a marketplace:
  41. ```
  42. /plugin marketplace add JetBrains/go-modern-guidelines
  43. ```
  44. 2. Install the plugin:
  45. ```
  46. /plugin install modern-go-guidelines@goland-claude-marketplace
  47. ```
  48. #### Usage
  49. Claude Code invokes the skill automatically when it is relevant to a Go task.
  50. To invoke it explicitly:
  51. ```
  52. /modern-go-guidelines:use-modern-go
  53. ```
  54. #### Updating
  55. Claude Code can update the marketplace and installed plugin automatically at startup. Automatic updates are disabled by default for third-party marketplaces, so enable them once:
  56. 1. Run `/plugin`.
  57. 2. Open **Marketplaces** and select `goland-claude-marketplace`.
  58. 3. Select **Enable auto-update**.
  59. When Claude Code reports that the plugin was updated, apply the new version to the current session with:
  60. ```
  61. /reload-plugins
  62. ```
  63. To update it manually instead, run these commands in a terminal:
  64. ```bash
  65. claude plugin marketplace update goland-claude-marketplace
  66. claude plugin update modern-go-guidelines@goland-claude-marketplace
  67. ```
  68. ### [Codex](https://developers.openai.com/codex/)
  69. #### Installation
  70. Run the following commands in a terminal.
  71. 1. Add this repository as a marketplace:
  72. ```
  73. codex plugin marketplace add JetBrains/go-modern-guidelines
  74. ```
  75. 2. Install the plugin:
  76. ```
  77. codex plugin add modern-go-guidelines@goland-codex-marketplace
  78. ```
  79. #### Updating
  80. Refresh the marketplace and reinstall the plugin so Codex replaces its cached copy:
  81. ```bash
  82. codex plugin marketplace upgrade goland-codex-marketplace
  83. codex plugin remove modern-go-guidelines@goland-codex-marketplace
  84. codex plugin add modern-go-guidelines@goland-codex-marketplace
  85. ```
  86. ### [Cursor](https://cursor.com)
  87. For convenience, the guidelines are distributed as a Cursor plugin.
  88. #### Installation
  89. 1. Add this repository as a marketplace by running the following command in a terminal:
  90. ```
  91. cursor-agent plugin marketplace add https://github.com/JetBrains/go-modern-guidelines
  92. ```
  93. 2. Install the plugin with the `/plugins` command inside a Cursor session.
  94. #### Updating
  95. Refresh the marketplace from Git and reopen Cursor so it can pick up the new plugin version:
  96. ```bash
  97. cursor-agent plugin marketplace update goland-cursor-marketplace
  98. ```
  99. If the installed plugin is still on the previous version, reinstall it with the `/plugins` command. Cursor does not currently provide a non-interactive CLI command for updating an installed plugin.
  100. ### Other Agents (via [skills.sh](https://skills.sh))
  101. The same skill package works across other agents such as OpenCode. Install it with:
  102. ```bash
  103. npx skills add JetBrains/go-modern-guidelines
  104. ```
  105. (`--skill use-modern-go` installs only this skill.)
  106. #### Updating
  107. Update the project-installed skill with:
  108. ```bash
  109. npx skills update use-modern-go -p -y
  110. ```
  111. For a globally installed skill, replace `-p` with `-g`.
  112. ## Contributing
  113. Contributions are very welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) before proposing a change.
  114. ## Local development
  115. To try changes to the CLI in your agent, build this checkout into the tool's cache:
  116. ```bash
  117. make dev-install
  118. ```
  119. Then set `GO_MODERN_GUIDELINES_DEV=1` in the environment your agent runs in. With it set, any agent using the plugin runs your local build instead of the released version, the same way across Claude Code, Codex, and Cursor. Export it before launching the agent so the agent process inherits it:
  120. ```bash
  121. export GO_MODERN_GUIDELINES_DEV=1
  122. ```
  123. After editing the CLI, run `make dev-install` again to rebuild; the next call picks it up. To go back to the released version, unset the variable (or run `make dev-uninstall` to remove the build):
  124. ```bash
  125. make dev-uninstall
  126. ```
  127. This requires the Go toolchain. The dev build is stored in the tool's cache directory (`$XDG_CACHE_HOME/go-modern-guidelines` or `~/.cache/go-modern-guidelines`).
  128. The build is driven by `scripts/dev-install.sh`, which is intentionally separate from the agent-facing wrapper so an agent can never trigger a build. Without `make` (for example on Windows) you can run it directly:
  129. ```bash
  130. sh scripts/dev-install.sh install # or: uninstall
  131. pwsh scripts/dev-install.ps1 install # PowerShell equivalent
  132. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.