PlugWiki

golang-gopls Skill for Claude Code: Navigate and Refactor Go With gopls

Makes Claude use gopls, the official Go language server, to find definitions and references, check errors after each edit and rename safely.

Installs
11.8K
on skills.sh
Stars
3.7K
on GitHub
Files
5
besides SKILL.md
Updated
Nov 2026
last repo commit

golang-gopls tells Claude to ask gopls instead of grepping when a question is about your real build. It sets a read workflow (find the workspace, search symbols, read file context, inspect package APIs) and an edit workflow (check references, edit, run diagnostics on every changed file, then test the changed packages). It covers navigation, hover docs, formatting, safe rename and a quick vulnerability check.

It needs the gopls binary (v0.20 or newer) and Go on your machine. The SKILL.md ranks three ways to reach gopls: its own MCP server, Claude Code's native LSP tool, and the plain CLI. It triggers on Go files and the skill is user-invocable. The folder holds 6 Markdown files and no scripts.

Good for

  • Go developers who want Claude to understand types and call graphs, not just grep text
  • Anyone exploring a large Go codebase or an unfamiliar dependency
  • Developers who want compiler errors checked after every Claude edit

Install golang-gopls

Claude Code

  1. 1

    Copy this prompt.

    Install the golang-gopls skill in Claude Code. Run this command:
    
    npx skills add https://github.com/samber/cc-skills-golang --skill golang-gopls
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

Pick one of the first two routes, then run steps 1 and 2. The README warns that installing only a subset of its skills gives a partial view of its guidelines. The plugin manifest lists no hooks; samber/cc lists cc-skills-golang.

Built from the package data we hold. Not yet tested by us.

What's in the skill

When it loads

Golang semantic code intelligence via `gopls`, the official Go language server — go-to-definition, find references, call/implementation hierarchy, workspace symbol search, package API discovery, diagnostics, safe rename, refactors (extract/inline/fill/rewrite code actions), formatting, and generated tests. Reaches an agent via gopls's own MCP server (`go_*` tools), Claude Code's native `LSP` tool, or the `gopls` CLI. Use when navigating or refactoring Go code — jumping to a definition, finding call sites before a rename, understanding a file's or package's dependencies, running diagnostics after an edit, or extracting/inlining/renaming. Not for the published ecosystem — packages not in your `go.mod`, versions, licenses, importers — → See `samber/cc-skills-golang@golang-pkg-go-dev` skill (`godig`). Not for a whole-tree vulnerability audit → See `samber/cc-skills-golang@golang-security` skill (`govulncheck`).

Sections in SKILL.md

  1. Three ways to reach gopls
  2. Capability → CLI → MCP → native LSP
  3. Use cases
  4. Efficient workflows
  5. gopls vs godig vs Context7 vs govulncheck

Key facts

License
MIT
Installs on skills.sh
11,790 (Nov 2, 2026)
Files in the skill folder
6 files including SKILL.md

What it includes

  • MCP server first, native LSP tool second, CLI last.

    The SKILL.md gives a preference order: MCP, then LSP, then CLI.

    Three ways to reach gopls

  • Detects whether the folder is a Go module, workspace or GOPATH project.

    Called once at session start.

    Read · go_workspace

  • Checks which known vulnerabilities your build actually reaches.

    Run as a baseline at session start and again after go.mod changes.

    Runs code · go_vulncheck

  • Fuzzy-finds a type, function or variable by name.

    For when you do not know the exact location.

    Read · go_search

  • Shows what a file pulls in from the rest of its package.

    Run right after reading a Go file for the first time.

    Read · go_file_context

  • Shows a package's public API.

    Useful for third-party dependencies.

    Read · go_package_api

  • Finds every reference to a symbol.

    Run before changing a definition to see the blast radius.

    Read · go_symbol_references

  • Reports build and analysis errors for changed files.

    The SKILL.md calls it mandatory after every edit.

    Runs code · go_diagnostics

  • Renames a symbol and all references across the workspace.

    Blocks a rename that would break interface satisfaction.

    Write · go_rename_symbol

  • Seven steps: read, check references, edit, diagnostics, fix, vulncheck, test.

    Ends with go test on the changed packages, not the whole repo.

    Runs code · Edit workflow

  • Editor-style operations keyed by line and character.

    Needs ENABLE_LSP_TOOL=1 and the gopls-lsp plugin from the official marketplace.

    Native LSP tool

  • Runs gopls commands by file:line:col.

    The SKILL.md quotes the Go team calling it experimental and debugging-only.

    Runs code · gopls CLI

From the official docs

Permissions

Medium risk

Claude can run go, gopls, git and golangci-lint commands, edit files and rename symbols across your workspace. Install gopls from the official module and review diffs after a refactor.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It allows go, git and golangci-lint commands

    The frontmatter's allowed-tools lists Bash(go:*), Bash(git:*) and Bash(golangci-lint:*) and edit tools. Keep permission prompts on for git commands that change history. github.com

  • It installs gopls from the Go module proxy

    The dependency step is go install golang.org/x/tools/gopls@latest, which downloads and builds code. It also adds an MCP server with claude mcp add gopls -- gopls mcp. github.com

  • Rename and refactor rewrite many files

    go_rename_symbol and the refactor operations edit every reference in the workspace. Commit first so you can review the diff. github.com

  • The LSP route needs a plugin and a flag

    The native LSP tool needs ENABLE_LSP_TOOL=1 and the gopls-lsp plugin from the official marketplace. That is optional. github.com

Technical details
Scopes
  • Bash(go:*), Bash(golangci-lint:*), Bash(git:*), Bash(gopls:*)

  • Read, Edit, Write, Glob, Grep, Agent

  • mcp__gopls__* tools and LSP

Questions

What does golang-gopls do?

It makes Claude use gopls, the Go team's language server, for questions about your actual Go build. Claude can jump to definitions, list references, read package APIs, check errors after edits and rename symbols safely.

How do I install it?

Install the skill from the box above, then install gopls and register its MCP server as the install steps show. The skill does nothing useful without the gopls binary.

Does it need an API key?

No key is mentioned in the SKILL.md or README. It does need Go and gopls v0.20 or newer on your PATH.

Does it work in Codex, Cursor or Claude.ai?

The SKILL.md says it is designed for Claude Code, Codex or a similar harness. The README lists Cursor among supported tools. It needs local binaries, so it does not fit an upload-only chat app.

Is it safe?

The skill bundles no scripts, but it lets Claude run go, gopls, git and golangci-lint commands, edit and write files, and rename across your workspace. Install gopls from the official Go module and review diffs after refactors.

golang-gopls vs godig?

The SKILL.md splits them. gopls answers questions about your local build. For version history, licenses or CVEs of a package you have not added, it points to the golang-pkg-go-dev skill, which uses godig.

Why does Claude not see my unsaved edits?

The gopls MCP server only sees files saved to disk, according to the references. Save before asking.

Information

updated Nov 2, 2026

Folder
skills/golang-gopls

samber/cc-skills-golangskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 4
  1. cc-skills-golang README · github.com
  2. golang-gopls SKILL.md · github.com
  3. golang-gopls mcp.md · github.com
  4. samber/cc marketplace.json · github.com

Updated Nov 2, 2026.