AGENTS.md · radix-ui/primitives
AGENTS.md from radix-ui/primitives: 82 lines covering Architecture, Tech Constraints, Commands, Adding a new package and more.
Template by radix-ui
Install
Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/radix-ui/primitives/main/AGENTS.md -o AGENTS.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend-development, code-generation
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.
- For
- Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
- Length
- 82 lines
- File
AGENTS.md
Sections
- Architecture
- Tech Constraints
- Commands
- Adding a new package
- Testing
- Code conventions
- Pre-commit checklist
- PR checklist
First lines (shown under the repo's MIT license)
# Radix Primitives
Radix Primitives is for building high-quality, accessible design systems and web apps.
## Architecture
This project is a monorepo managed with [pnpm](https://pnpm.io/). It uses the following tools:
- [vitest](https://vitest.dev/) for unit testing
- [storybook](https://storybook.js.org/) for component documentation
- [playwright](https://playwright.dev/) for end-to-end testing
- [changesets](https://github.com/changesets/changesets) for versioning and publishing
- [oxlint](https://github.com/oxlint-dev/oxlint) for linting
- [oxfmt](https://github.com/oxlint-dev/oxfmt) for formatting
## Tech Constraints
- **pnpm** only
- **TypeScript** only (local scripts can use JavaScript with `// @ts-check` and type annotations)
## Commands
```bash
pnpm lint # Lint the project
pnpm format # Format the project
pnpm types:check # Type check the project
pnpm test # Run tests
pnpm build # Build the project
```
## Adding a new package
Most packages are React-specific and live in a directory that matches the convention `packages/react/{package-id}`. For example, `@radix-ui/react-accordion` lives in `packages/react/accordion`.
New packages should follow the same general folder structure as existing packages:
```
packages/react/
- {package-id}/
- src/
- {package-id}.tsx
- index.ts
- CHANGELOG.md
- package.json
- README.md
- tsconfig.json
```
Reference other packages and copy their `package.json`, `README.md`, and `tsconfig.json` structure for new packages. devDependencies and peerDependencies should use consistent version ranges across the repo.
## Testing
- Prefer repetition over abstraction in tests
## Code conventions
- [ ] Prefer braces for control flow statements (if, for, while, etc.) over the `one-liner` syntax
- [ ] Prefer braces for switch cases
- [ ] Explicitly check `never` cases for more exhaustive type checking (eg. `value satisfies never`)
- [ ] Prefer clear variable/function names over abbreviations (long descriptive names are good if they clarify the intent)
## Pre-commit checklist
- [ ] Run `pnpm lint --fix` to handle auto-fixable linting errors, then fix any remaining linting errors
- [ ] Run `pnpm format`
## PR checklist
- [ ] `pnpm format:check` passes
- [ ] `pnpm lint` passes
- [ ] `pnpm test` passes
- [ ] `pnpm types:check` passes
- [ ] Follows commit message conventions:
- [ ] Commit message is succinct and prefixed with the affected package name. Exceptions to the prefix rule:
- If changes are wide-ranging and affect multiple packages, omit the package name if it makes a succinct headline commit is too long
- No packages are affected (cosmetic )
- [ ] Avoid Conventional Commit message format (`feat:`, `fix:`, `feat!:` for breaking)
- [ ] Avoid including too many implementation details in the commit message; prefer concise descriptions
- [ ] PR title follows same conventions as commit messages
- [ ] PR description is concise and includes a summary of the changes. Again, avoid including too many implementation details; prefer concise descriptions.
- [ ] Include a link to the relevant issue in the PR description (if applicable)Signals
- Stars
- 19,423
- Forks
- 1,283
- Open issues
- 126
- Last commit (this folder)
- Oct 12, 2026 (17 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/radix-ui/primitives
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from radix-ui
- 0.492score
AGENTS.md · radix-ui/themes
radix-ui
AGENTS.md from radix-ui/themes: 199 lines covering Project Overview, Documentation, Repository Structure, Tech Stack and more.
TemplateDFreshness: D★ 8.8KCodex +5 - 0.492score
CLAUDE.md · radix-ui/themes
radix-ui
CLAUDE.md from radix-ui/themes: 199 lines covering Project Overview, Documentation, Repository Structure, Tech Stack and more.
TemplateDFreshness: D★ 8.8KClaude Code
Cite this page
AGENTS.md · radix-ui/primitives. Agent Mart. https://agentmart.dev/templates/radix-ui-primitives-agents-md (last updated 2026-10-24)