pr-to-go-linter
Generate a new pkg/linters analyzer from a merged or open PR pattern.
от github★ 5 758 звёзд на GitHub
Установить pr-to-go-linter в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
PR to Go Linter
Use this skill when a user asks to create a new custom Go linter based on a code pattern fixed in a pull request.
Goal
Convert one concrete PR pattern into a new go/analysis linter under pkg/linters/<name>/ with tests and runner registration.
Inputs
- Repository owner/name
- Pull request number
- Target linter name (kebab-case)
Workflow
- Read PR metadata and changed files.
- Read the PR diff and extract the repeated pattern that was fixed.
- Define one precise diagnostic rule from that pattern.
- Confirm no existing linter in
pkg/linters/already covers it. - Implement:
pkg/linters/<name>/<name>.gowith exportedAnalyzerpkg/linters/<name>/<name>_test.gousinganalysistestpkg/linters/<name>/testdata/src/<name>/<name>.gofixtures with// wantcmd/linters/main.goregistration inmultichecker.Main(...)
- Validate:
go test ./pkg/linters/<name>/...go build ./cmd/lintersmake golint-custom
Rule quality checks
- High signal, low false positives on this repository.
- Diagnostic is specific and fixable.
- Rule scope matches code in the PR (do not generalize beyond evidence).
- Do not change unrelated linter packages.
Example pattern source
For PR #33038 (Refactor pkg mutex sites to use deferred unlocks consistently), derive a linter idea that reports lock/unlock sections that manually unlock instead of deferring unlock immediately after lock when the function body matches the same cache/logger-style critical section pattern.
Output expectations
- Minimal implementation-only diff in
pkg/linters/<name>/andcmd/linters/main.go. - Tests prove both flagged and non-flagged cases.
- PR summary explains: source PR, extracted pattern, and why the rule is safe.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл pr-to-go-linter?
Generate a new pkg/linters analyzer from a merged or open PR pattern.
Как установить скилл pr-to-go-linter?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-to-go-linter запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…