agentleFS
MicrosoftKnown publishermicrosoft/rnx-kit/AGENTS.md

rnx-kit

AGENTS.md1.7k starsChanged 9 months agoMITView on GitHub

This file provides guidance to agents when working with code in this repository. rnx-kit is a monorepo of React Native tooling created by Microsoft. It provides battle-tested tools for dependency management, Metro bundling enhancements, TypeScript integration, and cross-platform development (iOS, Android, macOS, Windows). - packages/ - Stable, published packages (e.g., @rnx-kit/cli, @rnx-kit/align-deps, @rnx-kit/metro-*) - incubator/ - Experimental packages (marked with "experimental": true in package.json) - scripts/ - Internal build tooling (rnx-kit-scripts CLI) - docsite/ - Documentation website (separate Yarn workspace…

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 1 mentionJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 2 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/rnx-kit repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/rnx-kit

The biggest 5 of 26 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 26

Talked about on GitHub and Bluesky (26 times).

On GitHub · 25

20 more on GitHub
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository2 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Run specific test: yarn test path/to/file.test.ts (from package directory)

    line 64
  2. Very specific:

    Run yarn format and yarn lint before committing

    line 175

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

This file provides guidance to agents when working with code in this repository.

Project Overview

rnx-kit is a monorepo of React Native tooling created by Microsoft. It provides battle-tested tools for dependency management, Metro bundling enhancements, TypeScript integration, and cross-platform development (iOS, Android, macOS, Windows).

Repository Structure

  • packages/ - Stable, published packages (e.g., @rnx-kit/cli, @rnx-kit/align-deps, @rnx-kit/metro-*)
  • incubator/ - Experimental packages (marked with "experimental": true in package.json)
  • scripts/ - Internal build tooling (rnx-kit-scripts CLI)
  • docsite/ - Documentation website (separate Yarn workspace with its own yarn.lock; not in root workspaces)
  • .changeset/ - Changeset configuration for versioning

Build System

Uses Nx for task orchestration with Yarn Berry workspaces. Node linker is pnpm. Requires Node.js >=18.12.

TypeScript compilation uses @typescript/native-preview (tsgo) by default. The --with-tsc flag falls back to standard tsc (only metro-config uses this).

Key Commands (Repository Root)

yarn                     # Install dependencies
yarn build               # Build all packages
yarn build-scope <pkg>   # Build specific package with dependencies (e.g., yarn build-scope @rnx-kit/cli)
yarn test                # Build and test all packages
yarn lint                # Lint all packages
yarn format              # Format all packages with Prettier
yarn clean               # Clean build artifacts (git clean)
yarn show-affected       # Show affected projects
yarn update-readme       # Regenerate API docs in READMEs (TypeDoc)

Package-Level Commands

yarn build               # Build current package only
yarn build --dependencies # Build current package and its dependencies
yarn test                # Run tests
yarn lint                # Lint current package
yarn format              # Format current package

Running Tests

  • Default test runner: Node.js built-in test runner (node:test) — most packages use this
  • Jest: Used by ~7 packages that have "jest" in package.json or a jest.config.js
  • The rnx-kit-scripts test command auto-detects which runner to use
  • Tests live in test/ directories with .test.ts extension
  • Run specific test: yarn test path/to/file.test.ts (from package directory)

Node test runner style:

import { equal } from "node:assert/strict";
import { describe, it } from "node:test";

CI Commands

yarn build:ci            # Build and test affected packages
yarn build:ci:all        # Build and test ALL packages
yarn bundle:ci           # Bundle affected packages
yarn change:check        # Verify change files exist for modified packages

Package Conventions

  • Each package uses rnx-kit-scripts for build/test/lint/format commands
  • TypeScript source in src/, compiled output in lib/
  • Entry point typically at src/index.ts
  • Standard dev dependencies: @rnx-kit/eslint-config, @rnx-kit/scripts, @rnx-kit/tsconfig
  • @rnx-kit/jest-preset is only added when a package uses Jest (not default)
  • eslint.config.js re-exports @rnx-kit/eslint-config
  • Published packages use a "typescript" export condition pointing to src/index.ts for development
  • Files named types.ts enforce the @rnx-kit/type-definitions-only ESLint rule (only type exports allowed)

Creating New Packages

yarn new-package <name>              # Creates in packages/
yarn new-package <name> --experimental # Creates in incubator/

Uses packages/template as baseline. Sets version to 0.0.1, adds experimental banner for incubator packages.

Change Management

Uses Changesets for versioning:

yarn change              # Create change file for PR

One change file per feature/fix; no need for multiple entries when addressing PR feedback. Releases are automated via CI — on merge to main, the changesets action creates a release PR or publishes to npm.

Ignored packages (no changesets needed): @rnx-kit/ignore, @rnx-kit/template, test apps.

Key Packages

  • @rnx-kit/cli - Main CLI (rnx-cli) integrating all tools
  • @rnx-kit/align-deps - Dependency version alignment across repos
  • @rnx-kit/metro-* - Metro bundler plugins (TypeScript, config, tree-shaking, duplicate detection, cyclic deps)
  • @rnx-kit/tools-* - Platform-specific utilities (android, apple, node, react-native, filesystem, shell, workspaces, etc.)
  • @rnx-kit/config - Configuration loading from package.json rnx-kit field
  • @rnx-kit/eslint-plugin - Custom ESLint rules (no-foreach-with-captured-variables, type-definitions-only)
  • @rnx-kit/typescript-react-native-resolver - TypeScript resolver for React Native

Dependency Alignment

The repo uses align-deps to maintain consistent dependency versions. Run from root:

yarn rnx-align-deps --write  # Fix misaligned dependencies

Quality Checks

These all run in CI and should pass before merging:

yarn format              # Prettier formatting
yarn lint                # ESLint
yarn rnx-align-deps --write  # Dependency alignment
yarn constraints --fix   # Yarn constraints (consistent author, homepage, repository fields)
yarn knip                # Detect unused dependencies
yarn dedupe --check      # Prevent package duplicates in lockfile
node scripts/lint-tsconfig.ts  # Validate TypeScript configs
yarn update-readme       # Regenerate API docs

CI uses suggestion-bot to post code review suggestions for format, constraints, align-deps, and readme issues.

Platform-Specific Notes

  • Test apps: packages/test-app (iOS/Android), packages/test-app-macos, packages/test-app-windows
  • Native builds require platform toolchains (Xcode, Android Studio, Visual Studio)
  • CocoaPods installation is handled in CI via microsoft/react-native-test-app GitHub actions

Code Style

  • Prettier for formatting, ESLint for linting
  • Run yarn format and yarn lint before committing
  • Prettier config: .github/prettierrc.json (uses prettier-plugin-organize-imports)
  • ESLint config: packages/eslint-config/ (combines @microsoft/eslint-plugin-sdl with @rnx-kit/eslint-plugin)

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.