From 4e130b950a0473ac06fb17d09255256866b41076 Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Wed, 6 May 2026 10:19:20 -0700 Subject: [PATCH 1/2] chore: allow .claude/settings.json to be tracked by git Update .gitignore to track .claude/settings.json while ignoring other Claude state files. Assisted-by: Claude:claude-sonnet-4-6[1m] --- .claude/settings.json | 6 ++++++ .gitignore | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .claude/settings.json diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 000000000..9300ca932 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,6 @@ +{ + "enabledPlugins": { + "plugin-dev@claude-plugins-official": true, + "skill-creator@claude-plugins-official": true + } +} diff --git a/.gitignore b/.gitignore index a065912c1..cc17f5ba7 100644 --- a/.gitignore +++ b/.gitignore @@ -29,8 +29,12 @@ __pycache__/ venv/ *.egg +# Local settings +*.local.* + # Claude's settings for this repository -.claude/ +.claude/* +!.claude/settings.json # Working directories for skills .work/ From a4151ea52737f65c156adbdbaada9c99f50d87e7 Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Wed, 6 May 2026 11:41:12 -0700 Subject: [PATCH 2/2] feat(golang): rewrite plugin with gopls MCP server and gofmt hook Replaces the golangci-lint command and skill with gopls LSP integration via .mcp.json, a PostToolUse hook for automatic gofmt formatting, and a dependency on the gopls-lsp plugin from claude-plugins-official. Allowlists gopls in .claudelint.yaml mcp-prohibited rule. Assisted-by: Claude:claude-sonnet-4-6[1m] --- .claude-plugin/marketplace.json | 5 +- .claudelint.yaml | 7 ++ PLUGINS.md | 10 -- docs/data.json | 26 +++--- plugins/golang/.claude-plugin/plugin.json | 11 ++- plugins/golang/.mcp.json | 8 ++ plugins/golang/README.md | 83 +++++++--------- plugins/golang/commands/lint-fix.md | 106 --------------------- plugins/golang/hooks/hooks.json | 29 ++++++ plugins/golang/hooks/scripts/gofmt.sh | 9 ++ plugins/golang/skills/lint-fix/SKILL.md | 41 ++++++++ plugins/golang/skills/lint/SKILL.md | 109 +++++++--------------- 12 files changed, 186 insertions(+), 258 deletions(-) create mode 100644 plugins/golang/.mcp.json delete mode 100644 plugins/golang/commands/lint-fix.md create mode 100644 plugins/golang/hooks/hooks.json create mode 100755 plugins/golang/hooks/scripts/gofmt.sh create mode 100644 plugins/golang/skills/lint-fix/SKILL.md diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 953664493..130824b24 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -3,6 +3,7 @@ "owner": { "name": "openshift-eng" }, + "allowCrossMarketplaceDependenciesOn": ["claude-plugins-official"], "plugins": [ { "name": "git", @@ -211,8 +212,8 @@ { "name": "golang", "source": "./plugins/golang", - "description": "Run golang codebase related commands and tools", - "version": "0.1.0" + "description": "Go development tools: gopls MCP server, LSP integration, automatic gofmt formatting, and golangci-lint linting", + "version": "0.2.0" }, { "name": "ote-migration", diff --git a/.claudelint.yaml b/.claudelint.yaml index 86755d3d7..7a18d3d20 100644 --- a/.claudelint.yaml +++ b/.claudelint.yaml @@ -57,6 +57,13 @@ rules: enabled: auto severity: error + # MCP rules + mcp-prohibited: + enabled: true + severity: error + allowlist: + - gopls + # Skills rules skill-frontmatter: enabled: true diff --git a/PLUGINS.md b/PLUGINS.md index fe4379aa5..a0d24e8e8 100644 --- a/PLUGINS.md +++ b/PLUGINS.md @@ -12,7 +12,6 @@ This document lists all available Claude Code plugins and their commands in the - [Doc](#doc-plugin) - [Etcd](#etcd-plugin) - [Git](#git-plugin) -- [Golang](#golang-plugin) - [Gwapi](#gwapi-plugin) - [Hcp](#hcp-plugin) - [Hello World](#hello-world-plugin) @@ -162,15 +161,6 @@ Git workflow automation and utilities See [plugins/git/README.md](plugins/git/README.md) for detailed documentation. -### Golang Plugin - -Run golang codebase related commands and tools - -**Commands:** -- **`/golang:lint-fix`** - Run golangci-lint tool and fix all reported issues - -See [plugins/golang/README.md](plugins/golang/README.md) for detailed documentation. - ### Gwapi Plugin Gateway API management for Kubernetes/OpenShift clusters diff --git a/docs/data.json b/docs/data.json index fcde4773e..7c37e1eaa 100644 --- a/docs/data.json +++ b/docs/data.json @@ -1692,26 +1692,30 @@ "version": "0.0.7" }, { - "commands": [ + "commands": [], + "description": "Go development tools: gopls MCP server, LSP integration, automatic gofmt formatting, and golangci-lint linting", + "has_readme": true, + "hooks": [ { - "argument_hint": "", - "description": "Run golangci-lint tool and fix all reported issues", - "name": "lint-fix", - "synopsis": "/golang:lint-fix" + "description": "Auto-format Go files with gofmt after write/edit", + "name": "PostToolUse", + "type": "PostToolUse" } ], - "description": "Run golang codebase related commands and tools", - "has_readme": true, - "hooks": [], "name": "golang", "skills": [ { - "description": "Detect and run golangci-lint in a Go repository using the best available method", + "description": "Run golangci-lint to check Go code quality. Use when the user asks to lint, check for lint issues, or verify code quality in a Go project, or when linting is appropriate before committing Go code changes.", "id": "lint", - "name": "Go Lint" + "name": "lint" + }, + { + "description": "Run golangci-lint and fix all reported issues. Use only when explicitly asked to fix lint issues in a Go project.", + "id": "lint-fix", + "name": "lint-fix" } ], - "version": "0.1.0" + "version": "0.2.0" }, { "commands": [ diff --git a/plugins/golang/.claude-plugin/plugin.json b/plugins/golang/.claude-plugin/plugin.json index d7fab6f42..ff7fe23ea 100644 --- a/plugins/golang/.claude-plugin/plugin.json +++ b/plugins/golang/.claude-plugin/plugin.json @@ -1,8 +1,11 @@ { "name": "golang", - "description": "Run golang codebase related commands and tools", - "version": "0.1.0", + "description": "Go development tools: gopls MCP server, LSP integration, automatic gofmt formatting, and golangci-lint linting", + "version": "0.2.0", "author": { "name": "github.com/openshift-eng" - } -} \ No newline at end of file + }, + "dependencies": [ + { "name": "gopls-lsp", "marketplace": "claude-plugins-official" } + ] +} diff --git a/plugins/golang/.mcp.json b/plugins/golang/.mcp.json new file mode 100644 index 000000000..038f48801 --- /dev/null +++ b/plugins/golang/.mcp.json @@ -0,0 +1,8 @@ +{ + "mcpServers": { + "gopls": { + "command": "gopls", + "args": ["mcp"] + } + } +} diff --git a/plugins/golang/README.md b/plugins/golang/README.md index bb6423357..c5dc31b43 100644 --- a/plugins/golang/README.md +++ b/plugins/golang/README.md @@ -1,7 +1,6 @@ # Golang Plugin -A Claude Code plugin for running [golangci-lint](https://golangci-lint.run/) to check and fix code quality issues in Go projects. - +A Claude Code plugin for Go development, providing LSP integration via `gopls` and automatic `gofmt` formatting. ## Installation @@ -9,71 +8,53 @@ A Claude Code plugin for running [golangci-lint](https://golangci-lint.run/) to /plugin install golang@ai-helpers ``` -## Commands +## Features -| Command | Description | -|---------|-------------| -| `/golang:lint-fix` | Run golangci-lint and automatically fix all reported issues | +### gopls MCP Server -## Skills +Integrates the `gopls` language server as an MCP server, providing Go-aware code intelligence including go-to-definition, find references, hover documentation, and workspace symbols. + +### Automatic gofmt Formatting + +A PostToolUse hook automatically runs `gofmt -w -s` on any `.go` file after it is written or edited, keeping code consistently formatted without manual intervention. + +### LSP Integration (via dependency) -| Skill | Description | -|-------|-------------| -| Go Lint | Detects and runs golangci-lint using the best available method for the repository. Loaded automatically when linting is relevant, and used by both commands above. | +Depends on the `gopls-lsp` plugin from `claude-plugins-official`, which enables LSP-based operations for Go code navigation and analysis. ## Prerequisites -- go compiler (available in $PATH) +- Go toolchain with `gopls` and `gofmt` available in `$PATH` +- `golangci-lint` available in `$PATH` (required by the `golang:lint` and `golang:lint-fix` skills) -- **Optional**: `make lint` target configured in Makefile, if not present the command will run `golangci-lint` directly. +Install `gopls` if not already present: -## Recommended Permissions +```bash +go install golang.org/x/tools/gopls@latest +``` -To allow Claude Code to run the linter commands without prompting for approval, add the following to your project's `.claude/settings.json`: +Install `golangci-lint` if not already present: -```json -{ - "permissions": { - "allow": [ - "Bash(curl -s https://api.github.com/repos/golangci/golangci-lint/releases/latest)", - "Bash(make golangci-lint:*)", - "Bash(./bin/golangci-lint:*)", - "Bash(GOBIN=/tmp go install:*)", - "Bash(/tmp/golangci-lint:*)", - "Bash(make lint:*)", - "Bash(make lint)" - ] - } -} +```bash +go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest ``` -### What these permissions allow: +## Skills + +### `golang:lint` -| Permission | Purpose | -|------------|---------| -| `curl ... golangci-lint/releases/latest` | Check for latest golangci-lint version | -| `make golangci-lint:*` | Run make targets for golangci-lint installation | -| `./bin/golangci-lint:*` | Run golangci-lint from project's bin directory | -| `GOBIN=/tmp go install:*` | Install golangci-lint to /tmp for temporary use | -| `/tmp/golangci-lint:*` | Run golangci-lint from /tmp | -| `make lint:*`, `make lint` | Run the standard `make lint` target | +Runs `golangci-lint` to check Go code quality. Discovers the lint command via CLAUDE.md/AGENTS.md, Makefile targets (`lint`, `verify-lint`), or direct `golangci-lint run ./...` invocation. Reports total issue count, breakdown by linter, and examples. Read-only — never modifies files. -## Usage +Invoked automatically when linting is appropriate (e.g., before committing Go changes), or on demand. -### `/golang:lint`: check for linter issues +### `golang:lint-fix` -This will: -1. Run golangci-lint using available methods (via the "Go Lint" skill) -2. Report total number of issues found -3. Summarize issues by category (goconst, gocyclo, staticcheck, etc.) -4. Show example issues +Runs `golangci-lint --fix` to auto-fix issues, then uses AI to resolve any remaining ones iteratively until the output is clean. Uses the same discovery cascade as `golang:lint`. -The "Go Lint" skill is also loaded automatically when the agent detects that linting is needed (e.g., the user says "run the linter" or "check for lint issues"). +User-invocable only (`/golang:lint-fix`) — not triggered automatically due to its destructive nature. -### `/golang:lint-fix`: check for linter issues and fix them +## Dependencies -This will: -1. Run the "Go Lint" skill to identify all issues -2. Systematically fix each category of issues -3. Re-run linter after each fix to verify -4. Continue until all issues are resolved +| Plugin | Marketplace | Purpose | +|--------|-------------|---------| +| `gopls-lsp` | `claude-plugins-official` | LSP integration for Go code intelligence | diff --git a/plugins/golang/commands/lint-fix.md b/plugins/golang/commands/lint-fix.md deleted file mode 100644 index 0493954ec..000000000 --- a/plugins/golang/commands/lint-fix.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -description: Run golangci-lint tool and fix all reported issues ---- - -## Name -golang:lint-fix - -## Synopsis -``` -/golang:lint-fix -/golang:lint-fix [] -``` - -## Description -This command runs golangci-lint and systematically fixes all reported issues in the codebase. It creates a todo list to track progress and fixes issues by category until all linter checks pass. - -This command handles common linter categories including goconst, gocyclo, prealloc, revive, staticcheck, and unparam with appropriate fix strategies for each. - -## Implementation - -Follow this process: - -1. **Run the "Go Lint" skill** to identify all issues, - extract the `golangci-lint` exact call from the skill and remember it. - Pass through any additional flags the user provided. - -2. With the exact `golangci-lint` command, run with `--fix` appended, - to automatically fix any auto-fixable issues. - - **Note**: If the "Go Lint" skill used `hack/go-lint.sh` (a containerized script), the `--fix` flag cannot be passed to it. In this case, run `golangci-lint run --fix` directly (using the same config file if one exists in the repo, e.g., `--config=.golangci.yaml`). - -3. For the rest of the issues, **create a todo list** to track fixing each category of issues - -4. **Fix all issues systematically** using these example strategies: - - **goconst**: Add constants for repeated strings (3+ occurrences) - - **gocyclo**: Add `//nolint:gocyclo` comments for complex test functions with justification - - **prealloc**: Pre-allocate slices when capacity is known using `make([]T, 0, capacity)` - - **revive**: Fix comment spacing issues (add space after `//`) - - **staticcheck**: Fix deprecated code, remove redundant checks, fix naming conventions (ErrFoo for errors) - - **unparam**: Remove unused parameters or always-nil error returns - -5. **Re-run exact `golangci-lint` command again** after each category to verify fixes - -6. **Continue until all issues are resolved** - -### Important Guidelines - -- For test files with high cyclomatic complexity, add `//nolint:gocyclo` with reason "Table-driven test with inherent complexity" -- For generated files, add `//nolint` comments rather than modifying the code -- For Ginkgo/Gomega dot imports, add `//nolint:staticcheck,revive` with reason "Ginkgo/Gomega DSL convention" -- When creating constants, check if one already exists in the package before adding a new one -- Use existing constants from other packages when appropriate -- For functions that always return nil error, remove the error return and update all callers -- For unused parameters, either remove them or add `//nolint:unparam` if they're needed for interface compatibility - -### Final Step - -Run the "Go Lint" skill one last time to confirm all issues are resolved (0 issues). - -## Return Value -- **Format**: Progress updates and final confirmation -- **Success**: Confirmation that all linter issues are resolved with 0 issues remaining -- **Partial**: List of remaining issues if some could not be automatically fixed - -## Examples - -1. **Basic usage**: - ```text - /golang:lint-fix - ``` - Output: - ```text - Running make lint... Found 23 issues - - Creating todo list: - ☐ Fix goconst issues (8) - ☐ Fix staticcheck issues (7) - ☐ Fix gocyclo issues (4) - ☐ Fix revive issues (4) - - Fixing goconst issues... - ✓ Added constant APIContentType for "application/json" - ✓ Added constant DefaultTimeout for "30s" - ... - - Running make lint... 15 issues remaining - ... - - ✓ All linter issues resolved (0 issues) - ``` - -2. **Already clean codebase**: - ```text - /golang:lint-fix - - ``` - Output: - ```text - Running make lint... 0 issues found - ✓ Code already passes all linter checks - ``` - -## Arguments - -- **$1** (flags): Optional. Arbitrary flags to be passed to the golangci-lint utility. - - These flags are passed through to the "Go Lint" skill and chained onto the `golangci-lint` invocation. - diff --git a/plugins/golang/hooks/hooks.json b/plugins/golang/hooks/hooks.json new file mode 100644 index 000000000..1eac1cc76 --- /dev/null +++ b/plugins/golang/hooks/hooks.json @@ -0,0 +1,29 @@ +{ + "description": "Auto-format Go files with gofmt after write/edit", + "hooks": { + "PostToolUse": [ + { + "matcher": "Write", + "hooks": [ + { + "type": "command", + "if": "Write(**/*.go)", + "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/gofmt.sh", + "timeout": 10 + } + ] + }, + { + "matcher": "Edit", + "hooks": [ + { + "type": "command", + "if": "Edit(**/*.go)", + "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/gofmt.sh", + "timeout": 10 + } + ] + } + ] + } +} diff --git a/plugins/golang/hooks/scripts/gofmt.sh b/plugins/golang/hooks/scripts/gofmt.sh new file mode 100755 index 000000000..219c2ed65 --- /dev/null +++ b/plugins/golang/hooks/scripts/gofmt.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -euo pipefail + +input=$(cat) +file_path=$(echo "$input" | jq -r '.tool_input.file_path // empty') + +if [[ -n "$file_path" ]]; then + gofmt -w -s "$file_path" +fi diff --git a/plugins/golang/skills/lint-fix/SKILL.md b/plugins/golang/skills/lint-fix/SKILL.md new file mode 100644 index 000000000..c101c9b6c --- /dev/null +++ b/plugins/golang/skills/lint-fix/SKILL.md @@ -0,0 +1,41 @@ +--- +name: lint-fix +description: Run golangci-lint and fix all reported issues. Use only when explicitly asked to fix lint issues in a Go project. +disable-model-invocation: true +model: sonnet +context: fork +allowed-tools: Bash(golangci-lint *) Bash(grep *) Bash(make lint) Bash(make verify-lint) Read Edit(**/*.go) +--- + +# Go Lint Fix + +Run `golangci-lint` and fix all reported issues, using auto-fix first then AI for the rest. + +## Discovery + +This skill always calls `golangci-lint` directly (required for `--fix`). Discovery finds any project-specific flags, config, or plugins to carry into those calls. + +1. **CLAUDE.md / AGENTS.md**: Check for linting instructions. Note any flags, config paths, or constraints documented there. +2. **Makefile targets**: Check for `lint` or `verify-lint` targets (`grep -E "^(lint|verify-lint):" Makefile`). Inspect the target body to extract flags such as `--config`, `--timeout`, `--build-tags`, or module plugin references. +3. **Fallback**: Use `golangci-lint run ./...` with no extra flags. + +Collect all discovered flags into a `$FLAGS` variable used throughout the Fix Process. + +## If golangci-lint Is Not Found + +Report that `golangci-lint` is not available and direct the user to the [installation docs](https://golangci-lint.run/welcome/install/). Do not auto-install. + +## Fix Process + +1. **Baseline**: Run `golangci-lint run $FLAGS ./...` and record the issue count. +2. **Auto-fix**: Run `golangci-lint run --fix $FLAGS ./...` to resolve all automatically fixable issues. +3. **Re-check**: Run `golangci-lint run $FLAGS ./...` again to see remaining issues. +4. **AI fixes**: For each remaining issue, fix it directly in the source file. +5. **Verify**: Re-run `golangci-lint run $FLAGS ./...` after each batch of AI fixes. +6. **Loop**: Repeat steps 4–5 until the output is clean or no further progress is made. + +## Guidelines + +- **Prefer real fixes** over `//nolint` directives. Use `//nolint` only as a last resort with a comment explaining why. +- **Generated files**: Do not modify files with a `// Code generated` header. Add `//nolint` at the call site or exclude the file in `.golangci.yml` instead. +- **Constants**: Before adding a new constant to fix a magic-number lint error, check whether an equivalent constant already exists in the package or its imports. diff --git a/plugins/golang/skills/lint/SKILL.md b/plugins/golang/skills/lint/SKILL.md index a7fba011b..428696580 100644 --- a/plugins/golang/skills/lint/SKILL.md +++ b/plugins/golang/skills/lint/SKILL.md @@ -1,93 +1,54 @@ --- -name: Go Lint -description: Detect and run golangci-lint in a Go repository using the best available method +name: lint +description: Run golangci-lint to check Go code quality. Use when the user asks to lint, check for lint issues, or verify code quality in a Go project, or when linting is appropriate before committing Go code changes. +model: haiku +allowed-tools: Bash(golangci-lint *) Bash(grep *) Bash(make lint) Bash(make verify-lint) Read +paths: + - "**/*.go" + - ".golangci.yml" + - ".golangci.yaml" --- # Go Lint -This skill detects the best way to run golangci-lint in the current Go repository and executes it, reporting results in a structured summary. +Run `golangci-lint` to check Go code quality and report issues. -## When to Use This Skill +## Discovery -Use this skill when: -- The user asks to run the linter, check for lint issues, or verify code quality in a Go project -- Another command needs to run golangci-lint as a prerequisite step (e.g., `golang:lint-fix`) -- The agent decides linting is needed before committing Go code changes +Find how to run the linter using this cascade — stop at the first match: -## Prerequisites +1. **CLAUDE.md / AGENTS.md**: Check for instructions about linting. If a lint command is documented, use it. +2. **Makefile targets**: Check for `lint` or `verify-lint` targets (`grep -E "^(lint|verify-lint):" Makefile`). If found, run `make lint` or `make verify-lint`. +3. **Direct invocation**: Run `golangci-lint run ./...` -- A Go repository (contains `go.mod`) -- `golangci-lint` installed, or the ability to install it (see Step 6 below) +## If golangci-lint Is Not Found -## Implementation Steps +Report that `golangci-lint` is not available and direct the user to the [installation docs](https://golangci-lint.run/welcome/install/). Do not auto-install. -### Step 1: Detect the Lint Command +## Output -Try the following approaches in order. Proceed to Step 2 once any approach succeeds: +Use this format when issues are found: -1. **Check project documentation first** - Read `AGENTS.md` or `CLAUDE.md` in the repository root (if they exist) and look for linting instructions (e.g., `make lint`, `make verify`, specific golangci-lint commands, or other linter commands). If found, use those instructions. +```text +Found 15 issues: +- goconst: 5 issues +- staticcheck: 4 issues +- gocyclo: 3 issues +- revive: 3 issues -2. **Check for lint scripts** - Many repositories (especially OpenShift projects) have scripts that run golangci-lint in a containerized way with repo-specific configuration. Check for these patterns and run if found: - - `hack/go-lint.sh` - - `hack/lint.sh` - - `hack/verify-golangci-lint.sh` - - `hack/verify-lint.sh` - - `scripts/go-lint.sh` - - `scripts/lint.sh` - - Or any other `*lint*.sh` script in `hack/` or `scripts/` directories +Example issues: +- pkg/api/handler.go:42: string "application/json" has 3 occurrences (goconst) +- pkg/utils/helper.go:87: cyclomatic complexity 15 of function ProcessData (gocyclo) +``` -3. **Check the Makefile** - Look for a make target like `make lint` or `make verify-lint`, and run it. +When clean: -4. **Run golangci-lint directly** - Try: `golangci-lint run` +```text +Code passes all linter checks (0 issues found) +``` -5. **Try GOPATH binary** - If golangci-lint was not found on PATH, try: - - `$(go env GOPATH)/bin/golangci-lint run` +## Constraint -6. **Install golangci-lint** - If not installed, inform the user how to install it: - - macOS/Linux: `curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin` - - Or using go install: `go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest` - - Then retry from step 4. +This skill is **read-only**. Never modify files or attempt fixes. Use the `golang:lint-fix` skill for that. -### Step 2: Handle Configuration - -During the linter run: -- If the codebase contains an existing `.golangci.yml` or `.golangci.yaml`, use it with `golangci-lint run --config=` -- If there are issues with a missing config, try with `golangci-lint run --noconfig` - -### Step 3: Report Results - -After running the linter: -1. Report the total number of issues found -2. Summarize the issues by category (e.g., goconst, gocyclo, staticcheck, etc.) -3. Show the first 2-3 issues as examples -4. If there are no issues, confirm that the code passes all linter checks - -**Do not attempt to fix any issues** - this skill is read-only. - -## Output Format - -- **Success with issues**: - ``` - Found 15 issues: - - goconst: 5 issues - - staticcheck: 4 issues - - gocyclo: 3 issues - - revive: 3 issues - - Example issues: - - pkg/api/handler.go:42: string "application/json" has 3 occurrences (goconst) - - pkg/utils/helper.go:87: cyclomatic complexity 15 of function ProcessData (gocyclo) - ``` - -- **No issues**: - ``` - Code passes all linter checks (0 issues found) - ``` - -- **Error**: Installation instructions if golangci-lint could not be installed or run - -## Important Notes - -- Remember the exact `golangci-lint` command that was used, as callers (like `golang:lint-fix`) may need it -- If the user passes additional flags, chain them to the `golangci-lint` invocation (e.g., `--tests`, `--concurrency 4`) -- Do not run with `--fix`; if the user wants fixes, direct them to the `/golang:lint-fix` command +If the user passes additional flags, chain them to the `golangci-lint` invocation (e.g., `--tests`, `--concurrency 4`).