一键导入
smart-accounts-kit
Build dApps with MetaMask Smart Accounts Kit — ERC-4337 smart accounts, delegations, and Advanced Permissions (ERC-7715)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Build dApps with MetaMask Smart Accounts Kit — ERC-4337 smart accounts, delegations, and Advanced Permissions (ERC-7715)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
E2E testing guidelines
Add a new EVM network to the @metamask/bridge-controller package in the MetaMask/core monorepo. Use when a task asks to register an EVM chain for Swaps or Bridge, extend ALLOWED_BRIDGE_CHAIN_IDS or DEFAULT_CHAIN_RANKING, add bridge chain constants and display names, define the chain's default swaps token, or expose a new bridge ChainId enum member.
Add a new EVM network to the unified Swaps and Bridge flow in MetaMask/metamask-mobile. Use when a task asks to consume a newly supported bridge-controller chain, add a Mobile bridge network label, configure its default destination token or stablecoin slippage, update bridgeConfigV2 rollout requirements, or validate that a new EVM network appears in Mobile's source and destination network pickers.
Wire a new or existing controller — whether imported from a `@metamask/*-controller` npm package or defined locally in the repo — into the MetaMask Mobile Engine or the MetaMask Extension background. Use this skill when: adding a controller to Engine or to the extension's messenger-client init, creating a controller init function or messenger, delegating actions/events between controllers, adding a controller to EngineState/Engine.context or to MESSENGER_FACTORIES and the MessengerClient union, or debugging a controller whose state never reaches Redux/the UI or resets on restart.
Detect, prevent, and fix flaky Jest unit tests in MetaMask Mobile before they reach CI. Use this skill when: reviewing a PR diff or changed test files for flakiness risk, fixing an intermittently failing Jest test, reproducing a flaky test locally, or auditing GitHub Actions history to rank historically flaky unit tests by failure rate.
Interactively break a perps product requirement into split, dispatch-ready technical tickets across MetaMask Core, its release, Mobile, and Extension. Use when a product manager (or a codebase-aware Claude acting for one) has a perps bug or feature and needs engineering-grade tickets, correctly routed now that @metamask/perps-controller is the Core source of truth. Triages where the change actually lives, emits only the applicable layer tickets with dependency links, and enforces token-efficient, signal-over-noise tickets agents can act on directly.
| name | smart-accounts-kit |
| description | Build dApps with MetaMask Smart Accounts Kit — ERC-4337 smart accounts, delegations, and Advanced Permissions (ERC-7715) |
npm install @metamask/smart-accounts-kit permissionless
| Name | Usage |
|---|---|
| Hybrid | A flexible account with EOA, wallet client, and passkey (WebAuthn) signers. The most flexible option for standard dApp users. |
| MultiSig | Requires multiple signers to meet a threshold before transactions execute. Best for treasury, DAO, or shared custody use cases. |
| Stateless7702 | Upgrades an existing EOA to a smart account using EIP-7702 while keeping the same address. Best for users with existing embedded EOAs. |
If the user hasn't specified which implementation they need, present the options.
| Name | Usage |
|---|---|
| Delegations (ERC-7710) | You create, sign, and manage delegations programmatically. The delegator is a smart account you control. You handle the full lifecycle: creation, signing, storage, and redemption. |
| Advanced Permissions (ERC-7715) | You request permissions from a MetaMask user through a human-readable UI in the extension. MetaMask creates and enforces the delegations internally. The user can review and adjust parameters before approving. |
Advanced Permissions use delegations under the hood — ERC-7715 creates ERC-7710 delegations internally. If the user hasn't specified which to use, present the options.
| Use case | Reference | Workflows |
|---|---|---|
| Create a smart account | toMetaMaskSmartAccount | Create hybrid account, Create multisig account, Create 7702 account |
| Create a delegation | createDelegation | Create delegation, Create redelegation |
| Request ERC-7715 permissions | requestExecutionPermissions | Request permissions, Redeem — smart account, Redeem — EOA |
| Use case | Workflow |
|---|---|
| Create a Hybrid smart account | Create hybrid account |
| Create a MultiSig smart account | Create multisig account |
| Create a Stateless7702 smart account | Create 7702 account |
| Create and sign a delegation | Create delegation |
| Create a delegation chain (redelegation) | Create redelegation |
| Redeem a delegation when the delegate is a smart account | Redeem delegation — smart account |
| Redeem a delegation when the delegate is an EOA | Redeem delegation — EOA |
| Request ERC-7715 Advanced Permissions | Request permissions |
| Redelegate an ERC-7715 permission context | Create redelegation for permissions |
| Redeem ERC-7715 permissions when the session account is a smart account | Redeem permissions — smart account |
| Redeem ERC-7715 permissions when the session account is an EOA | Redeem permissions — EOA |
valueLte to allow it.@metamask/smart-accounts-kit