Performance Lint Rules logo

Performance Lint Rules

OrganizationPopular
oxc-project
performance-lint-rules

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.

Overview

Publisheroxc-project
Repositoryoxc
Skill nameperformance-lint-rules
Stars
22.9K
Forks
1.3K
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by oxc-project on GitHub. Read the source before you install it.

Installation

Install the Performance Lint Rules AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/oxc-project/oxc/tree/main/.agents/skills/performance-lint-rules
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/oxc-project/oxc.git /tmp/oxc
mkdir -p .claude/skills
cp -r /tmp/oxc/.agents/skills/performance-lint-rules .claude/skills/performance-lint-rules
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Performance Lint Rules in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Performance Lint Rules on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Performance Lint Rules is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

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.

Frequently asked questions

What does the Performance Lint Rules AI skill do?

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.

Why use Performance Lint Rules on TypingMind?

Because you install it once and use it with any model. Performance Lint Rules is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Performance Lint Rules in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/oxc-project/oxc/tree/main/.agents/skills/performance-lint-rules. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Performance Lint Rules?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Performance Lint Rules?

As many as you like. As long as a model supports skills, you can use Performance Lint Rules with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Performance Lint Rules AI skill free?

Yes. It is published on GitHub by oxc-project under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