oxc AGENTS.md

A contributor guide for Oxc, a Rust-based toolkit that parses, checks, formats, transforms, and compresses JavaScript and TypeScript code.

In plain words
What is it for?
Use it to understand Oxc's main folders and Rust packages, run its development tasks, and follow its contributor and AI-use policies.
Why use it?
It explains the repository layout, development commands, and rules for using AI when contributing, so developers can work consistently and review changes responsibly.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/oxc-project/oxc/agents-md
Clone the repo
git clone --depth 1 https://github.com/oxc-project/oxc

Made for: Codex, OpenCode.

Per session 3,232 This file is loaded in full into every session.
When invoked 3,232 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03232 $0.03232
Opus 5 $0.01616 $0.01616
Sonnet 5 $0.00646 $0.00646
Haiku 4.5 $0.00323 $0.00323

Measured 2d ago against content hash 7e8dd476b66e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

oxc AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 330 lines

How it starts

The opening of the file, as written. The whole thing — 330 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md - AI Assistant Guide for Oxc

Oxc is a high-performance JavaScript/TypeScript toolchain written in Rust containing:

  • Parser (JS/TS with AST), Linter (oxlint), Formatter (oxfmt), Transformer, Minifier

AI Usage Policy for Contributors

IMPORTANT: If you are an AI assistant helping a human contributor:

  • Disclose AI usage - Contributors must disclose when AI tools were used to reduce maintainer fatigue
  • Full responsibility - The human contributor is responsible for all AI-generated issues or PRs they submit
  • Quality standards - Low-quality or unreviewed AI content will be closed immediately

All AI-generated code must be thoroughly reviewed, tested, and understood by the contributor before submission. Code should meet Oxc's performance and quality standards.

  • Ban policy - Contributors who submit repeated low-quality ("slop") PRs will be banned without prior warning. Bans may be lifted if you commit to contributing to Oxc in accordance with the policy above. You may request an unban via our Discord.

Repository Structure

Rust workspace with key directories:

  • crates/ - Core functionality (start here when exploring)
  • apps/ - Application binaries (oxlint, oxfmt)
  • napi/ - Node.js bindings
  • npm/ - npm packages
  • tasks/ - Development tools/automation

Avoid editing generated subdirectories.

Core Crates

  • oxc_parser - JS/TS parser
  • oxc_ast - AST definitions/utilities
  • oxc_semantic - Semantic analysis/symbols/scopes
  • oxc_linter - Linting engine/rules
  • oxc_formatter - Code formatting (Prettier-like for JS)
  • oxc_formatter_* - Code formatting (Prettier-like for other languages)
  • oxc_transformer - Code transformation (Babel-like)
  • oxc_minifier - Code minification
  • oxc_codegen - Code generation
  • oxc_isolated_declarations - TypeScript declaration generation
  • oxc_diagnostics - Error reporting
  • oxc_traverse - AST traversal utilities
  • oxc_allocator - Memory management
  • oxc_language_server - LSP server for editor integration
  • oxc - Main crate

Read the full file on GitHub · 330 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 330 lines · 3,232 tokens per session scan A 7e8dd476b66e

Subscribe to this mod's changes

oxc AGENTS.md is an instructions file published in the GitHub repository oxc-project/oxc (22,563 stars, last pushed 2d ago), licensed MIT. It adds 3,232 tokens to every session, about $0.0162 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.