pr-to-lint-rule
Skill15 starsChanged 5 months agoMITView on GitHub
Convert a recurring PR review comment into an automated lint rule with tests and CLAUDE.md annotation
In this repository24 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- examples/CLAUDE.mdCLAUDE.md
- src/CLAUDE.mdCLAUDE.md
- add-a-linterSkill
- audience-checkSkill
- audit-feedback-loopSkill
- code-qualitySkill
- deep-researchSkill
- dogfood-cliSkill
- enforce-rules-formatSkill
- generate-logoSkill
- hexagonal-architectureSkill
- landing-siteSkill
- pr-to-lint-ruleSkill
- review-docsSkill
- screenshotSkill
- ship-a-featureSkill
- verify-docs-findableSkill
- adopt-specSkill
- debug-my-harnessSkill
- edit-specSkill
- linter-docsSkill
- strengthenSkill
- test-harnessSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Look at the repository to determine:
- Very specific: line 44
Add the annotation block. See docs/spec-format.md for the correct format.
- Very specific: line 48
Run npm test to ensure the new rule and tests pass.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- vigiles:sha256:49b12ebc0cf20852 compiled from examples/SKILL.md.spec.ts -->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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

