agentleFS
1Shot-API1Shot-API/skills/agent-wallet/SKILL.md

agent-wallet

Skill1 starsChanged 7 days agoMITView on GitHub

Create and use a local agent EOA with encrypted JSON keystores (ethers/Node by default; Foundry cast optional) — sign personal_sign / typed data / tx hashes, send transactions, and build or sign EIP-7710 delegations (including redelegation and EIP-7702 auth) without printing private keys, mnemonics, or passwords into chat context. Use when an agent needs its own wallet, agent private key storage, non-interactive casting, or MetaMask Smart Accounts Kit delegations from a headless environment. Also use when an agent needs an address for a CoinOperated (or other product) funding/registration deeplink after create — product URL shape lives in the consuming skill (e.g. coinoperated). Also use when signing EIP-7702 auth or EIP-7710 root/redelegations that will be submitted via the public-relayer skill (relayer_estimate7710Transaction / relayer_send7710Transaction, including batched executions and multichain).

  • Installs packages

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. hec-ovi/blockchain-skill★ 2same 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.

  • In this repository9 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 1 is distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

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

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

    If depsOk is false → cd scripts && npm install (path in depsInstallHint).

    line 56
  2. Very specific:

    If cast is null → fine for create/SIWE/auth7702/redelegate.

    line 57
  3. Distinctive:

    Create a wallet (idempotent.

    line 59
  4. Very specific:

    Prefer aw over raw cast wallet new / cast wallet private-key (those leak keys to stdout).

    line 66
  5. Very specific:

    Run from the skill root, or with an absolute path to scripts/aw.mjs.

    line 70
  6. Very specific:

    Every command supports --help.

    line 89
  7. Very specific:

    First tx on a chain: always run auth7702 and include authorizationList until the EOA has Stateless7702 code.

    line 118
  8. Very specific:

    Multichain: run auth7702 / redelegate (or delegation-sign) per chain as needed, then relayer_estimate7710TransactionMultichain / …

    line 122
  9. Very specific:

    Run doctor before first use.

    line 133
  10. Very specific:

    After create, tell the user the address only — never open or dump the password file or keystore JSON into chat.

    line 134
  11. Very specific:

    Do not run cast wallet private-key, cast wallet new without --unsafe-password, or interactive password prompts.

    line 135
  12. Very specific:

    Treat stdout as the only success channel.

    line 137

≈ “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 (keystore CLI)

Product-agnostic skill for coding agents that need a local EOA and optional EIP-7710 delegations. Keys live in encrypted JSON keystores under ~/.agent-wallet/ (or AGENT_WALLET_HOME). The CLI never prints private keys, mnemonics, or passwords — only JSON results on stdout.

These scripts reduce accidental key leakage into model context. Anyone or any process with filesystem access to the keystore + password file can still use the key. The sandbox / host filesystem is the trust boundary — see references/security.md.

Install this skill

Claude Code / Cursor (user-level, ~/.claude/skills is read by both):

npx skills add 1Shot-API/skills/agent-wallet -g -a claude-code -y
cd ~/.claude/skills/agent-wallet/scripts && npm install

Any agent / cloud sandbox:

git clone --depth 1 https://github.com/1Shot-API/skills.git
cd skills/agent-wallet/scripts && npm install

npm install pulls @metamask/smart-accounts-kit ^2.0.0, viem, and ethers (~seconds). That is enough for create, address, sign-personal, sign-hash, auth7702, and delegation-*/redelegate.

Foundry cast is optional for the CoinOperated / public-relayer path. It is still required for send, mktx, and sign-typed. Avoid foundryup in tiny cloud snapshots when you only need EIP-7710 signing (~294 MB of forge/cast/anvil binaries).

First run

node scripts/aw.mjs doctor
  • If depsOk is false → cd scripts && npm install (path in depsInstallHint).
  • If cast is null → fine for create/SIWE/auth7702/redelegate; foundryHint lists commands that still need cast.

Create a wallet (idempotent; show the user address only):

node scripts/aw.mjs create
# → {"ok":true,"address":"0x…","name":"agent",…}

Prefer aw over raw cast wallet new / cast wallet private-key (those leak keys to stdout).

Command cheat sheet

Run from the skill root, or with an absolute path to scripts/aw.mjs.

CommandPurposeSuccess stdoutNeeds cast?
doctorcast / node / wallet / depsstatus objectno
create [--name] [--force]encrypted keystore + password file{ address, name, keystorePath, storageTier }no (ethers)
address [--name]resolve address{ address }no
sign-personal --message …EIP-191{ signature }no (viem fallback)
sign-hash --hash 0x…raw 32-byte hash{ signature }no (viem fallback)
sign-typed --file typed.jsonEIP-712{ signature }yes
send --rpc … --to …broadcast{ txHash }yes
mktx …signed raw tx, no broadcast{ rawTransaction }yes
auth7702 --rpc … --chain-id NEIP-7702 Stateless7702 auth{ authorization, … }no
delegation-create --file input.jsonunsigned delegation{ delegation, chainId }no
delegation-sign --file input.jsonsign delegation in-process{ signedDelegation, chainId }no
redelegate --parent parent.json --file input.jsonchild delegation + sign{ signedDelegation, chainId }no

Exit codes: 0 ok, 2 missing cast/deps, 3 no wallet, 4 bad args, 5 runtime failure.

Every command supports --help. Unknown flags fail loudly. Optional --home / AGENT_WALLET_HOME and --name (default agent).

Examples

node scripts/aw.mjs sign-personal --message "hello"
# Arc first redeem — Stateless7702 auth for the relayer (pending nonce)
node scripts/aw.mjs auth7702 --rpc https://rpc.mainnet.arc.io --chain-id 5042
node scripts/aw.mjs redelegate --parent ./parent.json --file ./child-input.json

Delegation input schema, scopes, amounts, and 7702: references/eip7710.md.

Arc mainnet: kit env for 5042 is registered via Arc Testnet template (overrideDeployedEnvironment). Kit must be ^2.0.0. See references/eip7710.md.

After create — product deeplinks

This skill only supplies the address. For CoinOperated owner linking (additional signer + spending delegation), follow skill coinoperated: build https://coinoperated.finance/agent/link?accountAddress=…&name=…, ask the user to open it, then SIWE with sign-personal for a Bearer token.

Redeeming via the public relayer

aw signs (7702 auth, root delegation, redelegation). It does not call relayer_*. Follow skill public-relayer (Path D, Example 0d) for capabilities → estimate → send.

Goalaw commandsThen (public-relayer)
First-time smart account on a chainauth7702 --rpc … --chain-id NPass authorizationList: [authorization] on estimate and send
Agent pays fee + work itselfdelegation-sign --file … with to: targetAddresspermissionContext: [signedDelegation]
Spend a user grant to this agent (CoinOperated)redelegate --parent parent.json --file child.json (to: targetAddress, narrower scope)permissionContext: **[child, parent]** (leaf → root)

First tx on a chain: always run auth7702 and include authorizationList until the EOA has Stateless7702 code. aw signs the current pending nonce (relayer is the outer sender — never viem executor: "self").

Batching (same chain): one permissionContext + multiple executions[] (e.g. fee transfer + pull-to-agent). Do not run separate aw send calls for gas-abstracted redeem.

Multichain: run auth7702 / redelegate (or delegation-sign) per chain as needed, then relayer_estimate7710TransactionMultichain / relayer_send7710TransactionMultichain with per-chain context from contextByChainId.

# Example — Arc D2 (CoinOperated)
node scripts/aw.mjs auth7702 --rpc https://rpc.mainnet.arc.io --chain-id 5042
node scripts/aw.mjs redelegate --parent ./parent.json --file ./child-input.json
# → authorizationList + permissionContext [child, parent] on estimate/send (Example 0d)

Agent rules

  1. Run doctor before first use; fix npm install from its hints. Install Foundry only if you need send / mktx / sign-typed.
  2. After create, tell the user the address only — never open or dump the password file or keystore JSON into chat.
  3. Do not run cast wallet private-key, cast wallet new without --unsafe-password, or interactive password prompts.
  4. For EIP-7710 submit/redeem, use skill public-relayer (relayer_*) — not aw send.
  5. Treat stdout as the only success channel; parse JSON (ok: true). BigInts in auth are stringified safely.

Storage layout

See references/storage.md. Tier B only in v1: encrypted keystore + 0600 password file. OS keyring deferred.

See also

  • references/casting.md — cast flag mapping (optional path)
  • references/security.md — threat model
  • references/eip7710.md — delegation JSON + 7702
  • Skill public-relayer — submit signed EIP-7710 contexts (relayer_send7710Transaction)
  • Skill coinoperated — CoinOperated agent link deeplink + SIWE Bearer + OpenAPI
  • Skill smart-accounts-kit (MetaMask) — broader kit workflows

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.