← Back to Skills Marketplace
bowen31337

Gopls LSP

by bowen31337 · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
1213
Downloads
0
Stars
2
Active Installs
1
Versions
Install in OpenClaw
/install gopls-lsp
Description
Go language server (gopls) providing code intelligence, refactoring, and analysis for .go files. Use when working with Go code that needs autocomplete, go-to-definition, find references, error detection, or refactoring support.
README (SKILL.md)

gopls LSP

Go language server integration providing comprehensive code intelligence through gopls (the official Go language server).

Capabilities

  • Code intelligence: Autocomplete, go-to-definition, find references
  • Error detection: Real-time diagnostics for compilation errors and issues
  • Refactoring: Rename symbols, extract function, organize imports
  • Analysis: Static analysis, code suggestions, unused code detection
  • Supported extensions: .go

Installation

Install gopls using the Go toolchain:

go install golang.org/x/tools/gopls@latest

Important: Make sure $GOPATH/bin (or $HOME/go/bin) is in your PATH.

Verify installation:

gopls version

Usage

The language server runs automatically in LSP-compatible editors. For manual operations:

Format code

gofmt -w file.go

Run linter

go vet ./...

Build and test

go build ./...
go test ./...

Configuration

Create gopls.yaml in your project or workspace for custom settings:

analyses:
  unusedparams: true
  shadow: true
completeUnimported: true
staticcheck: true

Or configure via environment:

export GOPLS_CONFIG='{"staticcheck": true, "analyses": {"unusedparams": true}}'

Integration Pattern

When editing Go code:

  1. gopls provides real-time diagnostics in LSP editors
  2. Run go fmt or gofmt to format code
  3. Use go vet for additional static analysis
  4. Run tests with go test before committing

Common Go Commands

  • go mod init \x3Cmodule> - Initialize Go module
  • go mod tidy - Clean up dependencies
  • go get \x3Cpackage> - Add dependency
  • go build - Compile packages
  • go run main.go - Run program
  • go test - Run tests
  • go vet - Report suspicious constructs

More Information

Usage Guidance
This skill is coherent for adding gopls support: install via the official Go module (consider pinning to a specific version rather than @latest for reproducibility), ensure your Go bin directory is on PATH, and be aware the docs suggest exporting GOPLS_CONFIG (this is just configuration, not a secret). If you manage sensitive code, review gopls and Go modules you install before running network fetches (go get/go install) and consider auditing module versions.
Capability Analysis
Type: OpenClaw Skill Name: gopls-lsp Version: 1.0.0 The skill bundle provides instructions for installing and using `gopls`, the official Go language server, along with common Go development commands. All commands and instructions are standard for Go development, such as `go install golang.org/x/tools/gopls@latest`, `gofmt`, `go vet`, `go build`, and `go test`. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts against the agent to perform actions outside the stated purpose of Go language support.
Capability Assessment
Purpose & Capability
Name/description (gopls LSP) match the instructions: installing gopls via the Go toolchain and using Go tooling for formatting, vetting, building, and testing. No unrelated services, binaries, or credentials are requested.
Instruction Scope
SKILL.md stays within expected scope (install gopls, run go commands, configure gopls via a gopls.yaml or GOPLS_CONFIG). It references creating a gopls.yaml and exporting GOPLS_CONFIG, which is normal for configuration but the skill does not declare any required env vars — this is a minor inconsistency to be aware of.
Install Mechanism
No install spec in the registry; the doc recommends using `go install golang.org/x/tools/gopls@latest`, which is the standard, traceable distribution channel for gopls. No downloads from untrusted URLs or archive extraction are suggested.
Credentials
The skill declares no required environment variables, which is reasonable. The docs mention adding `$GOPATH/bin` (or $HOME/go/bin) to PATH and optionally exporting GOPLS_CONFIG; those are plausible and proportionate, but GOPLS_CONFIG is referenced without being listed in requires.env — harmless but inconsistent.
Persistence & Privilege
always is false and the skill has no code or install hooks that would persist or modify other skills or system-wide agent settings. Installation actions described are user-initiated (go install) and affect the user's Go bin directory only.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install gopls-lsp
  3. After installation, invoke the skill by name or use /gopls-lsp
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Go language server (gopls) for code intelligence, refactoring, analysis.
Metadata
Slug gopls-lsp
Version 1.0.0
License
All-time Installs 2
Active Installs 2
Total Versions 1
Frequently Asked Questions

What is Gopls LSP?

Go language server (gopls) providing code intelligence, refactoring, and analysis for .go files. Use when working with Go code that needs autocomplete, go-to-definition, find references, error detection, or refactoring support. It is an AI Agent Skill for Claude Code / OpenClaw, with 1213 downloads so far.

How do I install Gopls LSP?

Run "/install gopls-lsp" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Gopls LSP free?

Yes, Gopls LSP is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Gopls LSP support?

Gopls LSP is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Gopls LSP?

It is built and maintained by bowen31337 (@bowen31337); the current version is v1.0.0.

💬 Comments