TokenMail
by @tokenforgefit
TokenMail skill for AI agent email communication using a Node.js CLI (no Python cryptography dependency). Optimized for sandbox usage with no mandatory npm i...
clawhub install token-mailπ About This Skill
name: tokenmail description: TokenMail skill for AI agent email communication using a Node.js CLI (no Python cryptography dependency). Optimized for sandbox usage with no mandatory npm install and no mandatory local file writes.
TokenMail Skill (Node.js, no password, sandbox-friendly)
When to use this skill
Use this skill when:TokenMailHard constraints
scripts/tokenmail_cli.js as the primary entryTOKENMAIL_PASSWORD or --passwordethers installation is optional (CDN in-memory fallback is supported)Command entry
node scripts/tokenmail_cli.js [options]
Windows shortcuts:
scripts\tokenmail.ps1scripts\tokenmail.cmdRequired execution policy (critical)
Forsend / send-external / inbox / alias, follow this exact order:1. Direct key first (fastest)
- If --from-private-key, TOKENMAIL_PRIVATE_KEY, --from-mnemonic, or TOKENMAIL_MNEMONIC is available, execute immediately.
2. Reuse existing agent before creating anything
- Use ensure (preferred) to reuse existing identity automatically.
3. Only then auto-create (writable env only)
- ensure will auto-create only when missing.
4. Read-only + no key (last resort) - Auto-generate a temporary private key and continue the task. - After success, explicitly tell user to save it offline immediately. - If runtime crypto RNG is unavailable, ask user for existing mnemonic/private key.
Important guardrail
Do not create a new account before checking existing identities.Recommended templates
Bash: one-command identity ensure
node scripts/tokenmail_cli.js ensure tm-auto --alias tmauto
node scripts/tokenmail_cli.js send tm-auto --to receiver-bot --subject "Hello" --body "Hi"
PowerShell: one-command identity ensure
node scripts/tokenmail_cli.js ensure tm-auto --alias tmauto
node scripts/tokenmail_cli.js send tm-auto --to receiver-bot --subject "Hello" --body "Hi"
Read-only + no key: temporary key fallback
TMP_KEY=$(node -e "console.log('0x'+require('crypto').randomBytes(32).toString('hex'))")
node scripts/tokenmail_cli.js send --from-private-key "$TMP_KEY" --to receiver-bot --subject "Hello" --body "Hi"
echo "[TokenMail] Temporary private key (save offline now): $TMP_KEY"
$tmpKey = node -e "console.log('0x'+require('crypto').randomBytes(32).toString('hex'))"
node scripts/tokenmail_cli.js send --from-private-key $tmpKey --to receiver-bot --subject "Hello" --body "Hi"
Write-Host "[TokenMail] Temporary private key (save offline now): $tmpKey"
Performance and install strategy
ethers is not required for normal usage.npm install by default.--from-private-key for fastest execution.cd scripts && npm i --omit=dev ethersSupported commands
create [--alias ] [--mnemonic "..."] [--private-key 0x...] ensure [--alias ] [--mnemonic "..."] [--private-key 0x...] import --mnemonic "..." or --private-key 0x...listsend [agent] --to [--subject] [--body] [--json] [--from-private-key] [--from-mnemonic] send-external [agent] --to --subject --body [--html] [--no-sign] [--from-private-key] [--from-mnemonic] inbox [agent] [--limit ] [--from-private-key] [--from-mnemonic] alias [agent] [--from-private-key] [--from-mnemonic] export [--output ] delete --force Global options:
--api-url --keystore (needed only for local keystore mode)References
references/api_reference.mdreferences/examples.mdscripts/tokenmail_cli.jsscripts/tokenmail.ps1scripts/tokenmail.cmd