Agent skill

Oxc Lint Rule Performance Review

by oxc-project in oxc-project/oxc

Review guidance for the speed of Oxc linter rules written in Rust: narrow node-kind checks, cheap tests first, deferred diagnostics and the smallest possible iteration.

MITAuto-check passedDevelopment

Install Oxc Lint Rule Performance Review

skills CLI
$ npx skills add oxc-project/oxc --skill performance-lint-rules -a claude-code

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

GitHub CLI
$ gh skill install oxc-project/oxc performance-lint-rules --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/oxc-project/oxc.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/performance-lint-rules .claude/skills/performance-lint-rules && 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
performance-lint-rules
GitHub stars
23k
Token cost
~1.1k tokens
SKILL.md length
559 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Review guidance for the speed of Oxc linter rules written in Rust: narrow node-kind checks, cheap tests first, deferred diagnostics and the smallest possible iteration.

  • Reviewing a new or changed Oxc linter rule for speed
  • Calls cargo
  • Auditing existing rules under crates/oxc_linter for performance improvements
  • Narrowing which AST node types a rule runs on

What it does

This skill is for reviewing Rust rule code under crates/oxc_linter/src/rules/, or for deliberately auditing those rules for speed. The first guideline is to put node kind checks at a rule's entry point: when a rule handles only a few syntactic forms, run starts with an AstKind match and returns for everything else, which lets lintgen derive narrower NODE_TYPES and stops the rule from being dispatched on unrelated nodes. After changing node kinds, regenerate the runner with cargo lintgen and consider assert_rule_runs_on_node_types coverage. A rule should implement only the entry point it needs, since defining both run and run_once blocks narrowing.

The other guidelines are to order checks from cheapest and most selective to most expensive, for example a matches! on a small string set before semantic lookups, or checking that a JSX attribute starts with aria- before lowercasing it. Diagnostics, labels, fix data, ancestors and symbols should wait until a syntactic candidate could really report, since most files have no lint errors. Iterate over the smallest set possible, using run_once for whole-file passes, symbols instead of AST nodes, and targeted scoping lookups such as get_binding and root_unresolved_references instead of scanning every binding or identifier reference.

When your agent uses it

  • Reviewing a new or changed Oxc linter rule for speed
  • Auditing existing rules under crates/oxc_linter for performance improvements
  • Narrowing which AST node types a rule runs on

Example prompts

  • “Review the new no-array-index-key rule for performance problems.”
  • “Audit the rules in crates/oxc_linter/src/rules/ for avoidable allocations and unneeded node dispatch.”
  • “Restructure this rule so it only runs on the node kinds it handles.”

Requirements

  • The Oxc repository with a Rust toolchain for cargo lintgen

What it can do on your machine

Read from SKILL.md and the folder at commit 4a28c91. 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

    Shell commands in SKILL.md call:

    • cargo

    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

Oxc Lint Rule Performance Review loads about 1.1k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 559 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

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); files beside SKILL.md are not scanned.

SKILL.md

The full file from oxc-project/oxc at commit 4a28c91, republished under its MIT licence (© oxc-project). 559 words, ~1,071 tokens.

