Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

go-lint-fix

БесплатноБез исполняемых скриптовНе проверен

Run golangci-lint and fix all reported issues. Use only when explicitly asked to fix lint issues in a Go project.

openshift-engот openshift-eng★ 123 звезды на GitHub

Об этом скилле

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. 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.

Установить go-lint-fix в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash(golangci-lint *)
Bash(grep *)
Bash(make lint)
Bash(make verify-lint)
Read
Edit(**/*.go)

FAQ

Что делает скилл go-lint-fix?

Run golangci-lint and fix all reported issues. Use only when explicitly asked to fix lint issues in a Go project.

Как установить скилл go-lint-fix?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл go-lint-fix запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить go-lint-fix с