agent-wallet
できること
このスキルは、AIエージェントのための暗号資産ウォレットを設定します。そのルールは、管理者だけが変更できます。すべての支出は、署名の前にコードによってポリシーファイルと照合されるため、エージェントが操作されてもルールは守られます。
使う場面
- ✓エージェントに、自分で設定した上限の範囲内で、自分のウォレットから支払わせたいとき。
- ✓悪意のあるメッセージでエージェントがだまされても安全なウォレットが必要なとき。
- ✓エージェントの支出に、許可されたアドレスのリストや緊急停止スイッチがほしいとき。
スキルのリンク
https://github.com/internet-court/internet-court-skill/blob/main/vendored/chaingpt/agent-wallet/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“エージェントに独自のウォレットを与えたいのですが、送金は私が承認したアドレスだけに限りたいです。”
毎週5つの新しいスキル。1分で読めます。
仕組み
管理者は、暗号化されたウォレットと、許可されたアドレスや最大額などのルールを含むポリシーファイルを作ります。エージェントが送金しようとするたびに、ツールはコードでポリシーを確認し、どれか一つでも規則に反すれば拒否します。エージェントには、ポリシーを編集するツールがありません。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
ChainGPT Agent Wallet Skill
The agent has its own EOA wallet on every EVM chain it supports. The admin (you, in your shell) sets policies that the agent cannot violate or revoke — even if a malicious prompt convinces the LLM to try.
Threat model
The attacker's goal: prompt-inject the agent to drain its wallet to an attacker address.
The plugin's defense: the policy check is in code, not in the LLM's prompt. Every chaingpt_agent_wallet_sign_and_send call:
- Loads the policy file fresh from disk (no caching — admin can update mid-session).
- Runs
checkPolicy(intent)— pure deterministic code that doesn't see the LLM's context. - Refuses if any rule fails, with a clear reason the agent surfaces back to the user.
The attacker can convince the LLM to call sign_and_send(to=attacker, value=ALL) — but the tool layer refuses because attacker isn't in allowedToAddresses or value exceeds maxTxValueWei or killSwitch=true. The trust boundary is the tool code, not the LLM.
There is no MCP tool that writes the policy file. The admin edits it directly with a text editor. There is no MCP tool that reads or sets the passphrase. The passphrase lives only in the shell env var or the OS keychain — never in the keystore file, never in the LLM's context.
Setup (admin steps — done once)
The keystore passphrase resolves in this priority order:
CHAINGPT_AGENT_WALLET_PASSPHRASEenv var — explicit override. Best for CI / headless / power users who want zero process-list and zero keychain exposure.- OS keychain — auto-managed. On macOS (Keychain via
security) or Linux (libsecret viasecret-tool), if no env var is set,chaingpt_agent_wallet_initgenerates a strong 256-bit passphrase and stores it in the keychain. You never type or remember it; the MCP server reads it back on each load.
Option A — zero-setup (macOS / Linux with a keychain) — recommended for most
# Just init — a strong passphrase is generated + stored in your OS keychain.
claude
> initialize the agent wallet
The init output tells you it used the keychain and how to export the passphrase for backup.
Option B — explicit env var (CI / headless / max control)
# Set a strong passphrase BEFORE starting the MCP server (>= 16 chars)
export CHAINGPT_AGENT_WALLET_PASSPHRASE="your-strong-passphrase-here-min-16-chars"
claude
> initialize the agent wallet
Back up the passphrase either way. Keychain entry:
service=chaingpt-mcp-agent-wallet account=keystore-passphrase. Export on macOS withsecurity find-generic-password -s chaingpt-mcp-agent-wallet -a keystore-passphrase -w. Lose it (and any backup) → the keystore is unrecoverable. There is no recovery path.
Security tradeoff of the keychain option: the secret stays out of plaintext-on-disk and out of the LLM context, but the keychain is unlocked while you're logged in — a local attacker on an unlocked session could read it. That's a much higher bar than a plaintext file and appropriate for a low-value bounded hot wallet. For zero local exposure, use Option B.
This creates two files:
| File | Contents | Who edits it |
|---|---|---|
~/.chaingpt-mcp/agent-wallet/keystore.json |
AES-256-GCM encrypted private key | Generated once by the init tool. Never edit by hand. Back it up. |
~/.chaingpt-mcp/agent-wallet/policy.json |
Plain JSON rules | You, the admin, with a text editor. The agent has NO tool that writes this file. |
Both default to ~/.chaingpt-mcp/agent-wallet/ but can be overridden via CHAINGPT_KEYSTORE_FILE and CHAINGPT_AGENT_POLICY_FILE.
Tools
| Tool | Mutates state? | Notes |
|---|---|---|
chaingpt_agent_wallet_init |
Creates keystore | One-shot. Refuses if file exists. |
chaingpt_agent_wallet_address |
No | Returns the agent's EOA address. Use this to receive funds. |
chaingpt_agent_wallet_status |
No | Address + policy digest + kill-switch state. Run this before any signing. |
chaingpt_agent_wallet_balances |
No | Native-coin balances across requested chains. |
chaingpt_agent_wallet_policy |
No (read-only) | Shows the current policy JSON. Cannot modify it. |
chaingpt_agent_wallet_sign_and_send |
Signs + broadcasts a tx | The only tool that can move funds. Gated by policy. |
chaingpt_agent_wallet_serve_ui |
Starts a local HTTP server | Dashboard on http://127.0.0.1:8787. Read-only view. |
Policy file format
Default policy.json (lazily
よくある質問
エージェントは自分の支出ルールを変えられますか?
いいえ。ポリシーファイルを書くツールがエージェントにはなく、編集できるのは管理者だけです。
ウォレットのパスワードはどこに保存されますか?
ウォレットのファイルではなく、シェルの環境変数またはOSのキーチェーンに保存されます。
支払いがルールに反したらどうなりますか?
ツールは署名を拒否し、エージェントがあなたに伝えられる理由を返します。
詳細
作者による元の説明
Give the AI agent its own EVM wallet with admin-controlled policies the agent CANNOT bypass even under prompt injection. Encrypted keystore (AES-256-GCM, scrypt KDF), policy file the agent has no tool to write, deterministic policy gate on every signing operation, optional local HTTP dashboard. Triggers: agent wallet, give the agent a wallet, agent address, fund the agent, agent autonomy, policy gate, kill switch, agent permissions, bounded autonomy, ERC-4337 alternative, session-key alternative.
人気
- GitHubのスター
- 7.0k
- ランキング
- #13620
- ライセンス
- —
- 更新日
- 2026/10/26
コメント
- …
このリポジトリの他のスキル
internet-court
7.0kエージェントが、他のAIエージェントや有料サービスと安全に支払い、雇用、取引できるよう支援し、適切な専門ガイドを案内します。
genlayer-erc7710-connector
7.0kエージェントが、AIによるレビューの結果を権限の仕組みにつなぎ、悪いレビューがエージェントの権限を制限または取り消せるよう支援します。
genlayer-intelligent-contracts
7.0kエージェントが、別のエージェントが委任された範囲を守ったかを判定するAIの審査役について、ルール、証拠、出力を定義できるよう支援します。
x402-erc7710
7.0kエージェントが、リクエストごとにウェブサービスの支払いを行い、許可された予算の範囲内で継続的な支出を設定できるよう支援します。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。