material-ui AGENTS.md

Repository instructions for contributors and coding agents working on the Material UI codebase. They explain the required package manager, workspace commands, development and build commands, testing, and code-quality checks.

In plain words
What is it for?
Use them when installing dependencies, building a package or the full project, starting the documentation site, running unit, browser, end-to-end, or regression tests, and formatting or linting changes.
Why use it?
They reduce setup mistakes such as using an unsupported package manager or running workspace commands from the wrong place. They also give one consistent way to build and test the repository.

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/mui/material-ui/agents-md
Clone the repo
git clone --depth 1 https://github.com/mui/material-ui

Made for: Codex, OpenCode.

Per session 2,169 This file is loaded in full into every session.
When invoked 2,169 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.02169 $0.02169
Opus 5 $0.01085 $0.01085
Sonnet 5 $0.00434 $0.00434
Haiku 4.5 $0.00217 $0.00217

Measured today against content hash b06845bf046c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

material-ui 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 today.

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 · 242 lines

How it starts

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

AGENTS.md

This file provides guidance for AI agents working with code in this repository.

Package Manager

Only pnpm is supported (yarn/npm will fail). Use the -F flag for workspace operations:

pnpm -F @mui/material add some-package    # Add dependency to a package
pnpm -F @mui/material build               # Build a specific package

Never use cd to navigate into package directories for commands.

Common Commands

Development

pnpm install                  # Install deps if necessary
pnpm docs:dev                 # Start docs dev server only

Building

pnpm release:build            # Build all packages (except docs)
pnpm docs:build               # Build documentation site

Testing

pnpm test:unit                # Run all unit tests (jsdom)
pnpm test:unit ComponentName  # Run tests matching pattern
pnpm test:unit -t "test name" # Grep for specific test name
pnpm test:browser             # Run tests in real browsers (Chrome, Firefox, WebKit)
pnpm test:e2e                 # End-to-end tests
pnpm test:regressions         # Visual regression tests

Code Quality

pnpm prettier                 # Format staged changes
pnpm eslint                   # Lint with cache
pnpm typescript               # Type check all packages

API Documentation

After changing component props or TypeScript declarations:

pnpm proptypes && pnpm docs:api

Docs demos

Always author the TypeScript version of the demos. To generate the JavaScript variant, run:

pnpm docs:typescript:formatted

Architecture

This is a monorepo managed by Lerna with Nx for caching. Key packages:

  • @mui/material - Core Material UI components
  • @mui/system - Styling system (sx prop, styled, theme)
  • @mui/lab - Experimental components (new components go here first)
  • @mui/icons-material - Material Design icons
  • @mui/utils - Internal utilities
  • @mui/styled-engine - CSS-in-JS abstraction (Emotion by default)

Read the full file on GitHub · 242 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. today First seen · 242 lines · 2,169 tokens per session scan A b06845bf046c

Subscribe to this mod's changes

material-ui AGENTS.md is an instructions file published in the GitHub repository mui/material-ui (98,975 stars, last pushed today), licensed MIT. It adds 2,169 tokens to every session, about $0.0108 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-31.