- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.4k
 
chore: add CLAUDE.md and update .gitignore to prevent accidental commits #36547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| 
           CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.  | 
    
          📊 Page Load Benchmark ResultsCurrent Commit:  📄 Localhost MetaMask Test DappSamples: 100 Summary
 📈 Detailed Results
 Results generated automatically by MetaMask CI  | 
    
          Builds ready [313b23d]
 UI Startup Metrics (1223 ± 68 ms)
 Bundle size diffs [🚨 Warning! Bundle size has increased!]
  | 
    
| 
           Are you sure we want to ignore this file? Because maybe we want to actually commit it.  | 
    
          
 We could also just do that!  | 
    
313b23d    to
    33d35e2      
    Compare
  
    | 
               | 
          ||
| # Claude AI development files | ||
| CLAUDE.md | ||
| /CLAUDE.md | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
          📊 Page Load Benchmark ResultsCurrent Commit:  📄 Localhost MetaMask Test DappSamples: 100 Summary
 📈 Detailed Results
 Results generated automatically by MetaMask CI  | 
    
          Builds ready [0d6a498]
 UI Startup Metrics (1228 ± 69 ms)
 Bundle size diffs [🚨 Warning! Bundle size has increased!]
  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a CLAUDE.md developer guidance document tailored for AI-assisted development and configuration hygiene to reduce accidental commits of temporary AI files.
- Introduces CLAUDE.md with commands, architecture, testing, and configuration guidance.
 - Mentions tooling/config updates to ignore Claude-related temp files (diff for .gitignore not included here).
 
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| - Built-in support for Ethereum and EVM-compatible networks | ||
| - Bitcoin wallet snap integration | ||
| - Solana wallet snap integration | ||
| - Account abstraction and delegation features | 
    
      
    
      Copilot
AI
    
    
    
      Oct 3, 2025 
    
  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section implies Bitcoin and Solana support as general integrations and that account abstraction is a core feature. To avoid misleading readers, clarify that non-EVM chains and AA are available via optional Snaps or specific features, not built-in by default. Suggested wording:
- Built-in support for Ethereum and other EVM-compatible networks
 - Optional Bitcoin support via Snaps (not enabled by default)
 - Optional Solana support via Snaps (not enabled by default)
 - Account abstraction and delegation may be available via specific snaps/features; see project docs for current scope.
 
| - Built-in support for Ethereum and EVM-compatible networks | |
| - Bitcoin wallet snap integration | |
| - Solana wallet snap integration | |
| - Account abstraction and delegation features | |
| - Built-in support for Ethereum and other EVM-compatible networks | |
| - Optional Bitcoin support via Snaps (not enabled by default) | |
| - Optional Solana support via Snaps (not enabled by default) | |
| - Account abstraction and delegation may be available via specific snaps/features; see project docs for current scope. | 
| - `yarn start` - Start development build with file watching (MV3, no LavaMoat) | ||
| - `yarn start:mv2` - Start development build for Firefox (MV2) | ||
| - `yarn start:flask` - Start development build with Flask features (experimental) | ||
| - `yarn dist` - Production build for Chromium browsers (MV3) | ||
| - `yarn dist:mv2` - Production build for Firefox (MV2) | ||
| - `yarn build:test` - Create test build for e2e testing | ||
| 
               | 
          ||
| ### Testing | ||
| 
               | 
          ||
| - `yarn test` - Run linting and unit tests | ||
| - `yarn test:unit` - Run Jest unit tests only | ||
| - `yarn test:e2e:chrome` - Run e2e tests in Chrome | ||
| - `yarn test:e2e:firefox` - Run e2e tests in Firefox | ||
| - `yarn test:e2e:single <test-file>` - Run single e2e test | ||
| 
               | 
          ||
| ### Linting & Code Quality | ||
| 
               | 
          ||
| - `yarn lint` - Run all linting (ESLint, TypeScript, Stylelint, Prettier) | ||
| - `yarn lint:fix` - Auto-fix linting issues where possible | ||
| - `yarn lint:tsc` - TypeScript compiler checks | ||
| - `yarn lint:eslint` - ESLint checks only | ||
| 
               | 
          ||
| ### Development Tools | ||
| 
               | 
          ||
| - `yarn storybook` - Start Storybook for component development | ||
| - `yarn dapp` - Start test dapp server for testing MetaMask integration | ||
| 
               | 
          
    
      
    
      Copilot
AI
    
    
    
      Oct 3, 2025 
    
  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These command lists duplicate package.json scripts and are likely to drift. Consider adding a brief note that the package.json scripts are the source of truth and keep only high-level examples here, or link to package.json. Alternatively, add a 'yarn run' tip or a small 'yarn help' script to enumerate available commands.
