port-rule
Skill462 starsChanged 11 days agoMITView on GitHub
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.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- create-draft-release-notesSkill
- debug-ciSkill
- prepare-rslint-npm-releaseSkill
- rstack-cli-docsSkill
- rstack-docs-writerSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Keep one short progress record when work spans sessions or multiple rules: branch/base, upstream version, current work, valid check results …
- Distinctive: line 24
Keep the single JS file as the upstream mirror.
- Distinctive: line 49
Before declaring alignment, account for upstream coverage, relevant branch/AST cases, options and diagnostic/edit behavior.
≈ “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
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
- 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. - 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 onmainis 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. - 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.
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.
| Need | Reference |
| Commands, build dependencies and exact repository paths | QUICK_REFERENCE |
| Existing tools, dependency reuse and narrow differences | Reuse and compatibility |
| Origin, deprecation or unsupported framework behavior | Upstream contract |
| Options parsing and schema | Options and schema |
| AST adaptation and JavaScript operations | AST and language semantics, then the relevant API section |
| Symbols, comments, modules or deferred edits | Framework boundaries |
| Catalog, JS wrapper and rule documentation | Integration and documentation |
| Compare real diagnostics with upstream | Differential 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.
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.

