本文へ移動
cccskills
無料GitHub で公開

pr-to-go-linter

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

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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

  1. Read PR metadata and changed files.
  2. Read the PR diff and extract the repeated pattern that was fixed.
  3. Define one precise diagnostic rule from that pattern.
  4. Confirm no existing linter in pkg/linters/ already covers it.
  5. 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(...)
  6. 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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Standard collaboration patterns for all squad agents — worktree awareness, decisions, cross-agent communication

日本語の概要は準備中です。原文の説明を表示しています。

github/gh-aw5,3812026年10月11日 更新

Shared hard rules enforced across all squad agents

日本語の概要は準備中です。原文の説明を表示しています。

github/gh-aw5,3812026年10月11日 更新

Route gh-aw design, creation, diagnosis, patching, active debugging, and upgrade requests to the right strategies.

日本語の概要は準備中です。原文の説明を表示しています。

github/gh-aw5,3812026年10月11日 更新

How to write comprehensive architectural proposals that drive alignment before code is written

日本語の概要は準備中です。原文の説明を表示しています。

github/gh-aw5,3812026年10月11日 更新

Upgrade gh-aw to latest gh-aw-firewall release and identify follow-up spec tasks.

日本語の概要は準備中です。原文の説明を表示しています。

github/gh-aw5,3812026年10月11日 更新

Review code that performs git or gh operations against repository checkouts in gh-aw, checking that the right credentials are available at the right time and that sparseness, shallowness and credential-free factors are properly considered.

日本語の概要は準備中です。原文の説明を表示しています。

github/gh-aw5,3812026年10月11日 更新

github のスキルをすべて見る

このスキルの問題を報告する