pr-to-lint-rule

Convert recurring PR review comments into automated lint rules with tests.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/pohlai88/afenda-xforge-v5 --skill pr-to-lint-rule-pohlai88
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pr-to-lint-rule
Source: https://github.com/pohlai88/afenda-xforge-v5/tree/main/.agents/skills/pr-to-lint-rule
Command: npx skills add https://github.com/pohlai88/afenda-xforge-v5 --skill pr-to-lint-rule-pohlai88

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams repeatedly leave the same review comments on pull requests (wrong imports, console.log usage, unsafe unwrap calls), wasting reviewer time and letting the same mistakes recur. This Skill turns that recurring feedback into an enforced lint rule so the pattern is caught automatically. ## Core Features & Use Cases - Toolchain Detection: Inspects the repository to identify the primary language, linter (ESLint, Ruff, Clippy, golangci-lint, RuboCop), and test framework before generating anything, and asks the user when detection is ambiguous. - Lint Rule Generation: Produces a rule matching project conventions, such as an ESLint rule using the AST visitor pattern with meta and create(context) for JavaScript/TypeScript. - Documentation and Verification: Adds an annotation block to CLAUDE.md and runs the test suite to confirm the new rule and its tests pass. - Use Case: A team keeps telling contributors not to import directly from antd and to use the design system barrel file instead; describe that feedback once and receive a working ESLint rule with tests. ## Quick Start Ask the assistant to turn the recurring PR feedback "people forget to use our custom logger instead of console.log" into an automated lint rule with tests.

Frequently Asked Questions about pr-to-lint-rule

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a recurring code review comment into a lint rule?

Describe the repeated feedback in natural language, such as "don't use unwrap() in production code". The Skill detects your language and linter, generates the rule with tests, annotates CLAUDE.md, and runs the test suite to verify.

How do I write a custom ESLint rule for my project?

For JavaScript/TypeScript, the Skill generates an ESLint rule using the AST visitor pattern with meta and create(context), matching the conventions of any existing custom rules in your repository.

Which linters and languages does PR feedback automation support?

The Skill detects the repository's primary language and linter, covering ESLint for JavaScript/TypeScript, Ruff for Python, Clippy for Rust, golangci-lint for Go, and RuboCop for Ruby, along with the project's test framework.

What happens if the project language or linter cannot be detected?

If the language or linter cannot be confidently identified from the repository, the Skill asks the user which language and linter to target before generating any rule, avoiding incorrect output.

How is a generated lint rule verified before use?

After generating the rule and its tests, the Skill adds an annotation block to CLAUDE.md and runs npm test to confirm the new rule and tests pass before considering the task complete.