mcpField
P
pr-to-lint-rule

pr-to-lint-rule

github.com/zernieTesting & quality15436 installsUpdated 2d ago
Repository

About pr-to-lint-rule

A skill that turns recurring PR review comments into automated lint rules. It detects the project language and toolchain, generates a rule, updates CLAUDE.md, and runs tests for verification.

Key features

  1. 01Detect project language and lint tool
  2. 02Generate a matching lint rule
  3. 03Update the CLAUDE.md annotation block
  4. 04Run tests to verify the rule

Use cases

  1. 01Disallow direct imports from a library module
  2. 02Require the project’s custom logger
  3. 03Prevent unwrap() in production code
  4. 04Require withAuth for API routes

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/zernie/vigiles --skill pr-to-lint-rule

After installing, type/pr-to-lint-rulein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

CLAUDE.md
CLAUDE.md.spec.ts
frontmatter-CLAUDE.md
experimental-emit/
emit-server.mjs
README.md
run-emit.mjs
score-emits.mjs
experimental-emit/records/
emit-tool.json
emits-2026-08-13.jsonl
prose-baseline-2026-08-13.json
rate-limit-event.json
trials-2026-08-13.jsonl
harness/
agent-loop.harness.mjs
checks-dogfood.harness.mjs
compiled-hook-inprocess.harness.mjs
harness/dogfood/
adversarial-gate.eval.mjs
code-quality.trigger.eval.mjs
debug-my-harness.trigger.eval.mjs
edit-spec.trigger.eval.mjs
generate-logo.trigger.eval.mjs
landing-site.trigger.eval.mjs
review-docs.trigger.eval.mjs
reviewer-ab.eval.mjs
screenshot.trigger.eval.mjs
ship-a-feature.trigger.eval.mjs
harness/dogfood/reviewer-ab/prose/.claude-plugin/
plugin.json
harness/dogfood/reviewer-ab/prose/agents/
code-reviewer.md
harness/dogfood/reviewer-ab/spec/.claude-plugin/
plugin.json
harness/dogfood/reviewer-ab/spec/agents/
code-reviewer.md
code-reviewer.md.spec.ts

Details

From the project README

Convert a recurring PR review comment into an automated lint rule.

Arguments

$ARGUMENTS — A natural language description of the pattern to enforce. Examples:

  • "we keep telling people not to import directly from antd, use our design system barrel file instead"
  • "people forget to use our custom logger instead of console.log"
  • "don't use unwrap() in production code, use expect() or proper error handling"
  • "API route handlers must use the withAuth wrapper"

Instructions

You are generating an automated lint rule from a recurring code review pattern. Follow these steps:

Step 1: Detect the Project Language and Toolchain

Look at the repository to determine:

  • Primary language (JS/TS, Python, Rust, Go, Ruby, etc.)
  • Linter in use (ESLint, Ruff, Clippy, golangci-lint, RuboCop, etc.)
  • Testing framework (Vitest, Jest, pytest, cargo test, etc.)
  • Existing custom rules (to match conventions)

If the language or linter cannot be confidently detected, ask the user which language and linter to target before generating anything.

Step 2: Generate the Lint Rule

Based on the detected (or user-specified) language, generate the appropriate rule type.

For JavaScript/TypeScript, generate an ESLint rule using the AST visitor pattern with meta and create(context).

Step 3: Update CLAUDE.md

Add the annotation block. See docs/spec-format.md for the correct format.

Step 4: Verify

Run npm test to ensure the new rule and tests pass.

Comments

Markdown supported