Download SKILL.mdSave it as .claude/skills/performance-lint-rules/SKILL.md (or your agent's skills folder).
name
performance-lint-rules
description
Performance review guidance for Oxc linter rule implementations. Use only when reviewing Rust rule code under crates/oxc_linter/src/rules/ or when explicitly auditing those rules for performance improvements.

Performance Guidelines

Prefer top-level node kind checks

Put node kind checks at the rule entry point. If a rule only handles a few syntactic forms, start run with an AstKind match and return for all other nodes, even when a helper filters again internally. This lets lintgen derive narrower NODE_TYPES and avoids dispatching the rule on unrelated AST nodes.

After changing the relevant node kinds for a rule, regenerate the rule runner with cargo lintgen and consider adding or updating assert_rule_runs_on_node_types coverage in crates/oxc_linter/src/rule.rs.

Implement only the needed entry point. If a rule is a whole-file pass over semantic indexes, use run_once by itself. Implementing both run and run_once prevents useful node-type narrowing.

Do cheaper checks first

Order checks from cheapest and most selective to most expensive. Return quickly for common non-matches before doing semantic lookups, allocations, or deeper traversal.

  • Matching a small fixed string set with matches! before semantic checks.
  • Rejecting lowercase identifiers before global-object checks when only constructors can match.
  • Checking whether a JSX attribute starts with aria- before lowercasing it.
  • Checking for required syntax such as a key prop before looking up callback parameter symbols.
  • Checking source_range(span).contains("this") before running a visitor that only finds this.
Delay expensive context

Most files do not contain lint errors. Do not prepare diagnostics, labels, help text, fix data, ancestors, symbols, JSX element types, or replacement strings until the rule has found a syntactic candidate that could actually report.

Iterate over the smallest set possible
  • Use run_once when the rule only needs a whole-file pass and does not need to run on every node.
  • Iterate over symbols instead of AST nodes when looking for references to specific names.
  • Prefer targeted lists or semantic data over broad AST traversal when available.
  • For name-based binding checks, use ctx.scoping().get_binding(scope_id, name) instead of scanning every binding in get_bindings(scope_id).
  • For global or unresolved identifier checks, start from ctx.scoping().root_unresolved_references().get(name) for the small set of relevant names instead of visiting every IdentifierReference.
  • When iterating unresolved references, still verify the reference is the right kind: skip references with a symbol, type-only references, and nodes whose AstKind is not the expected identifier or member access.
  • When checking imported specifiers or exported names, iterate the concrete specifiers or precomputed export set rather than scanning all root bindings for every item.

Use precomputed FxHashSets only when many symbols need the same membership test. Prefer keyed semantic lookup when each lookup already has an exact name.

Show full SKILL.md (157 more words)Show less
Avoid unnecessary regular expressions

Avoid regular expressions when byte or string checks are enough: contains, starts_with, ends_with, or matching a small fixed set.

For hot comment or string scanning paths, prefer a cheap memchr or byte search to reject most inputs, then parse only candidates. Preserve regex semantics when replacing one, especially identifier boundaries, optional prefixes, and multiline whitespace.

Avoid heap allocations
  • Use copy-on-write utilities when a value usually does not need to change.
  • Avoid intermediate Vecs and Strings when iteration or borrowed data is enough.
  • Keep temporary data on the stack when practical.
  • Delay allocation until a diagnostic, fix, or transformed value is actually needed.
  • Use allocation-free ASCII comparisons such as starts_with_ignore_case before calling cow_to_ascii_lowercase.
  • Use byte scans such as as_bytes().array_windows() for simple ASCII patterns like escape sequences.
  • Reserve hash maps or sets when the final size is known.
  • Avoid building a HashSet just to check names that can be looked up directly in scoping data.

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

Files

Just SKILL.md in .agents/skills/performance-lint-rules of oxc-project/oxc.

Open the folder on GitHubat commit 4a28c91

Compare with similar skills

Oxc Lint Rule Performance Review 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.

Oxc Lint Rule Performance Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Oxc Lint Rule Performance Review this skilloxc-project/oxc23k—~1.1kAutomated safety check: PassMIT
Code Qualitywaybarrios/opencode-power-pack533—~1.8kAutomated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT
Worktrunk Tend CI Guidancemax-sixty/worktrunk9k—~6.4kAutomated safety check: PassCustom licence
Doc Commentsbiomejs/biome26k—~3kAutomated safety check: PassApache-2.0

Similar skills

  • Code Quality

    waybarrios/opencode-power-pack

    Agents should invoke this skill for code reviews, linting/formatting setup, maintainability checks, complexity concerns, warning cleanup, coding standards, or quality gates in Rust, TypeScript…

    533 GitHub stars~1.8k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Worktrunk Tend CI Guidance

    max-sixty/worktrunk

    Adds Worktrunk-specific rules to the tend CI workflows: Codecov polling, Rust test commands, labels and review criteria for pull requests handled in CI.

    9k GitHub stars~6.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Doc Comments

    biomejs/biome

    Official

    A skill your agent uses whenever writing or editing Rust //, ///, or //!

    26k GitHub stars~3k tokensUpdated today
    DevelopmentAuto-check passed
  • Qt Cpp Review

    Serial-Studio/Serial-Studio

    Qt6/C++ deep code review for Serial Studio. An agent skill from Serial-Studio/Serial-Studio.

    7.2k GitHub stars~4.3k tokensUpdated today
    DevelopmentAuto-check passed

More from oxc-project/oxc

  • Insta Snapshot Review

    oxc-project/oxc

    Reviews and accepts Insta snapshot changes in the Oxc repo from the command line, one reviewed snapshot at a time, instead of using the interactive UI.

    23k GitHub stars~356 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Oxc Lint Rule Performance Review

What does Oxc Lint Rule Performance Review do?

Review guidance for the speed of Oxc linter rules written in Rust: narrow node-kind checks, cheap tests first, deferred diagnostics and the smallest possible iteration. This skill is for reviewing Rust rule code under crates/oxc_linter/src/rules/, or for deliberately auditing those rules for speed. The first guideline is to put node kind checks at a rule's entry point: when a rule handles only a few syntactic forms, run starts with an AstKind match and returns for everything else, which lets lintgen derive narrower NODE_TYPES and stops the rule from being dispatched on unrelated nodes.

When should I use Oxc Lint Rule Performance Review?

Oxc Lint Rule Performance Review fits situations like: reviewing a new or changed Oxc linter rule for speed; auditing existing rules under crates/oxc_linter for performance improvements; narrowing which AST node types a rule runs on.

How do I install Oxc Lint Rule Performance Review in Claude Code?

Run `npx skills add oxc-project/oxc --skill performance-lint-rules -a claude-code`. Or copy the skill folder (.agents/skills/performance-lint-rules in oxc-project/oxc) into .claude/skills/performance-lint-rules in your project. Claude Code loads it when a task matches its description.

How do I install Oxc Lint Rule Performance Review in Codex?

Run `npx skills add oxc-project/oxc --skill performance-lint-rules -a codex`. Or copy the skill folder (.agents/skills/performance-lint-rules in oxc-project/oxc) into .agents/skills/performance-lint-rules in your project. Codex loads it when a task matches its description.

Can I use Oxc Lint Rule Performance Review 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 oxc-project/oxc --skill performance-lint-rules -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/performance-lint-rules, .gemini/skills/performance-lint-rules, .github/skills/performance-lint-rules and .opencode/skills/performance-lint-rules in your project.

What does Oxc Lint Rule Performance Review need to run?

Going by SKILL.md and its folder, Oxc Lint Rule Performance Review needs the command-line tools its instructions call (cargo). Our summary lists: The Oxc repository with a Rust toolchain for cargo lintgen.

Does Oxc Lint Rule Performance Review 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 Oxc Lint Rule Performance Review 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. Review the folder before installing.

What licence does Oxc Lint Rule Performance Review use?

Oxc Lint Rule Performance Review 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 Oxc Lint Rule Performance Review use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Oxc Lint Rule Performance Review?

Skills that share tags, products or a category with Oxc Lint Rule Performance Review: Code Quality (waybarrios/opencode-power-pack, 533 stars), Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Rust Best Practices (farm-fe/farm, 5.6k stars) and Worktrunk Tend CI Guidance (max-sixty/worktrunk, 9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Oxc Lint Rule Performance Review?

oxc-project (a GitHub organization) maintains it in oxc-project/oxc, which has 22,966 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 8, 2026.

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