port-rule
Port ESLint rules to rslint (a Go-based linter). Use when users want to port/migrate/implement an ESLint rule, add a new lint rule, or mention "port rule" or specific ESLint rule names like "no-unused-vars", "no-console", etc. Supports both single-rule and batch-rule porting. This skill guides through the complete workflow from setup to PR submission.
Install
mkdir -p .claude/skills/port-rule && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4364" && unzip -o skill.zip -d .claude/skills/port-rule && rm skill.zipInstalls to .claude/skills/port-rule
About this skill
Port Rule
Port ESLint rules to rslint with 1:1 behavior parity. Supports porting a single rule or multiple rules in batch.
Prerequisites
Step 1: Get Rule Names
Accept one or more rule names from the user. Supported formats:
- ESLint core:
no-console,no-unused-vars - TypeScript-ESLint:
@typescript-eslint/no-explicit-any - Other plugins:
import/no-duplicates,react/jsx-uses-react
Users may provide rules as:
- A single rule name
- Multiple names separated by commas, spaces, or newlines
- A list provided one-by-one in conversation
Step 2: Get Rule Documentation URLs
For each rule, obtain the documentation URL.
If user already provided documentation URLs, skip to the next rule.
Otherwise, ask user to choose:
- Auto search (Recommended) - Run the search script to find documentation
- Provide URL manually - User provides the URL directly
For auto search, run for each rule:
node agents/port-rule/scripts/search_rule.mjs <rule-name>
Multiple rules can be searched in parallel.
The script searches:
- ESLint core rules → https://eslint.org/docs/latest/rules/
- TypeScript-ESLint rules → https://typescript-eslint.io/rules/
- Other plugins → GitHub repositories
After search:
- If found: Show results and ask user to confirm the URLs are correct
- If not found: Ask user to provide the documentation URL manually
Planning
Before starting any implementation, you MUST output a structured plan, then proceed to execute immediately without waiting for user confirmation.
IMPORTANT — Task Tracking: After outputting the text plan, you MUST use the TaskCreate tool to create a persistent task for each phase/step. This ensures progress is tracked even if the conversation context is compressed. Specifically:
- Create one task per phase (for single rule) or one task per phase per rule (for batch).
- Use
TaskUpdateto mark tasks asin_progresswhen starting andcompletedwhen done. - If you are unsure about current progress (e.g., after context compression or conversation resume), call
TaskListfirst to check which tasks remain.
Single Rule
For a single rule, output a brief checklist:
## Plan
- [ ] Phase 0: Branch setup
- [ ] Phase 1: Preparation — collect test cases for `<rule-name>`
- [ ] Phase 2: Implementation — Go rule + tests + docs
- [ ] Phase 3: Integration — JS tests + register
- [ ] Phase 4: Verification — build + test
- [ ] Phase 5: Commit & PR
Then create corresponding tasks via TaskCreate:
- "Phase 0: Branch setup"
- "Phase 1: Preparation — collect test cases for
<rule-name>" - "Phase 2: Implementation — Go rule + tests + docs for
<rule-name>" - "Phase 3: Integration — JS tests + register for
<rule-name>" - "Phase 4: Verification — build + test for
<rule-name>" - "Phase 5: Commit & PR for
<rule-name>"
Batch Rules
For multiple rules, output a structured plan with a summary table and per-rule breakdown:
## Plan
### Rules to port (N rules)
| # | Rule | Doc URL | Status |
|---|------|---------|--------|
| 1 | <rule-name-1> | <url> | pending |
| 2 | <rule-name-2> | <url> | pending |
| ... | ... | ... | ... |
### Progress
- [ ] Phase 0: Branch setup
- Rule 1: `<rule-name-1>`
- [ ] Phase 1: Preparation
- [ ] Phase 2: Implementation
- [ ] Phase 3: Integration
- [ ] Phase 4: Verification
- [ ] Commit
- Rule 2: `<rule-name-2>`
- [ ] Phase 1: Preparation
- [ ] Phase 2: Implementation
- [ ] Phase 3: Integration
- [ ] Phase 4: Verification
- [ ] Commit
- ...
- [ ] Phase 5: Create PR (summarize all rules)
Then create corresponding tasks via TaskCreate — one for Phase 0, then for each rule create tasks for Phase 1–4 + Commit, and finally one for Phase 5.
Output the plan, then proceed to Phase 0 immediately.
Workflow
Determine the mode based on the number of rules:
- 1 rule → Single Rule Mode
- 2+ rules → Batch Mode
Single Rule Mode
Follow the phases in PORT_RULE.md sequentially:
- Phase 0: Branch Setup - Create feature branch from main
- Phase 1: Preparation - Collect test cases and identify edge cases
- Phase 2: Implementation - Write Go rule, tests, and documentation
- Phase 3: Integration - Add JS tests and register rule
- Phase 4: Verification - Build binary and run all tests
- Phase 5: Submission - Commit and create PR
For each phase: mark its task as in_progress (via TaskUpdate) before starting, and completed after finishing. Update the text checklist as well.
Batch Mode
Follow the batch workflow in PORT_RULE.md:
- Phase 0: Branch Setup - Create a single feature branch for the batch (once)
- For each rule, execute in order:
- Phase 1: Preparation - Collect test cases for this rule
- Phase 2: Implementation - Write Go rule, tests, and documentation
- Phase 3: Integration - Add JS tests and register rule
- Phase 4: Verification - Build binary and run all tests
- Commit - Create an independent commit:
feat: port rule <rule-name> - Report - Briefly report the result before moving to the next rule
- Phase 5: Create PR - One PR summarizing all ported rules (once), see Phase 5 Details below
Progress tracking: After completing each rule, update the checklist (mark as [x]) and the corresponding tasks (via TaskUpdate to completed), then report the status. After a failure, mark the checklist as [!] with a reason.
Failure handling: If a rule fails at any phase, stop and ask the user:
- (a) Skip this rule and continue with the next one
- (b) Attempt to fix the issue
- (c) Abort the entire batch
Already-committed rules are not affected by later failures.
Phase 5: Commit & PR Details
Commit constraints:
- Commit message:
feat: port rule <rule-name> - Do NOT include AI-related information in commit messages (no
Co-Authored-By: Claudeor similar) - Only stage files related to the current rule(s).
pnpm format:gomay reformat unrelated files — discard them withgit checkout -- <file>before committing. - If the rule's plugin is already in
rslint.jsonplugins, add the rule with"warn"severity. Otherwise, do NOT modifyrslint.json.
PR title format:
- Single rule:
feat: port rule <rule-name> - Batch (single plugin):
feat: port N <plugin-name> rules - Batch (multiple plugins):
feat: port N rules from <plugin-1>, <plugin-2>
PR body template (batch single plugin):
## Summary
Port N <plugin-name> rules to rslint.
### Rules ported
| Rule | Description | Doc |
|------|-------------|-----|
| `<rule-1>` | [brief description] | [link](<url>) |
| `<rule-2>` | [brief description] | [link](<url>) |
## Checklist
- [x] Tests updated (or not required).
- [x] Documentation updated (or not required).
PR body template (single rule):
## Summary
Port the `<rule-name>` rule from ESLint to rslint.
[Brief description of what the rule does]
## Related Links
- ESLint rule: <link_to_eslint_doc>
- Source code: <link_to_source_code>
## Checklist
- [x] Tests updated (or not required).
- [x] Documentation updated (or not required).
Do NOT include AI-related information in PR title or body. If any rules were skipped during batch execution, note them in the PR body.
Completion Constraint
The workflow is complete ONLY when all tasks created during Planning are marked as completed (or explicitly skipped due to failure). Do NOT stop or wait for user instructions while there are still pending tasks. If the conversation context was compressed or the session was resumed, call TaskList first to check remaining work before continuing.
Quick Reference
Directory Structure:
- Core rules:
internal/rules/<rule_name_snake_case>/ - Plugin rules:
internal/plugins/<plugin_name>/rules/<rule_name_snake_case>/
Key Commands:
# Build binary (REQUIRED before JS tests)
cd packages/rslint && pnpm run build:bin
# Run Go tests
go test -count=1 ./internal/rules/<rule_name>
# Run JS tests
cd packages/rslint-test-tools && npx rstest run --testTimeout=10000 <rule-name>
# Lint and format checks (REQUIRED before commit)
pnpm format:check && pnpm lint:go
# Auto-fix formatting issues
pnpm format && pnpm format:go
References
- PORT_RULE.md - Complete porting guide with code templates
- AST_PATTERNS.md - AST traversal patterns
- UTILS_REFERENCE.md - Utility functions
- QUICK_REFERENCE.md - Commands cheatsheet
More by web-infra-dev
View all skills by web-infra-dev →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversExperience realistic stock trading with Paper Invest, the advanced stock trading simulator for authentic stock market si
Access clean code rules and best practices on-demand from GitHub with Agent Rules—no local files needed, supports many f
Easily convert markdown to PDF using Markitdown MCP server. Supports HTTP, STDIO, and SSE for fast converting markdown t
Unlock AI-ready web data with Firecrawl: scrape any website, handle dynamic content, and automate web scraping for resea
Enhance software testing with Playwright MCP: Fast, reliable browser automation, an innovative alternative to Selenium s
Extend your developer tools with GitHub MCP Server for advanced automation, supporting GitHub Student and student packag
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.