smart-accounts-kit
できること
このスキルは、dAppがスマートアカウントを作成し、まとめたユーザーオペレーションを送り、範囲を絞った権限を要求できるようにする、MetaMask Smart Accounts Kitを扱います。三種類のアカウントと、委任の仕組みを説明し、ウォレットの機能を作る開発者向けです。
使う場面
- ✓ユーザーが、柔軟な署名の選択肢を持つスマートアカウントを使えるようにしたいとき。
- ✓バックエンドのボットが、委任を使ってユーザーの代わりに動くようにしたいとき。
- ✓MetaMaskの拡張機能に、範囲を絞った権限を要求したいとき。
スキルのリンク
https://github.com/internet-court/internet-court-skill/blob/main/vendored/metamask/smart-accounts-kit/skill.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のdAppがMetaMaskに、ボットがユーザーの代わりに動くための限定された権限を要求するようにしたいです。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、あなたのアプリに合うアカウントの種類を選び、署名者を設定し、キットを使って委任を作成、署名、引き換えたり、権限を要求したりします。ペイマスターを通じて、ガススポンサーシップを設定することもできます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
MetaMask Smart Accounts Kit
When to use
- You want to create ERC-4337 smart accounts (Hybrid, MultiSig, or Stateless7702)
- You want to send user operations or batch transactions via bundlers
- You want to configure signers (EOA, passkey/WebAuthn, multisig, wallet client)
- You want to implement gas abstraction with paymasters
- You want to create, sign, or redeem delegations (ERC-7710)
- You want to request Advanced Permissions via MetaMask extension (ERC-7715)
- You want to build automated backend services (DCA bots, keeper services) using delegations
- You want to implement session accounts for AI agents or automated trading
- You want to set up parallel user operations with nonce keys
Installation
npm install @metamask/smart-accounts-kit permissionless
Which smart account type to use
| 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.
Delegations vs Advanced Permissions
| 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.
API references
| 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 |
Workflows
| 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 |
Important notes
- Always use caveats — never create unrestricted delegations.
- Deploy the delegator first — the account must be deployed before redeeming delegations.
- Function call scope defaults to
よくある質問
ほとんどのdAppのユーザーにはどのアカウントの種類が合いますか?
EOA、ウォレットのクライアント、パスキーの署名者に対応し、最も柔軟だとされるHybridアカウントです。
MultiSigアカウントは何のためのものですか?
承認に複数の署名者を必要とするもので、金庫、DAO、共有管理のユースケースに合います。
Stateless7702とは何ですか?
既存のウォレットを、同じアドレスを保ったままスマートアカウントにアップグレードするものです。
詳細
作者による元の説明
Build dApps with MetaMask Smart Accounts Kit — ERC-4337 smart accounts, delegations, and Advanced Permissions (ERC-7715)
人気
- GitHubのスター
- 7.0k
- ランキング
- #13642
- ライセンス
- —
- 更新日
- 2026/10/26
コメント
- …
このリポジトリの他のスキル
internet-court
7.0kエージェントが、他のAIエージェントや有料サービスと安全に支払い、雇用、取引できるよう支援し、適切な専門ガイドを案内します。
genlayer-erc7710-connector
7.0kエージェントが、AIによるレビューの結果を権限の仕組みにつなぎ、悪いレビューがエージェントの権限を制限または取り消せるよう支援します。
genlayer-intelligent-contracts
7.0kエージェントが、別のエージェントが委任された範囲を守ったかを判定するAIの審査役について、ルール、証拠、出力を定義できるよう支援します。
x402-erc7710
7.0kエージェントが、リクエストごとにウェブサービスの支払いを行い、許可された予算の範囲内で継続的な支出を設定できるよう支援します。
似ているスキル
api-connector-builder
280kエージェントが既存のパターンに従って、新しいAPI連携を構築します。新しい方式を作らずに、もう一つ連携を追加したいときに使います。
api-design
280kエージェントがベストプラクティスに沿ってREST APIを設計できるようにします。APIの通信方法、エラーの表示方法、データの整理方法を決めるのに役立ちます。
backend-patterns
280kエージェントのサーバーサイドのアーキテクチャパターンとデータベースの最適化を支援します。サーバー上で動くコードを作成またはレビューするときに役立ちます。