Agent skill

Port Rule

by web-infra-dev in web-infra-dev/rslint

Port a new ESLint core or plugin rule to rslint, including explicitly requested batches.

MITAuto-check passedDevelopment

Install Port Rule

skills CLI
$ npx skills add web-infra-dev/rslint --skill port-rule -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install web-infra-dev/rslint port-rule --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/web-infra-dev/rslint.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/port-rule .claude/skills/port-rule && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
port-rule
GitHub stars
460
Token cost
~1.7k tokens
SKILL.md length
747 words
Files
6 (incl. scripts, references)
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Port a new ESLint core or plugin rule to rslint, including explicitly requested batches.

  • Works in 3 steps: Inspect the task branch and whether the… → Use the supplied upstream version and… → Read the pinned source and tests.…
  • Rules not implemented yet
  • SKILL.md covers Start with the source, Preserve coverage, Find the next detail and Verify and deliver
  • Runs JavaScript scripts from its folder; calls node

What it does

Port Rule is an agent skill from web-infra-dev/rslint. Port a new ESLint core or plugin rule to rslint, including explicitly requested batches. Use for rules not implemented yet, not for fixing, reviewing, or optimizing an existing rule.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `references/AST_PATTERNS.md`, `references/PORT_RULE.md` and `references/QUICK_REFERENCE.md`).

It sits in Development, covering Linting and formatting. It works with ESLint, JavaScript and TypeScript. The repository describes itself as: High-performance, ESLint-compatible linter for JavaScript and TypeScript. The licence is MIT.

When your agent uses it

  • Rules not implemented yet
  • Optimizing an existing rule

Example prompts

  • “/port-rule”

Requirements

  • Node.js

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Inspect the task branch and whether the rule already exists. Continue the same task on its branch. For a new task, fetch the intended base…
  2. Use the supplied upstream version and URLs. Otherwise use node .agents/skills/port-rule/scripts/search_rule.mjs for discovery, then pin…
  3. Read the pinned source and tests. Identify the rule's inputs, decisions and outputs, then check existing rslint, tsgo and installed Go…

What it can do on your machine

Read from SKILL.md and the folder at commit bbe46f7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Port Rule loads about 1.7k tokens when it runs, and up to ~35k if it reads all its reference files. Until then it costs about 48 tokens; SKILL.md has 747 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~35k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from web-infra-dev/rslint at commit bbe46f7, republished under its MIT licence (© web-infra-dev). 747 words, ~1,706 tokens.

Download SKILL.mdSave it as .claude/skills/port-rule/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
port-rule
description
Port a new ESLint core or plugin rule to rslint, including explicitly requested batches. Use for rules not implemented yet, not for fixing, reviewing, or optimizing an existing rule.

Port Rule

Implement the requested rule with upstream diagnostic, option, fix and suggestion behavior. Follow AGENTS.md for branches, verification scope, test organization and JavaScript semantics.

Start with the source

  1. Inspect the task branch and whether the rule already exists. Continue the same task on its branch. For a new task, fetch the intended base (normally origin/main), create a branch following AGENTS.md, and verify its name before editing.
  2. Use the supplied upstream version and URLs. Otherwise use node .agents/skills/port-rule/scripts/search_rule.mjs <rule-name> for discovery, then pin source, tests and docs to the latest released tag. A discovery URL on main is not a version pin. Resolve ambiguous origins before choosing a different rule. An upstream dependency without a matching Go port is a capability question, not an automatic blocker.
  3. Read the pinned source and tests. Identify the rule's inputs, decisions and outputs, then check existing rslint, tsgo and installed Go capabilities for the operations actually used. Prefer direct reuse or a small adaptation to copying helpers or porting whole dependencies; follow reuse and compatibility when behavior differs. Implement and verify in small increments. The tests can serve as the coverage record; a separate exhaustive plan and repeated checklists are unnecessary.

