agentleFS
hec-ovihec-ovi/blockchain-skill/SKILL.md

agent-wallet

Skill2 starsChanged 4 months agoMITView on GitHub

Operate a non-custodial blockchain wallet on-chain (EVM and Bitcoin), no exchange or MetaMask. Create or import a wallet, balances, send native/ERC-20/BTC, swap tokens, compile/deploy/call Solidity. Trigger on wallet, crypto, ETH, BTC, ERC-20, token, send, transfer, swap, trade, Solidity, contract, on-chain, testnet, mainnet, sepolia.

  • Reads credentials

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. ChainGPT-org/chaingpt-claude-skill★ 7same name
    2. 1Shot-API/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 2 are distinctive, and 15 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 15

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read data.ready, data.nextActions, data.notes.

    line 29
  2. Very specific:

    If a .env at the project root already has AGENT_WALLET_PASSPHRASE, use it (CLI auto-loads .env).

    line 33
  3. Very specific:

    Run verbs from anywhere in the project: .env is found by walking up, so a scratch subdirectory is fine.

    line 35
  4. Very specific:

    Amounts: never invent vague sizes ("tiny", "a bit").

    line 58
  5. Very specific:

    Never call an unknown contract before contract-learn.

    line 125
  6. Very specific:

    Never skip agent-wallet init on first use in a session.

    line 139
  7. Very specific:

    Never re-bootstrap (curl/clone) when dist/agent-wallet.mjs is already in the skill pack.

    line 140
  8. Distinctive:

    Never default to mainnet silently.

    line 141
  9. Very specific:

    Never put the passphrase in chat, and never inline it on a command line (AGENT_WALLET_PASSPHRASE=...

    line 142
  10. Very specific:

    Never put a mnemonic on a command line.

    line 143
  11. Very specific:

    Never invent a new passphrase after wallet-create.

    line 144
  12. Very specific:

    Never brute-force after PASSPHRASE_WRONG.

    line 145
  13. Very specific:

    Never balance with a wallet name.

    line 146
  14. Very specific:

    Never swap when the user asked to transfer to someone.

    line 147
  15. Very specific:

    Never send when they asked to convert A→B for themselves.

    line 148
  16. Distinctive:

    Never execute a stale swap quote.

    line 150
  17. Very specific:

    Never call an unknown contract before contract-learn.

    line 151

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

agent-wallet

Instructions only. Every action is the agent-wallet CLI: one process, JSON envelope {ok, data, error, meta} on stdout, then exit. On ok:false follow error.hint. Keys stay local (keystore v3). No custodial middleman.

Start here

Node >= 22.18. Skill packs ship dist/agent-wallet.mjs (no npm install).

Resolve CLI once (first hit wins; reuse it):

command -v agent-wallet
test -x .noob/skills/agent-wallet/agent-wallet && echo .noob/skills/agent-wallet/agent-wallet
test -f .noob/skills/agent-wallet/dist/agent-wallet.mjs && echo "node .noob/skills/agent-wallet/dist/agent-wallet.mjs"
test -x ./agent-wallet && echo ./agent-wallet

Init once per session:

agent-wallet init

Read data.ready, data.nextActions, data.notes. Do not hand-probe the install.

Passphrase (signing verbs). Do this once, then stop touching it:

  1. If a .env at the project root already has AGENT_WALLET_PASSPHRASE, use it (CLI auto-loads .env). Do not invent another.
  2. Else create .env once with AGENT_WALLET_PASSPHRASE=<random >=8 chars> and AGENT_WALLET_HOME=./.agent-wallet-data (or keep default home). Never print the passphrase in chat.
  3. Run verbs from anywhere in the project: .env is found by walking up, so a scratch subdirectory is fine.
  4. On PASSPHRASE_WRONG: stop. Do not brute-force, dump keystore JSON, or reverse-engineer the bundle.

Fund testnets by receiving from an external wallet or a public testnet drip site. This toolkit does not drip gas.

When to use which

IntentVerb
Session ready?init
New / restore walletwallet-create / wallet-import
Receive addresswallet-addresses
Export key / backup secretswallet-export (prefer --out)
Balance / fees / tx / UTXOsbalance / fees / tx / utxos
Pay someone (native, ERC-20, BTC)send
Same-chain token A → Bswap-quote then swap (sell WETH not bare ETH; wrap first if needed)
ETH ↔ WETHwrap / unwrap
Unknown contractcontract-learn then call/write
Deploycontract-compile then contract-deploy
Chain meta / RPC alivechain-resolve / chain-check

send = transfer to an address. swap = convert tokens for yourself. Never default to mainnet silently; ask which network; state it in answers.

Amounts: never invent vague sizes ("tiny", "a bit"). Use an explicit number the user gave, or pick a concrete value and state it (e.g. 0.00001 ETH display, or raw base units for swap). Leave gas headroom on the balance.

Use this CLI only for wallet/chain ops. Do not quote swaps via random web APIs (0x, Uniswap web, curl to aggregators). swap-quote / swap on the CLI are the path.

Commands

Examples use agent-wallet; substitute your resolved CLI. Chain = name (sepolia, base, ethereum) or id. One mnemonic → same EVM address on every EVM chain.

Wallet

agent-wallet wallet-create --name main
agent-wallet wallet-import --name main --mnemonic-file ./backup.json   # or --mnemonic - to read stdin
agent-wallet wallet-list
agent-wallet wallet-addresses --name main --family evm
agent-wallet wallet-addresses --name main --family btc --network signet
# secrets: prefer file (0600); only when the user asks
agent-wallet wallet-export --name main --family evm --out ./wallet-export.json
agent-wallet wallet-export --name main --family evm --include-mnemonic --out ./wallet-full.json

Mnemonic is shown ONCE at create; tell the user to back it up; the keystore cannot recover it without the passphrase. wallet-export returns address + private key (and optional mnemonic). Prefer --out <file> so secrets go to a mode-0600 file; hand the user that file or its contents only if they asked. Never export unprompted.

Read

agent-wallet balance <chain> <address> [--token 0x..]
agent-wallet fees <chain>
agent-wallet utxos <btc-network> <address>
agent-wallet tx <chain> <hash>
agent-wallet chain-resolve <chain>
agent-wallet chain-check <chain>

balance needs the address, not a wallet name. Resolve via wallet-addresses first if needed.

Send

agent-wallet send <chain> --to 0x.. --amount 0.01 --wallet main --wait
agent-wallet send <chain> --to 0x.. --amount 10 --token 0xTOKEN --wallet main --wait
agent-wallet send signet --to tb1p.. --amount-raw all --wallet main

--amount = display units (ETH/token/BTC). --amount-raw = wei/token-raw/sats (all = BTC sweep). EVM --wait waits for receipt; BTC returns txid (poll tx).

Swap / wrap (base units for swap sell amount)

agent-wallet wrap <chain> --amount 0.0001 --wallet main --wait
agent-wallet unwrap <chain> --amount 0.0001 --wallet main --wait
agent-wallet swap-quote <chain> --sell 0xWETH --buy 0xTOKEN --amount <raw> --from 0xYOU
agent-wallet swap <chain> --sell 0xWETH --buy 0xTOKEN --amount <raw> --wallet main --wait

Quote first with an exact raw amount. Do not sell bare native: wrap then sell WETH. Prefer CoW where liquid; Uniswap works on Sepolia when pools exist; Kyber on mainnets. Optional --adapter cow|kyber|uniswap, --slippage 50 (bps). Re-quote if stale.

Contracts

agent-wallet contract-learn <chain> <address>
agent-wallet contract-compile --source ./X.sol --name X
agent-wallet contract-deploy <chain> --source ./X.sol --name X --args "a,b" --wallet main
agent-wallet contract-call <chain> <addr> --fn name --args a,b --abi ./abi.json
agent-wallet contract-write <chain> <addr> --fn name --args a,b --abi ./abi.json --wallet main --wait

Never call an unknown contract before contract-learn; check verified. Use deploy/learn ABI for call/write. View → call; state change → write.

Authoring or auditing Solidity is a different job. Use the agent-solidity skill and start with agent-wallet contract-step: a gated walk (spec, threat model, design, implement, in-process EVM proof, audit, deploy) plus sandbox-run, a real EVM with no node and no funds. Do not hand-write and deploy a contract from this skill alone.

Safety

Gate is deterministic code before sign/broadcast. It cannot be talked out of a decision. Prompt text is not enforcement.

  • Mainnet and testnets are allowed by default. To lock mainnets: {"gate":{"allowMainnet":false}} in ~/.agent-wallet/config.json (optional allowedChains, caps).
  • Gated: send, swap, wrap, unwrap, contract-deploy, contract-write. Reads and quotes are not.
  • Keys: keystore/<name>.json Web3 v3 scrypt; passphrase never logged.

Anti-patterns

  • Never skip agent-wallet init on first use in a session.
  • Never re-bootstrap (curl/clone) when dist/agent-wallet.mjs is already in the skill pack.
  • Never default to mainnet silently; ask the network first.
  • Never put the passphrase in chat, and never inline it on a command line (AGENT_WALLET_PASSPHRASE=... agent-wallet ...): it lands in transcripts and shell history. The CLI loads .env from the project root by itself, from any subdirectory. Write it once, then never type it again.
  • Never put a mnemonic on a command line; wallet-import --mnemonic-file <path> or --mnemonic - keeps it out of shell history. Never echo a mnemonic or private key back to the user unless they asked for it.
  • Never invent a new passphrase after wallet-create; one .env for the session/workspace.
  • Never brute-force after PASSPHRASE_WRONG; never cat keystore files to recover secrets.
  • Never balance with a wallet name; always an address.
  • Never swap when the user asked to transfer to someone; use send (--token if ERC-20).
  • Never send when they asked to convert A→B for themselves; use swap.
  • On GATE_DENIED, fix config.json (mainnet was locked by the user) or use an allowed chain.
  • Never execute a stale swap quote; re-quote.
  • Never call an unknown contract before contract-learn.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.