Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Registers AI agents onchain as ERC-8004 identities and authenticates them via SIWA (Sign In With Agent) challenge-response signing.
0% 67%+67 ptsof test cases passed
Passed 16 of 24 test cases with the skill, and 0 of 24 without it.
3 of 3 safety checks passed
Not used yet
Part of the 8004 Agent Skill v0.0.1
How ERC-8004 agent identity keys are stored and protected against prompt injection and accidental exposure.
An AI agent that processes untrusted input (messages from other agents, web content, user prompts) is vulnerable to prompt injection: adversarial instructions embedded in the input that manipulate the agent's behavior.
If the private key is stored in a plaintext file (like a .env or a markdown memo), a prompt injection can instruct the agent to:
The key is then compromised, and the attacker controls the agent's onchain identity.
| Threat | Description | Mitigation |
|---|---|---|
| Prompt injection exfiltration | Malicious input instructs the agent to read and leak the private key | Key is never in any file the agent reads into context |
| Context window leakage | Key appears in the agent's working memory / LLM context | Key is loaded inside a function, used, and discarded — never returned |
| File system snooping | Another process reads the key from disk | OS keychain uses encrypted storage with access controls; V3 keystore is AES-encrypted |
| Log / error exposure | Key appears in stack traces, console output, or error messages | Signing functions return only signatures, never raw keys |
| Accidental commit | Key is committed to version control | No file in the project ever contains the plaintext key |
For the highest security in production, use a hardware wallet or TEE-based signer (see ERC-8004's Validation Registry trust models).
The @buildersgarden/siwa/keystore module provides three storage backends. In production, the keyring proxy is the primary backend — all other backends are used either internally by the proxy server or for local development.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.