Keep one short progress record when work spans sessions or multiple rules: branch/base, upstream version, current work, valid check results and remaining gaps. Reuse it after resuming.

Preserve coverage

  • Migrate every upstream test and documentation example into Go upstream tests. Preserve grouping and origin so omissions can be reviewed. Keep unsupported framework cases as explained skips and report the gap.
  • Add Go extras for reachable decisions not covered upstream and for the AST shapes the rule actually inspects. Preserve JavaScript behavior across parentheses, optional access, computed/private keys, JSX and TypeScript forms where applicable. Combine cases when they exercise the same behavior; do not add duplicate tests to satisfy a count or comment-format quota.
  • Include supplied regressions and relevant real-code shapes. Search upstream issues when the source/tests leave a semantic question or missing realistic case; an issue-count quota is not a prerequisite for every port.
  • Assert message IDs, exact message variants, diagnostic ranges, options/defaults and any edits. Use the selected RuleTester's actual capabilities; passing a diagnostic-count check does not verify positions or fixes.
  • Keep the single JS file as the upstream mirror. Go extras stay in Go. For non-trivial rule semantics, also compare against the pinned reference on relevant real code and record actual file/rule coverage.

The detailed coverage and assertions contract explains options, diagnostic positions, skips and edit demand. Read it when writing or reviewing tests, not as a second planning checklist.

Show full SKILL.md (315 more words)Show less

Find the next detail

Use the following references for the current operation. Open a named path or symbol directly; use the location tables before searching whole trees. Read the relevant source definition to resolve a semantic question, not to rediscover every mapped build/catalog path. In an existing task, retain confirmed paths and check results in its progress record.

NeedReference
Commands, build dependencies and exact repository pathsQUICK_REFERENCE
Existing tools, dependency reuse and narrow differencesReuse and compatibility
Origin, deprecation or unsupported framework behaviorUpstream contract
Options parsing and schemaOptions and schema
AST adaptation and JavaScript operationsAST and language semantics, then the relevant API section
Symbols, comments, modules or deferred editsFramework boundaries
Catalog, JS wrapper and rule documentationIntegration and documentation
Compare real diagnostics with upstreamDifferential validation

For API lookup, start with API and contract lookup, then the linked section or named source symbol. If it does not cover the operation, search that reference or owning package before expanding. Do not enumerate all reference headings or load neighboring suites as a default preparation step. Batch independent reads, but bound their combined output to avoid truncation and repeated reads.

Verify and deliver

Select checks from the diff and actual consumers using the command reference. Complete required artifact builds before JS tests, review generated snapshots against upstream, and verify with CI=true. Do not treat a successful final shell command as evidence that earlier dependent steps passed; stop at a failed prerequisite and record each check's result.

Before declaring alignment, account for upstream coverage, relevant branch/AST cases, options and diagnostic/edit behavior. Fix unexplained differences instead of recording implementation accidents as expected output.

Finish at the requested scope. For commits or publication, follow AGENTS.md and the repository PR template; local work does not imply a commit, push or PR. Report the branch, actual checks and unresolved coverage. Load delivery and troubleshooting only for those steps.

© web-infra-dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in .agents/skills/port-rule of web-infra-dev/rslint.

  • SKILL.md
  • references/AST_PATTERNS.md
  • references/PORT_RULE.md
  • references/QUICK_REFERENCE.md
  • references/UTILS_REFERENCE.md
  • scripts/search_rule.mjs

Open the folder on GitHubat commit bbe46f7

Compare with similar skills

Port Rule next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Port Rule compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Port Rule this skillweb-infra-dev/rslint460—~1.7kAutomated safety check: PassMIT
Ultraciteagustinusnathaniel/nextarter-tailwind1252 repos~1.2kAutomated safety check: PassMIT
Code Qualityredis/RedisInsight8.9k—~1.2kAutomated safety check: PassCustom licence
Migrate OxlintAsvarox/allkaraoke2614 repos~2.5kAutomated safety check: PassNone
Typescript Tooling MigrationArize-ai/phoenix12k—~2.8kAutomated safety check: PassApache-2.0
Output Dev Code Stylegrowthxai/output440—~1.5kAutomated safety check: NotesApache-2.0

