compiler-port

compiler-port is a skill for Claude Code from react/react. It costs 35 tokens per session (1,147 once invoked), scanned A, original, MIT.

A workflow for moving a compiler pass from TypeScript to Rust. A compiler pass is one processing stage that transforms or analyzes program code.

In plain words
What is it for?
Finding a pass in the React Compiler pipeline, locating its TypeScript implementation, mapping it to the correct Rust crate, implementing the port, and fixing test failures.
Why use it?
It verifies that the requested pass exists and is supported before implementation begins. It also gathers the relevant source and Rust-crate context, then uses testing and review to catch porting mistakes.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions subagents.

Good fit Finding a pass in the React Compiler pipeline, locating its TypeScript implementation, mapping it to the correct Rust crate, implementing the port, and fixing test failures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/react/react/compiler-port
About the project

React is a JavaScript library for building user interfaces from reusable components whose output changes as application data changes. It is used by web and mobile developers to create interactive interfaces, including server-rendered web experiences and React Native apps.

react/react · 251,069 stars · on GitHub · react.dev

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.

Any agent
npx skills add react/react --skill compiler-port
Clone the repo
git clone --depth 1 https://github.com/react/react

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for compiler-port

README.md
[![agentmods](https://agentmods.dev/badge/skills/react/react/compiler-port/github.svg)](https://agentmods.dev/skills/react/react/compiler-port)
Your own site
<a href="https://agentmods.dev/skills/react/react/compiler-port"><img src="https://agentmods.dev/badge/skills/react/react/compiler-port/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for compiler-port

Your own site · 80×15
<a href="https://agentmods.dev/skills/react/react/compiler-port"><img src="https://agentmods.dev/badge/skills/react/react/compiler-port.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,147 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00035 $0.01147
Opus 5.5 $0.00014 $0.00459
Sonnet 5.5 $0.00007 $0.00229
Haiku 4.5 $0.00003 $0.00115

Measured 1mo ago against content hash 15c953f2bde9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

compiler-port 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 1mo 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.

compiler/.claude/skills/compiler-port/SKILL.md · 102 lines

How it starts

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

Port Compiler Pass

Port a compiler pass from TypeScript to Rust end-to-end.

Arguments:

  • $ARGUMENTS: Pass name exactly as it appears in Pipeline.ts log entries (e.g., PruneMaybeThrows, SSA, ConstantPropagation)

Step 0: Validate pass name

  1. Read compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts
  2. Search for name: '$ARGUMENTS' in log entries
  3. If not found, list all available pass names from the log({...name: '...'}) calls and stop
  4. Check the kind field of the matching log entry:
    • If kind: 'ast', report that test-rust-port only supports hir and reactive kind passes currently and stop
    • If kind: 'hir' or kind: 'reactive', proceed

Step 1: Determine TS source files and Rust crate

  1. Follow the import in Pipeline.ts to find the actual TypeScript file(s) for the pass
  2. Map the TS folder to a Rust crate using this mapping:
TypeScript Path Rust Crate
src/HIR/ (excluding BuildHIR.ts, HIRBuilder.ts) react_compiler_hir
src/HIR/BuildHIR.ts, src/HIR/HIRBuilder.ts react_compiler_lowering
src/Babel/, src/Entrypoint/ react_compiler
src/CompilerError.ts react_compiler_diagnostics
src/ReactiveScopes/ react_compiler_reactive_scopes
src/<Name>/ react_compiler_<name> (1:1, e.g., src/Optimization/ -> react_compiler_optimization)
  1. Check if the pass is already ported:
    • Check if the corresponding Rust file exists in the target crate
    • Check if compiler/crates/react_compiler/src/entrypoint/pipeline.rs already calls it
    • If both are true, report the pass is already ported and stop

Step 2: Gather context

Read the following files (all reads happen in main context):

  1. Architecture guide: compiler/docs/rust-port/rust-port-architecture.md
  2. Pass documentation: Check compiler/packages/babel-plugin-react-compiler/docs/passes/ for docs about this pass
  3. TypeScript source: All TypeScript source files for the pass + any helpers imported from the same folder
  4. Rust pipeline: compiler/crates/react_compiler/src/entrypoint/pipeline.rs
  5. Rust HIR types: Key type files in compiler/crates/react_compiler_hir/src/ (especially hir.rs, environment.rs)
  6. Rust reactive types: For reactive passes, also read compiler/crates/react_compiler_hir/src/reactive_function.rs
  7. Target crate: If the target crate already exists, read its Cargo.toml, src/lib.rs, and existing files to understand the current structure

Read the full file on GitHub · 102 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. 1mo ago First seen · 102 lines · 35 tokens per session scan A 15c953f2bde9

Subscribe to this mod's changes

compiler-port is a skill published in the GitHub repository react/react (251,069 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 1,147 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other skills, from other repositories

extending-personhog-test-harness

When and how to add scenarios, chaos events, and invariants to the personhog e2e test harness (rust/personhog-test-harness). Use after fixing a bug or regression in the personhog leader path (leader, router, writer, replica, coordination protocol) so the fix gets a permanent regression scenario; when adding a new…

PostHog/posthog · 134 tokens

setup-web-tests

Set up Python test environment in Claude Code for web where flox is unavailable. Use when you need to run backend tests and uv sync fails due to Python version mismatch.

PostHog/posthog · 40 tokens

release-safety

Release safety rules. INVOKE WHEN: yarn release, npm publish, release canary, release packages, publishing, skip checks, skip tests. NEVER skip checks or tests without explicit permission.

tamagui/tamagui · 0 tokens

menu-testing-ssr

Server rendering and testing for react-horizontal-scrolling-menu: the library is client-only ('use client' required in React Server Components, else "createContext is not a function"), SSR first paint is controlled by the useIsVisible defaultValue argument (canonical ('first', true) / ('last', false))…

asmyshlyaev177/react-horizontal-scrolling-menu · 144 tokens

develop-ai-functions-example

Develop examples for AI SDK functions. Use when creating, running, or modifying examples under examples/ai-functions/src to validate provider support, demonstrate features, or create test fixtures.

vercel/ai · 40 tokens

onejs-setup-and-overview

Use this skill whenever the user wants to build or set up user interface in a Unity project using OneJS, React, TypeScript, or JSX, e.g. 'add a main menu to my game', 'build a settings screen', 'make a HUD', 'set up OneJS', 'my OneJS panel is blank', 'the UI is not hot reloading'. Covers confirming OneJS is installed…

Singtaa/OneJS · 211 tokens