-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,108 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # CLAUDE.md | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## Common Development Commands | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Building | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - `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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+9
to
+35
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ## High-Level Architecture | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ### Core Structure | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **`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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+40
to
+58
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - **`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 |
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.
Bug: Contradictory File Tracking and Redundant .gitignore Entries
The commit adds CLAUDE.md to the repository but also adds it to .gitignore. This creates a contradiction where the file is tracked now, but future changes won't be, which goes against the PR's stated intent to prevent accidental commits of these files. Additionally, the .gitignore entries for CLAUDE.md and temp/ are redundant.
Additional Locations (1)
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. |
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.
Bug: Tracked File Contradicts Gitignore
The
CLAUDE.mdfile is committed in this change but also added to.gitignore. This creates a contradiction: the file is tracked now, but Git will ignore future changes. This suggestsCLAUDE.mdis intended to be a tracked file, like documentation.