Similar skills

  • Ultracite

    agustinusnathaniel/nextarter-tailwind

    Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects.

    125 GitHub starsUsed in 2 repos~1.2k tokens
    DevelopmentAuto-check passed
  • Code Quality

    redis/RedisInsight

    Official

    Code-quality standards for RedisInsight: TypeScript strictness, naming conventions (camelCase, PascalCase, UPPERSNAKECASE), linting rules, no any without reason, no !important in styles, and…

    8.9k GitHub stars~1.2k tokensUpdated 3 days ago
    DevelopmentAuto-check passed
  • Migrate Oxlint

    Asvarox/allkaraoke

    Guide for migrating a project from ESLint to Oxlint. An agent skill from Asvarox/allkaraoke.

    261 GitHub starsUsed in 4 repos~2.5k tokens
    DevelopmentAuto-check passed
  • Migrate or upgrade TypeScript tooling in the Phoenix monorepo.

    12k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Output Dev Code Style

    growthxai/output

    Code style conventions for Output SDK workflow projects. An agent skill from growthxai/output.

    440 GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Antfu

    JetBrains/skills

    Official

    Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects.

    364 GitHub starsUsed in 4 repos~1k tokens
    DevelopmentAuto-check passed

More from web-infra-dev/rslint

  • Prepare Rslint npm Release

    web-infra-dev/rslint

    Prepare a stable release PR for the unified rslint npm packages by updating package versions and rule/TypeScript release metadata.

    460 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Debug CI

    web-infra-dev/rslint

    Reproduce Linux CI failures locally using Docker when the same tests pass on the host, especially Go platform differences and VS Code extension tests requiring xvfb.

    460 GitHub stars~2.8k tokensUpdated today
    Auto-check passed

Categories

Questions about Port Rule

What does Port Rule do?

Port a new ESLint core or plugin rule to rslint, including explicitly requested batches. Port Rule is an agent skill from web-infra-dev/rslint. Port a new ESLint core or plugin rule to rslint, including explicitly requested batches.

When should I use Port Rule?

Port Rule fits situations like: rules not implemented yet; optimizing an existing rule.

How do I install Port Rule in Claude Code?

Run `npx skills add web-infra-dev/rslint --skill port-rule -a claude-code`. Or copy the skill folder (.agents/skills/port-rule in web-infra-dev/rslint) into .claude/skills/port-rule in your project. Claude Code loads it when a task matches its description.

How do I install Port Rule in Codex?

Run `npx skills add web-infra-dev/rslint --skill port-rule -a codex`. Or copy the skill folder (.agents/skills/port-rule in web-infra-dev/rslint) into .agents/skills/port-rule in your project. Codex loads it when a task matches its description.

Can I use Port Rule in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add web-infra-dev/rslint --skill port-rule -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/port-rule, .gemini/skills/port-rule, .github/skills/port-rule and .opencode/skills/port-rule in your project.

What does Port Rule need to run?

Going by SKILL.md and its folder, Port Rule needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node). Our summary lists: Node.js.

Does Port Rule access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Port Rule safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Port Rule use?

Port Rule is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Port Rule use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 33k tokens, read only when the agent opens those files.

What are the alternatives to Port Rule?

Skills that share tags, products or a category with Port Rule: Ultracite (agustinusnathaniel/nextarter-tailwind, 125 stars), Code Quality (redis/RedisInsight, 8.9k stars), Migrate Oxlint (Asvarox/allkaraoke, 261 stars) and Typescript Tooling Migration (Arize-ai/phoenix, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Port Rule?

web-infra-dev (a GitHub organization) maintains it in web-infra-dev/rslint, which has 460 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 8, 2026.

Source: web-infra-dev/rslint on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.