Skills agent-wallet
Single-source wallet skill for generate, import, get-balance, and send flows using local wallet files plus executable Node scripts. Use when the user asks for wallet creation, recovery, balance checks, 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/openclaw-skills-agent-wallet-fdcd9f && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/beardkoda/ai-agent-wallet" ~/.openclaw/skills/openclaw-skills-agent-wallet-fdcd9f && 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]
:sendnode scripts/send.js --to=0x... --amount=<native-amount> --confirm=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
Routing Logic
- Identify user intent:
- create/recover/import wallet ->
orgenerate-walletimport-wallet - check native/token balance ->
get-balance - 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...]
->sendnode scripts/send.js --to=0x... --amount=<native-amount> --confirm=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
native amount (required)--amount
(required to broadcast)--confirm=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 and positive amount.
- Precheck sender balance before send.
- Require explicit broadcast confirmation; require double confirmation for mainnet.
- Return tx hash on success.
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
|balancesend
: 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