← Back to Skills Marketplace
fabriziogianni7

8004 Harness For Monad

by fabriziogianni7 · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
649
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install 8004-skill-monad
Description
Register and manage ERC-8004 Identity NFTs on Monad. Use when the agent needs to mint an on-chain identity for CEO Protocol registration or other ERC-8004–integrated protocols.
README (SKILL.md)

ERC-8004 Identity Skill

Use this skill when the agent must register on the ERC-8004 Identity Registry to obtain an on-chain identity NFT. This identity is required to register as an agent in The CEO Protocol (CEOVault).

Reference: EIP-8004 Trustless Agents

Contract Address (Monad Mainnet)

Contract Address
ERC-8004 Identity 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432

Interface Summary

The Identity Registry is ERC-721 based. Registering mints an NFT to msg.sender; the token ID is the agent ID.

Write Functions

Function Purpose
register(string agentURI) Register with a URI; mints NFT, returns agentId
register(string agentURI, MetadataEntry[] metadata) Register with URI and on-chain metadata
register() Register with no URI (set later via setAgentURI)
setAgentURI(uint256 agentId, string newURI) Update the agent's URI
setMetadata(uint256 agentId, string metadataKey, bytes metadataValue) Set on-chain metadata

Read Functions (view)

Function Returns Use
ownerOf(uint256 tokenId) address Check who owns an agent NFT
tokenURI(uint256 tokenId) string Get agent URI (same as agentURI)
getAgentWallet(uint256 agentId) address Get wallet linked to agent
getMetadata(uint256 agentId, string metadataKey) bytes Get on-chain metadata

Events

Event Use
Registered(uint256 indexed agentId, string agentURI, address indexed owner) Emitted on mint
URIUpdated(uint256 indexed agentId, string newURI, address indexed updatedBy) Emitted on URI change
MetadataSet(uint256 indexed agentId, string indexed metadataKey, string metadataKey, bytes metadataValue) Emitted on metadata set

Registration Data Template

The agentURI must resolve to a JSON document conforming to EIP-8004 registration. Use this template and replace placeholders before hosting (IPFS or data URI):

{
  "type": "https://eips.ethereum.org/EIPS/eip-8004#registration-v1",
  "name": "AGENT_NAME",
  "description": "AGENT_DESCRIPTION",
  "image": "https://example.com/agent-image.png",
  "services": [
    {
      "name": "A2A",
      "endpoint": "https://YOUR_DOMAIN/.well-known/agent-card.json",
      "version": "0.3.0"
    },
    {
      "name": "MCP",
      "endpoint": "https://YOUR_DOMAIN/mcp",
      "version": "2025-06-18"
    }
  ],
  "x402Support": false,
  "active": true,
  "registrations": [],
  "supportedTrust": [
    "reputation"
  ]
}
Field Replace with
AGENT_NAME Agent display name
AGENT_DESCRIPTION Short description of capabilities
image URL to agent avatar/image
YOUR_DOMAIN Your domain for A2A/MCP endpoints (or omit services if not applicable)
supportedTrust Trust models (e.g. ["reputation"] for CEO Protocol)

For a minimal CEO Protocol–only registration, you can omit services or set them to empty; supportedTrust: ["reputation"] is typical.

Automated Scripts (preferred)

The Docker image includes production-ready scripts at:

/opt/erc8004-scripts

Source in workspace:

/root/.openclaw/workspace/skills/8004-skill/scripts

Required env vars for script flow

  • MONAD_RPC_URL
  • MONAD_CHAIN_ID=143 (or pass --chainId)
  • AGENT_PRIVATE_KEY
  • PINATA_JWT
  • PINATA_GATEWAY (recommended for verification fetch)

Script commands

# 1) Register on-chain with empty URI -> returns agentId
node /opt/erc8004-scripts/register.mjs --network monad-mainnet

# 2) Build card JSON with registrations[] embedded
node /opt/erc8004-scripts/build-card.mjs \
  --network monad-mainnet \
  --agentId 42 \
  --template /root/.openclaw/workspace/skills/8004-skill/assets/registration-template.json \
  --name "CEO-1" \
  --description "Autonomous strategist for The CEO Protocol" \
  --out /tmp/agent-42.json

# 3) Upload to Pinata -> returns ipfs://CID
node /opt/erc8004-scripts/upload-pinata.mjs --file /tmp/agent-42.json

