CLAUDE.md
CLAUDE.mdCLAUDE.mdroot
Quality
97/100
Scores the file, not the repository.Length
406 words
14 headings · 4 code blocksRepository
34
— · pushed 3 days agoLast changed
3 days ago
First indexed 3 days ago.1# MetaMask Design System23Design tokens and components for MetaMask extension (React) and mobile (React Native).45## Documentation for AI Agents67Repository-specific conventions and patterns:89- @.cursor/rules/styling.md10- @.cursor/rules/testing.md11- @.cursor/rules/component-documentation.md12- @.cursor/rules/component-architecture.md13- @.cursor/rules/component-creation.md14- @.cursor/rules/component-enum-union-migration.md15- @.cursor/rules/component-migration.md16- @.cursor/rules/figma-integration.md17- @.cursor/rules/release-workflow.md1819See @docs/ai-agents.md for comprehensive strategy explanation.2021## Monorepo Structure2223**This is a yarn workspaces monorepo.** Run all commands from the repository root.2425### Command Patterns2627Two ways to run commands:28291. **Root scripts** (preferred for common tasks)3031```bash32 yarn build # Builds all packages33 yarn test # Runs all tests34 yarn lint # Lints entire monorepo35```36372. **Workspace-specific commands** (for targeting single packages)38```bash39 yarn workspace @metamask/design-system-react run test40 yarn workspace @metamask/design-system-react run build41 yarn workspace @metamask/design-system-react run lint42```4344**Never** use `cd packages/*/` - always run commands from root using one of the patterns above.4546### Essential Commands4748```bash49# Build50yarn build # All packages51yarn build:types # TypeScript only5253# Test54yarn test # All tests55yarn test:storybook # Accessibility tests56yarn workspace @metamask/design-system-react run test # Single package5758# Lint59yarn lint # Check all60yarn lint:fix # Auto-fix6162# Component Creation63yarn create-component:react --name ComponentName --description "Brief description"64yarn create-component:react-native --name ComponentName --description "Brief description"6566# Storybook67yarn storybook # React web (port 6006)68yarn storybook:ios:build # React Native iOS dev client (first time / native dep changes)69yarn storybook:ios # React Native iOS (Metro + dev client)70yarn storybook:android:build # React Native Android dev client (first time / native dep changes)71yarn storybook:android # React Native Android (Metro + dev client)7273# Dependencies74yarn constraints --fix # Fix dependency constraints75yarn dedupe # Deduplicate dependencies76```7778### Packages7980- `@metamask/design-tokens` - Foundation tokens81- `@metamask/design-system-shared` - Shared utilities82- `@metamask/design-system-react` - Web components83- `@metamask/design-system-react-native` - Mobile components84- `@metamask/design-system-tailwind-preset` - Web Tailwind preset85- `@metamask/design-system-twrnc-preset` - Mobile twrnc preset8687### Apps (Consumer Platforms)8889Storybook apps in `apps/` consume packages for development and testing:9091- `@metamask/storybook-react` - Web component development (`yarn storybook`)92- `@metamask/storybook-react-native` - Mobile development (`yarn storybook:ios:build` then `yarn storybook:ios`)9394These platforms are for manual testing and component showcase. Visual regression testing is planned but not yet implemented.9596**Import using package names, never file paths:**9798```tsx99// ✅ Correct100import { Button } from '@metamask/design-system-react';101102// ❌ Wrong103import { Button } from '../../../packages/design-system-react';104```105106## Personal Overrides107108As per [Claude Code best practices](https://code.claude.com/docs/en/best-practices), create `CLAUDE.local.md` for personal preferences (gitignored).109See `CLAUDE.local.md.example` for template.110
Also in MetaMask/metamask-design-system
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| MetaMask/metamask-design-system.cursor/rules/pr.mdc · 34 | Cursor rules | testgitsecurity | 73/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 3 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| microsoft/playwrightCLAUDE.md · 94k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| filamentphp/filamentCLAUDE.md · 32k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| dotCMS/coreCLAUDE.md · 949 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | today | |
| lollipopkit/flutter_server_boxCLAUDE.md · 8.3k | CLAUDE.md | buildteststylearch+2 | 98/100 | 3 days ago |
