mcpbeat Sign in

Pr To Go Linter Agent Skill

Generate a new pkg/linters analyzer from a merged or open PR pattern.

478 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
4864
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/github/gh-aw --skill pr-to-go-linter

The instruction itself

7 sections, as written by the author

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>.go with exported Analyzer
  • pkg/linters/<name>/<name>_test.go using analysistest
  • pkg/linters/<name>/testdata/src/<name>/<name>.go fixtures with // want
  • cmd/linters/main.go registration in multichecker.Main(...)
  • Validate:
  • go test ./pkg/linters/<name>/...
  • go build ./cmd/linters
  • make 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>/ and cmd/linters/main.go.
  • Tests prove both flagged and non-flagged cases.
  • PR summary explains: source PR, extracted pattern, and why the rule is safe.

Other skills for the same job

different authors, same section of the catalogue
Receiving Code Review
by ZhanlinCui
×7

Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation

2k tokens
Requesting Code Review
by ZhanlinCui
×6

Use when completing tasks, implementing major features, or before merging to verify work meets requirements

2k tokens
Github Code Review
by ComeOnOliver
×3

Comprehensive GitHub code review with AI-powered swarm coordination

13k tokens
Karpathy Guidelines
by hyyhf
×3

Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.

629 tokens
Code Reviewer
by google-gemini
vendor ×2

Use this skill to review code. It supports both local changes (staged or working tree) and remote Pull Requests (by ID or URL). It focuses on correctness, maintainability, and adherence to project standards.

795 tokens
Agent MD Refactor
by softaworks
×2

Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.

4k tokens
Commit Work
by softaworks
×2

Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.

2k tokens
Gemini
by softaworks
×2

Use when the user asks to run Gemini CLI for code review, plan review, or big context (>200k) processing. Ideal for comprehensive analysis requiring large context windows. Uses Gemini 3 Pro by default for state-of-the-art reasoning and coding.

5k tokens

How to use it

Copy the folder

Take github/pr-to-go-linter from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.