Skills agent-wallet
Single-source wallet skill for generate, import, get-balance, sign, and send flows using local wallet files plus executable Node scripts. Use when the user asks for wallet creation, recovery, balance checks, message signing, or transaction sending.
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/beardkoda/ai-agent-wallet" ~/.claude/skills/clawdbot-skills-agent-wallet-992a49 && rm -rf "$T"
manifest:
skills/beardkoda/ai-agent-wallet/SKILL.mdsource content
Agent Wallet Skill
Changelog:
CHANGELOG.md
Purpose
Use this file as the only wallet skill entrypoint for local wallet workflows.
Runtime Requirements
- Runtime: Node.js 18+
- Required package:
viem - Required secret key:
(used for local secret encryption/decryption)WALLET_SECRET_KEY - Wallet signer file:
wallet/signer.json - Network config file:
wallet/config.json
Executable Scripts
Run these scripts from
agent-wallet-skills for each action:
:generate-walletnode scripts/generate-wallet.js --method=<private-key|seed-phrase> [--overwrite=true]
:import-wallet
ornode scripts/import-wallet.js --seedPhrase="<words>" [--overwrite=true]--privateKey=0x...
:get-balancenode scripts/get-balance.js --address=0x... [--tokenAddress=0x...] [--decimals=18] [--symbol=TOKEN]
:sign-messagesnode scripts/sign-messages.js --message="hello from wallet"
(native):sendnode scripts/send.js --to=0x... --amount=<native-amount> --confirm=true [--confirmMainnet=true]
(token):sendnode scripts/send.js --to=0x... --amount=<token-amount> --tokenAddress=0x... [--decimals=18] [--symbol=TOKEN] --confirm=true [--confirmMainnet=true]
Notes:
- Wallet material is stored in
as encrypted fields only.wallet/signer.json - Default network is loaded from
with shapewallet/config.json
.[{ rpc_url, chain_id, current }]
requires explicitsend.js
.--confirm=true- Mainnet broadcasts require an additional
.--confirmMainnet=true
Routing Logic
- Identify user intent:
- create/recover/import wallet ->
orgenerate-walletimport-wallet - check native/token balance ->
get-balance - sign arbitrary payload/message ->
sign-messages - transfer/broadcast transaction ->
send
- create/recover/import wallet ->
- Precheck
for read/write chain operations (wallet/config.json
,get-balance
, and any network-aware generation flow):send- require array format
[{ rpc_url, chain_id, current }] - require exactly one entry with
current: true - require non-empty
andrpc_url
on the current entrychain_id - if invalid, stop and ask user to set defaults first
- require array format
- Execute the script mapped to the action:
->generate-walletnode scripts/generate-wallet.js --method=<private-key|seed-phrase>
->import-wallet
ornode scripts/import-wallet.js --seedPhrase="<words>"--privateKey=0x...
->get-balancenode scripts/get-balance.js --address=0x... [--tokenAddress=0x...]
->sign-messagesnode scripts/sign-messages.js --message="hello from wallet"
(native) ->sendnode scripts/send.js --to=0x... --amount=<native-amount> --confirm=true [--confirmMainnet=true]
(token) ->sendnode scripts/send.js --to=0x... --amount=<token-amount> --tokenAddress=0x... [--decimals=18] [--symbol=TOKEN] --confirm=true [--confirmMainnet=true]
- If
already exists and user asks to regenerate/import over it, require explicit confirmation first.wallet/signer.json - If intent is unclear, ask one focused question:
- "Do you want to generate/import a wallet, check balance, or send a transaction?"
- If a script fails, return the error with corrected input guidance.
Generate / Import Workflow
Inputs:
- Seed phrase (12/24 words), or private key (
prefixed or raw hex), or generation request0x - Optional
when replacing existing--overwrite=truewallet/signer.json
Rules:
- Default generation method is
unless user requests mnemonic.private-key - Do not overwrite existing signer file unless user requested it and confirmed.
- Validate private key as 64 hex chars (after optional
removal).0x - Validate seed phrase word count and normalize whitespace.
- Derive address before persisting.
- Encrypt signer secrets before writing to disk.
- Never print full seed phrase/private key in normal responses.
Expected
wallet/signer.json structure:
{ "method": "seed_phrase", "address": "0x...", "encryptedSeedPhrase": "<encrypted-secret>", "encryptedPrivateKey": null, "createdAt": "2026-04-13T00:00:00.000Z", "updatedAt": "2026-04-13T00:00:00.000Z" }
Balance Workflow
Inputs:
(required)--address
(optional for ERC-20 mode)--tokenAddress- optional
and--decimals--symbol
Rules:
- Always validate
andaddress
(when provided).tokenAddress - Always require a valid current network in
.wallet/config.json - Native mode: query
and return raw + formatted values.getBalance - Token mode: query
; readbalanceOf
/decimals
when possible, otherwise fall back to defaults.symbol
Send Workflow
Inputs:
recipient (required)--to
amount to transfer (required)--amount
(optional for ERC-20 mode)--tokenAddress- optional
and--decimals
(token mode only)--symbol
(required to broadcast)--confirm=true
(required on mainnet chain IDs)--confirmMainnet=true
Rules:
- Load signer from
(wallet/signer.json
orseed_phrase
).private_key - Decrypt signer material with
before deriving account.WALLET_SECRET_KEY - Require valid current network in
.wallet/config.json - Validate recipient address,
(when provided), and positive amount.tokenAddress - Native mode: precheck native balance and send via value transfer.
- Token mode: resolve token decimals/symbol, precheck
, then call ERC-20balanceOf
.transfer - Require explicit broadcast confirmation; require double confirmation for mainnet (
).--confirmMainnet=true - Return tx hash on success, and include transfer mode (
ornative
).token
Sign Workflow
Inputs:
(required)--message
Rules:
- Load signer from
(wallet/signer.json
orseed_phrase
).private_key - Decrypt signer material with
before deriving account.WALLET_SECRET_KEY - Require non-empty message content.
- Return deterministic signature and signer address; do not broadcast or require chain config.
Shared Safety Rules
- Never expose full seed phrases/private keys in chat, logs, or summaries.
- Never store plaintext signer secrets in
.wallet/signer.json - Keep wallet files local (
,wallet/signer.json
).wallet/config.json - Default to non-broadcast/read-only behavior unless user explicitly asks to send.
- If chain is unspecified, prefer a testnet and state the selection.
- On failure, return actionable correction steps and do not continue automatically.
Failure Handling
- Invalid mnemonic/private key -> stop and request corrected input.
- Missing/invalid
-> request generate/import first.wallet/signer.json - Missing/invalid
-> request default network setup first.wallet/config.json - Multiple or zero
entries -> stop and request normalization.current: true - Insufficient balance for transfer -> return required vs available values.
- RPC timeout/network errors -> retry once, then ask for alternate RPC.
Completion Requirements
Before finishing:
- confirm action executed (
,generate
,import
,balance
)send - confirm secret material was not exposed in plain text
- confirm chain and wallet address used (when applicable)
- provide one next action (backup, verify balance, or track transaction)
Standard Response Contract
Return this structure across all actions:
:action
|generate
|import
|balance
|signsend
: chain id/name used, orchain
for offline-only generation/importnone
: active wallet or queried addressaddress
: transaction hash when available, elsetxHashnull
:status
|success
|failedneeds_confirmation
: one clear follow-up actionnext_step