基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/tomes --skill siwa-skill命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | siwa-skill |
| description | Validates that the keyring proxy is working correctly (9 tests). |
| metadata | {"author":"builders-garden"} |
You are an ERC-8004 agent with access to the 8004 Agent Skill. This skill lets you create and manage an Ethereum wallet, register as an onchain agent, and authenticate with services using the SIWA protocol.
Before using any signing capabilities, a keyring proxy must be running — it holds the private key and performs all cryptographic operations. The agent never accesses the key directly.
Recommended: Deploy to Railway with one click:
Set KEYRING_PROXY_SECRET (shared HMAC secret) and either KEYSTORE_PASSWORD (for encrypted-file backend) or AGENT_PRIVATE_KEY (to use an existing wallet). After deployment, configure your agent with:
KEYRING_PROXY_URL=https://your-keyring-proxy.up.railway.app
KEYRING_PROXY_SECRET=<your-shared-secret>
For full deployment instructions (Docker, local dev, OpenClaw gateway): https://siwa.id/docs/deploy
Before using any capabilities, you MUST install the SIWA SDK in your environment:
npm install @buildersgarden/siwa
This gives you access to:
@buildersgarden/siwa — SIWA authentication (signSIWAMessage, verifySIWA, createSIWANonce, parseSIWAMessage)@buildersgarden/siwa/signer — Signer interface + factories (createLocalAccountSigner, createKeyringProxySigner, createWalletClientSigner, createCircleSiwaSigner, createOpenfortSiwaSigner, createPrivySiwaSigner)@buildersgarden/siwa/keystore — Wallet creation/signing via keyring proxy@buildersgarden/siwa/identity — SIWA_IDENTITY.md helpers@buildersgarden/siwa/registry — Onchain lookups@buildersgarden/siwa/receipt — HMAC receipt helpers (createReceipt, verifyReceipt, DEFAULT_RECEIPT_TTL)@buildersgarden/siwa/erc8128 — ERC-8128 signing/verification (signAuthenticatedRequest, verifyAuthenticatedRequest)@buildersgarden/siwa/captcha — Reverse CAPTCHA (packCaptchaResponse, solveCaptchaChallenge)@buildersgarden/siwa/nonce-store — Pluggable nonce stores (Memory, Redis, KV) for replay protection@buildersgarden/siwa/tba — Token Bound Account address computation (computeTbaAddress, isTbaForAgent)@buildersgarden/siwa/next — Next.js wrappers (withSiwa, siwaOptions, corsJson)@buildersgarden/siwa/express — Express wrappers (siwaMiddleware, siwaJsonParser, siwaCors)@buildersgarden/siwa/fastify — Fastify wrappers (siwaPlugin, siwaAuth)@buildersgarden/siwa/hono — Hono wrappers (siwaMiddleware, siwaCors)@buildersgarden/siwa/x402 — x402 payment helpers (createX402PaymentHeaders, handleX402Response, isX402Response, X402Config)@buildersgarden/siwa/client-resolver — Dynamic PublicClient resolution for multi-chain servers (createClientResolver, parseChainId)The SDK handles all HMAC proxy authentication internally — you never need to craft raw HTTP calls to the proxy.
You can perform these actions by running commands in the siwa/packages/siwa-testing directory, or by using the SDK directly in code:
Creates an Ethereum wallet. The private key is stored securely in the keyring proxy — you never see it.
cd /home/node/.openclaw/workspace/siwa/packages/siwa-testing && pnpm run agent create-wallet
After creating a wallet, you MUST stop and ask the user to fund it before attempting registration or any onchain transaction. Show the user:
create-wallet or status output)Do NOT proceed to registration until the user confirms the wallet is funded. Onchain transactions will fail without gas.
Shows your current wallet address, registration state, and keystore backend.
cd /home/node/.openclaw/workspace/siwa/packages/siwa-testing && pnpm run agent status
Registers your wallet as an ERC-8004 agent identity (mock mode for testing, or live onchain).
cd /home/node/.openclaw/workspace/siwa/packages/siwa-testing && pnpm run agent register
Proves ownership of your ERC-8004 identity by signing a structured message and receiving a verification receipt from the server.
cd /home/node/.openclaw/workspace/siwa/packages/siwa-testing && pnpm run agent sign-in
Runs wallet creation → registration → SIWA sign-in → authenticated API call, all sequentially.
cd /home/node/.openclaw/workspace/siwa/packages/siwa-testing && pnpm run agent:flow
Validates that the keyring proxy is working correctly (9 tests).
cd /home/node/.openclaw/workspace/siwa/packages/siwa-testing && pnpm run agent test-proxy
Validates ERC-8128 HTTP Message Signatures and receipt handling (15 tests: raw signing, receipt HMAC create/verify, signAuthenticatedRequest headers, server GET/POST verification, tampered receipt rejection, missing signature rejection, receipt header swap post-signing, replay rejection, signerType receipt round-trip, allowedSignerTypes policy reject/accept, signerAddress override, signerAddress in signAuthenticatedRequest).
cd /home/node/.openclaw/workspace/siwa/packages/siwa-testing && pnpm run agent test-erc8128
Clears SIWA_IDENTITY.md to start fresh.
cd /home/node/.openclaw/workspace/siwa/packages/siwa-testing && pnpm run reset
If a server requires a reverse CAPTCHA during sign-in or API calls, use solveCaptchaChallenge() from @buildersgarden/siwa/captcha for sign-in or retryWithCaptcha() from @buildersgarden/siwa/erc8128 for per-request challenges. The challenge contains constraints (topic, format, line count, ASCII target, etc.) that you must satisfy in a single text generation pass.
createWallet(), signMessage(), etc. from @buildersgarden/siwa/keystore) or the CLI commands listed above. The proxy uses a specific HMAC-SHA256 authentication protocol that the SDK handles internally — hand-crafting HTTP requests to the proxy will fail. If you cannot install the SDK, see the "Fallback: Manual HMAC authentication" section in skill.md for the exact protocol specification.siwa/packages/siwa-testing/ contains your minimal identity state (address, agentId, registry, chainId). Read it to know your current state.cd /home/node/.openclaw/workspace/siwa/packages/siwa-testing && pnpm install first.You (OpenClaw Agent) Keyring Proxy (keyring-proxy:3100) SIWA Server (siwa-server:3000)
| | |
+-- signMessage() ----------> | 1. Validates HMAC auth |
| (via proxy backend) | 2. Signs with private key |
| | Returns signature only |
| | |
+-- SIWA sign-in -------------|------------------------------------> |
| (signed challenge) | | Verifies signature
| | | Returns receipt
siwa/skill.mdsiwa/references/security-model.mdsiwa/references/siwa-spec.mdConverted and distributed by TomeVault — claim your Tome and manage your conversions.
> Use when this capability is needed.
Use when writing kernel, account, or note MASM code that reads from or writes to the advice provider (advice stack / advice map) — validate advice data.
Use when writing a Rust test that exercises a failure path or a MASM test that expects a `panic` / `assert` — assert on the specific expected error variant or error code.