# 4) Set token URI on-chain
node /opt/erc8004-scripts/set-agent-uri.mjs \
  --network monad-mainnet \
  --agentId 42 \
  --uri ipfs://CID

# 5) Verify owner, tokenURI, wallet, and registrations[] match
node /opt/erc8004-scripts/verify.mjs --network monad-mainnet --agentId 42

One-shot command

node /opt/erc8004-scripts/full-register.mjs \
  --network monad-mainnet \
  --name "CEO-1" \
  --description "Autonomous strategist for The CEO Protocol" \
  --template /root/.openclaw/workspace/skills/8004-skill/assets/registration-template.json \
  --outCard /tmp/agent-card.json \
  --identityFile /root/.openclaw/workspace/AGENT_IDENTITY.md

This executes all 4 registration steps (register -> build card -> upload -> set URI) and writes identity state for later CEO Protocol onboarding.

Registration Flow

  1. Prerequisites

    • Wallet with MON for gas (use viem-local-signer address to confirm signer).
    • agentURI: a URI pointing to your registration JSON (use the template above). Use IPFS (ipfs://...) or a data URI (data:application/json;base64,...).
  2. Call register(agentURI)

    • Encode calldata with encodeFunctionData.
    • Send via viem-local-signer send-contract.
    • Parse Registered event or return value for agentId.
  3. Store agentId

    • The returned agentId (token ID) is required for CEO Protocol registerAgent(metadataURI, ceoAmount, erc8004Id).
    • Persist it in an identity file (see below).

Identity File Template

After registration, persist the on-chain identity so the agent can reference it for CEO Protocol and other flows. Use this template:

# Agent Identity
- **Address**: `<NOT SET>`
- **Agent ID**: `<NOT SET>`
- **Agent Registry**: `<NOT SET>`
- **Chain ID**: `<NOT SET>`

How to fill it

Field Source Example
Address viem-local-signer address (signer wallet) 0xB4AF3708DA37a485E84b4F09c146eD0A8B7Df5c4
Agent ID Return value from register(agentURI) 42
Agent Registry ERC-8004 Identity contract (Monad: eip155:143:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432) eip155:143:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
Chain ID Monad mainnet 143

How to use it

  1. After registration: Write the identity file to workspace/IDENTITY.md or workspace/AGENT_IDENTITY.md so it is in the agent's context.
  2. Before CEO Protocol registerAgent: Read Agent ID from the file — that is erc8004Id.
  3. Consistency check: Ensure Address matches viem-local-signer address and ownerOf(agentId) on the registry.

Example filled identity:

# Agent Identity
- **Address**: `0xB4AF3708DA37a485E84b4F09c146eD0A8B7Df5c4`
- **Agent ID**: `42`
- **Agent Registry**: `eip155:143:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432`
- **Chain ID**: `143`

ABI (minimal)

[
  {
    "type": "function",
    "name": "register",
    "stateMutability": "nonpayable",
    "inputs": [{ "name": "agentURI", "type": "string" }],
    "outputs": [{ "name": "agentId", "type": "uint256" }]
  },
  {
    "type": "function",
    "name": "register",
    "stateMutability": "nonpayable",
    "inputs": [
      { "name": "agentURI", "type": "string" },
      {
        "name": "metadata",
        "type": "tuple[]",
        "components": [
          { "name": "metadataKey", "type": "string" },
          { "name": "metadataValue", "type": "bytes" }
        ]
      }
    ],
    "outputs": [{ "name": "agentId", "type": "uint256" }]
  },
  {
    "type": "function",
    "name": "register",
    "stateMutability": "nonpayable",
    "inputs": [],
    "outputs": [{ "name": "agentId", "type": "uint256" }]
  },
  {
    "type": "function",
    "name": "setAgentURI",
    "stateMutability": "nonpayable",
    "inputs": [
      { "name": "agentId", "type": "uint256" },
      { "name": "newURI", "type": "string" }
    ],
    "outputs": []
  },
  {
    "type": "function",
    "name": "setMetadata",
    "stateMutability": "nonpayable",
    "inputs": [
      { "name": "agentId", "type": "uint256" },
      { "name": "metadataKey", "type": "string" },
      { "name": "metadataValue", "type": "bytes" }
    ],
    "outputs": []
  },
  {
    "type": "function",
    "name": "ownerOf",
    "stateMutability": "view",
    "inputs": [{ "name": "tokenId", "type": "uint256" }],
    "outputs": [{ "name": "", "type": "address" }]
  },
  {
    "type": "function",
    "name": "tokenURI",
    "stateMutability": "view",
    "inputs": [{ "name": "tokenId", "type": "uint256" }],
    "outputs": [{ "name": "", "type": "string" }]
  },
  {
    "type": "function",
    "name": "getAgentWallet",
    "stateMutability": "view",
    "inputs": [{ "name": "agentId", "type": "uint256" }],
    "outputs": [{ "name": "", "type": "address" }]
  },
  {
    "type": "function",
    "name": "getMetadata",
    "stateMutability": "view",
    "inputs": [
      { "name": "agentId", "type": "uint256" },
      { "name": "metadataKey", "type": "string" }
    ],
    "outputs": [{ "name": "", "type": "bytes" }]
  }
]

Encoding and Sending

Use viem to encode, then viem-local-signer send-contract to broadcast. Example (Node/script):

import { encodeFunctionData } from "viem";

const ERC8004_IDENTITY = "0x8004A169FB4a3325136EB29fA0ceB6D2e539a432";

const abi = [
  {
    type: "function",
    name: "register",
    stateMutability: "nonpayable",
    inputs: [{ name: "agentURI", type: "string" }],
    outputs: [{ name: "agentId", type: "uint256" }],
  },
] as const;

const agentURI = "ipfs://Qm..."; // or data:application/json;base64,...
const data = encodeFunctionData({
  abi,
  functionName: "register",
  args: [agentURI],
});

// Then run:
// viem-local-signer send-contract --to 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 --data <hex> --value-wei 0 --wait

Agent Runbook

  1. Confirm signer: viem-local-signer address
  2. Ensure wallet has MON for gas.
  3. Prepare agentURI (IPFS or data URI with registration JSON).
  4. Encode register(agentURI) with viem.
  5. Present tx summary and ask for user confirmation.
  6. Run viem-local-signer send-contract --to 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 --data <calldata> --value-wei 0 --wait
  7. Parse receipt/logs for agentId (or read from Registered event).
  8. Write identity file (workspace/AGENT_IDENTITY.md or workspace/IDENTITY.md) using the template above with Address, Agent ID, Agent Registry, Chain ID.

CEO Protocol Integration

CEOVault requires an ERC-8004 identity before registerAgent:

CEOVault.registerAgent(metadataURI, ceoAmount, erc8004Id)
  • erc8004Id = the token ID from ERC8004Identity.register(...).
  • Caller must own that NFT (ownerOf(erc8004Id) == msg.sender).

Block Explorer

  • Monad: https://monadscan.com/
  • Tx link: https://monadscan.com/tx/<hash>
  • Contract: https://monadscan.com/address/0x8004A169FB4a3325136EB29fA0ceB6D2e539a432
Usage Guidance
This skill appears to implement the ERC-8004 registration flow correctly, but there are several things to consider before installing or running it: - Metadata mismatch: The skill registry metadata claims no required env vars and 'instruction-only', but the skill includes scripts and does require several environment variables (MONAD_RPC_URL, MONAD_CHAIN_ID, AGENT_PRIVATE_KEY, PINATA_JWT). Treat that discrepancy as a red flag and prefer packages whose manifest accurately lists required secrets and dependencies. - Sensitive credentials: The scripts require AGENT_PRIVATE_KEY (used to sign transactions) and PINATA_JWT (used to upload to Pinata). Only provide a private key with minimal MON balance and permissions (do not use your primary/mainnet key). Consider using an ephemeral or hardware-backed signing mechanism, or using a signing service that keeps keys off the skill runtime. - External uploads: The skill uploads the registration JSON to Pinata (external third-party). That means your registration metadata will be sent to Pinata. If you need privacy, host on your own IPFS node or use a private gateway. - Missing install details: package.json lists Node dependencies (pinata, viem) but no install instructions are present. Ensure you run the scripts in an environment with those dependencies installed and audit how they are installed (avoid blind downloads from unknown URLs). - Code review: The repository code is small and readable; review the scripts (especially common.mjs and full-register.mjs) yourself or have a developer review them to confirm no hidden endpoints or exfiltration. Verify the contract address and ABI are expected for your environment. - Operational safety: Run first on testnet (monad-testnet) with a throwaway wallet and small funds. Confirm the returned agentId, tokenURI, and on-chain ownership before using any key with higher value. If you proceed, insist that the skill author update the metadata to list required env vars and provide an install specification or packaged runtime so you can more confidently assess what will be installed and what credentials are required.
Capability Analysis
Type: OpenClaw Skill Name: 8004-skill-monad Version: 1.0.0 The OpenClaw AgentSkills bundle is designed for registering and managing ERC-8004 Identity NFTs on the Monad blockchain. The `SKILL.md` documentation clearly outlines the purpose, required environment variables (`AGENT_PRIVATE_KEY`, `PINATA_JWT`), and the steps involved, including interacting with smart contracts, uploading data to IPFS via Pinata, and writing identity files to the agent's workspace. The Node.js scripts (`scripts/*.mjs`) implement these functions using legitimate libraries (`viem`, `pinata`). While the skill requires access to sensitive credentials and performs network and file I/O operations, these capabilities are essential for its stated purpose and are not used for unauthorized data exfiltration, malicious execution, persistence, or obfuscation. There is no evidence of prompt injection attempts in `SKILL.md` to mislead the agent into harmful actions; instead, it promotes transparency by suggesting user confirmation for transactions.
Capability Assessment
Purpose & Capability
The scripts and SKILL.md implement ERC-8004 registration flows (register, build card, upload to Pinata, set token URI) that align with the skill description. However, the registry metadata declared 'Required env vars: none' and 'No install spec / instruction-only', while the SKILL.md and included scripts clearly require environment variables (MONAD_RPC_URL, AGENT_PRIVATE_KEY, PINATA_JWT, optional PINATA_GATEWAY) and Node dependencies (pinata, viem). This metadata/inventory mismatch is an incoherence that should be resolved before trusting the package.
Instruction Scope
Runtime instructions are narrowly scoped to on-chain registration, building a registration JSON, uploading it to Pinata, setting the on-chain URI, and persisting an identity file. Those actions require network access and a signing key (AGENT_PRIVATE_KEY). The instructions do fetch and parse external data (IPFS via a Pinata gateway) and write an identity file under the workspace; these behaviors are expected for the stated purpose but involve transmitting registration JSON to an external service (Pinata).
Install Mechanism
No install spec is provided even though package.json lists dependencies (pinata, viem) and the SKILL.md references a Docker image path (/opt/erc8004-scripts). The absence of an install step means it's unclear how required Node modules are supplied; that ambiguity increases operational risk (scripts may fail or rely on an environment that has network-capable Node modules installed).
Credentials
The env vars required by the scripts (MONAD_RPC_URL, MONAD_CHAIN_ID, AGENT_PRIVATE_KEY, PINATA_JWT, optional PINATA_GATEWAY) are logically required for minting and uploading, so they are proportionate to the task. However, the top-level skill metadata does not declare them, creating a mismatch. AGENT_PRIVATE_KEY is highly sensitive — supplying a key with broad wallet access has financial risk and must be minimized (use a key with only required funds/permissions or a hardware/ephemeral signing approach).
Persistence & Privilege
The skill does not request always:true, does not modify other skills, and only writes files under the agent workspace (/root/.openclaw/workspace/AGENT_IDENTITY.md or provided paths). Autonomous invocation is allowed (platform default) but not combined with any unusual permanence or system-wide configuration changes.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install 8004-skill-monad
  3. After installation, invoke the skill by name or use /8004-skill-monad
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
8004-skill-monad v1.0.0 – Initial Release - Provides tools to register and manage ERC-8004 Identity NFTs on Monad for CEO Protocol and ERC-8004–integrated flows. - Includes complete documentation for on-chain ERC-8004 Identity Registry contract (address, functions, events) and JSON registration template. - Offers ready-to-use scripts for identity registration, card building, IPFS upload, URI setting, and verification with environment variable support. - Details standard flow for agent registration and best practices for recording agent identity information. - Includes minimal contract ABI for integration and scripting.
Metadata
Slug 8004-skill-monad
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 8004 Harness For Monad?

Register and manage ERC-8004 Identity NFTs on Monad. Use when the agent needs to mint an on-chain identity for CEO Protocol registration or other ERC-8004–integrated protocols. It is an AI Agent Skill for Claude Code / OpenClaw, with 649 downloads so far.

How do I install 8004 Harness For Monad?

Run "/install 8004-skill-monad" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is 8004 Harness For Monad free?

Yes, 8004 Harness For Monad is completely free (open-source). You can download, install and use it at no cost.

Which platforms does 8004 Harness For Monad support?

8004 Harness For Monad is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created 8004 Harness For Monad?

It is built and maintained by fabriziogianni7 (@fabriziogianni7); the current version is v1.0.0.

💬 Comments