| - **`app/`** - Browser extension core functionality | ||
| - `scripts/background.js` - Main background script (service worker in MV3) | ||
| - `scripts/contentscript.js` - Content script injected into web pages | ||
| - `scripts/inpage.js` - Provider API injected into page context | ||
| - `scripts/metamask-controller.js` - Main controller orchestrating all functionality | ||
| - `scripts/controllers/` - Individual controllers (preferences, transactions, etc.) | ||
| 
               | 
          ||
| - **`ui/`** - React-based user interface | ||
| - `pages/` - Main UI screens (home, settings, confirmations, etc.) | ||
| - `components/` - Reusable React components | ||
| - `hooks/` - Custom React hooks | ||
| - `ducks/` - Redux state management (actions, reducers, selectors) | ||
| - `selectors/` - Redux state selectors | ||
| 
               | 
          ||
| - **`shared/`** - Code shared between background and UI | ||
| - `constants/` - Application constants and enums | ||
| - `lib/` - Utility libraries and helpers | ||
| - `modules/` - Business logic modules | ||
| - `types/` - TypeScript type definitions | 
    
      
    
      Copilot
AI
    
    
    
      Oct 3, 2025 
    
  
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These hard-coded file paths/extensions can easily become outdated. To reduce confusion, consider linking to actual files/folders in this repo (relative links) or omitting file extensions where not essential so the section stays accurate if files are migrated or renamed.
| - **`app/`** - Browser extension core functionality | |
| - `scripts/background.js` - Main background script (service worker in MV3) | |
| - `scripts/contentscript.js` - Content script injected into web pages | |
| - `scripts/inpage.js` - Provider API injected into page context | |
| - `scripts/metamask-controller.js` - Main controller orchestrating all functionality | |
| - `scripts/controllers/` - Individual controllers (preferences, transactions, etc.) | |
| - **`ui/`** - React-based user interface | |
| - `pages/` - Main UI screens (home, settings, confirmations, etc.) | |
| - `components/` - Reusable React components | |
| - `hooks/` - Custom React hooks | |
| - `ducks/` - Redux state management (actions, reducers, selectors) | |
| - `selectors/` - Redux state selectors | |
| - **`shared/`** - Code shared between background and UI | |
| - `constants/` - Application constants and enums | |
| - `lib/` - Utility libraries and helpers | |
| - `modules/` - Business logic modules | |
| - `types/` - TypeScript type definitions | |
| - **[`app/`](./app/)** - Browser extension core functionality | |
| - [`scripts/background.js`](./app/scripts/background.js) - Main background script (service worker in MV3) | |
| - [`scripts/contentscript.js`](./app/scripts/contentscript.js) - Content script injected into web pages | |
| - [`scripts/inpage.js`](./app/scripts/inpage.js) - Provider API injected into page context | |
| - [`scripts/metamask-controller.js`](./app/scripts/metamask-controller.js) - Main controller orchestrating all functionality | |
| - [`scripts/controllers/`](./app/scripts/controllers/) - Individual controllers (preferences, transactions, etc.) | |
| - **[`ui/`](./ui/)** - React-based user interface | |
| - [`pages/`](./ui/pages/) - Main UI screens (home, settings, confirmations, etc.) | |
| - [`components/`](./ui/components/) - Reusable React components | |
| - [`hooks/`](./ui/hooks/) - Custom React hooks | |
| - [`ducks/`](./ui/ducks/) - Redux state management (actions, reducers, selectors) | |
| - [`selectors/`](./ui/selectors/) - Redux state selectors | |
| - **[`shared/`](./shared/)** - Code shared between background and UI | |
| - [`constants/`](./shared/constants/) - Application constants and enums | |
| - [`lib/`](./shared/lib/) - Utility libraries and helpers | |
| - [`modules/`](./shared/modules/) - Business logic modules | |
| - [`types/`](./shared/types/) - TypeScript type definitions | 
Description
Add CLAUDE.md developer guidance file and update .gitignore to prevent accidental commits of Claude AI development files.
This PR includes a comprehensive CLAUDE.md file that provides guidance to Claude Code when working with this repository, including common development commands, testing strategies, and high-level architecture overview. The .gitignore is also updated to prevent accidental commits of temporary Claude files, following the same pattern used in the MetaMask mobile repository.
Changelog
CHANGELOG entry: null
Related issues
Fixes: N/A
Manual testing steps
CLAUDE.mdfile is present in the repository rootclaude.mdfiles and confirm they are ignored by gittemp/directories are properly ignoredScreenshots/Recordings
Not applicable - this is a configuration and documentation change.
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Adds a CLAUDE.md developer guide and updates .gitignore to ignore Claude-related files and temp directories.
CLAUDE.mdwith concise guidance for development, testing, architecture, build system, key controllers, configuration, and multi-chain/Snaps support..gitignoreto ignoreCLAUDE.mdandtemp/directories to prevent accidental commits of Claude AI development files.Written by Cursor Bugbot for commit 0d6a498. This will update automatically on new commits. Configure here.