[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GTGGCGAHNTMME1TGYTYRDN":3,"skill-same:01M6GTGGCGAHNTMME1TGYTYRDN":125},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":47,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M6GTGGCGAHNTMME1TGYTYRDN","8004-skill",null,"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.","jiayaoqijia\u002Fcryptoskill","jiayaoqijia","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1453879?v=4","01M6GMYTX7Q7S504VC6E756ENR","YQ","01M6GMYV1QKJ1CC75MTTGT9PR0",81,"AGPL-3.0","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"8004 skill","8004","erc-8004","when","for","on-chain","register","chain","nfts","identity","mint","registration","manage","use","ceo","protocols","protocol","2026-11-10 10:12:30",false,"---\nname: 8004-skill\ndescription: 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.\n---\n\n# ERC-8004 Identity Skill\n\nUse 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).\n\nReference: [EIP-8004 Trustless Agents](https:\u002F\u002Feips.ethereum.org\u002FEIPS\u002Feip-8004)\n\n## Contract Address (Monad Mainnet)\n\n| Contract | Address |\n|----------|---------|\n| ERC-8004 Identity | `0x8004A169FB4a3325136EB29fA0ceB6D2e539a432` |\n\n## Interface Summary\n\nThe Identity Registry is ERC-721 based. Registering mints an NFT to `msg.sender`; the token ID is the agent ID.\n\n### Write Functions\n\n| Function | Purpose |\n|----------|---------|\n| `register(string agentURI)` | Register with a URI; mints NFT, returns `agentId` |\n| `register(string agentURI, MetadataEntry[] metadata)` | Register with URI and on-chain metadata |\n| `register()` | Register with no URI (set later via `setAgentURI`) |\n| `setAgentURI(uint256 agentId, string newURI)` | Update the agent's URI |\n| `setMetadata(uint256 agentId, string metadataKey, bytes metadataValue)` | Set on-chain metadata |\n\n### Read Functions (view)\n\n| Function | Returns | Use |\n|----------|---------|-----|\n| `ownerOf(uint256 tokenId)` | `address` | Check who owns an agent NFT |\n| `tokenURI(uint256 tokenId)` | `string` | Get agent URI (same as agentURI) |\n| `getAgentWallet(uint256 agentId)` | `address` | Get wallet linked to agent |\n| `getMetadata(uint256 agentId, string metadataKey)` | `bytes` | Get on-chain metadata |\n\n### Events\n\n| Event | Use |\n|-------|-----|\n| `Registered(uint256 indexed agentId, string agentURI, address indexed owner)` | Emitted on mint |\n| `URIUpdated(uint256 indexed agentId, string newURI, address indexed updatedBy)` | Emitted on URI change |\n| `MetadataSet(uint256 indexed agentId, string indexed metadataKey, string metadataKey, bytes metadataValue)` | Emitted on metadata set |\n\n## Registration Data Template\n\nThe `agentURI` must resolve to a JSON document conforming to EIP-8004 registration. Use this template and replace placeholders before hosting (IPFS or data URI):\n\n```json\n{\n  \"type\": \"https:\u002F\u002Feips.ethereum.org\u002FEIPS\u002Feip-8004#registration-v1\",\n  \"name\": \"AGENT_NAME\",\n  \"description\": \"AGENT_DESCRIPTION\",\n  \"image\": \"https:\u002F\u002Fexample.com\u002Fagent-image.png\",\n  \"services\": [\n    {\n      \"name\": \"A2A\",\n      \"endpoint\": \"https:\u002F\u002FYOUR_DOMAIN\u002F.well-known\u002Fagent-card.json\",\n      \"version\": \"0.3.0\"\n    },\n    {\n      \"name\": \"MCP\",\n      \"endpoint\": \"https:\u002F\u002FYOUR_DOMAIN\u002Fmcp\",\n      \"version\": \"2025-06-18\"\n    }\n  ],\n  \"x402Support\": false,\n  \"active\": true,\n  \"registrations\": [],\n  \"supportedTrust\": [\n    \"reputation\"\n  ]\n}\n```\n\n| Field | Replace with |\n|-------|--------------|\n| `AGENT_NAME` | Agent display name |\n| `AGENT_DESCRIPTION` | Short description of capabilities |\n| `image` | URL to agent avatar\u002Fimage |\n| `YOUR_DOMAIN` | Your domain for A2A\u002FMCP endpoints (or omit services if not applicable) |\n| `supportedTrust` | Trust models (e.g. `[\"reputation\"]` for CEO Protocol) |\n\nFor a minimal CEO Protocol–only registration, you can omit `services` or set them to empty; `supportedTrust: [\"reputation\"]` is typical.\n\n## Automated Scripts (preferred)\n\nThe Docker image includes production-ready scripts at:\n\n`\u002Fopt\u002Ferc8004-scripts`\n\nSource in workspace:\n\n`\u002Froot\u002F.openclaw\u002Fworkspace\u002Fskills\u002F8004-skill\u002Fscripts`\n\n### Required env vars for script flow\n\n- `MONAD_RPC_URL`\n- `MONAD_CHAIN_ID=143` (or pass `--chainId`)\n- `AGENT_PRIVATE_KEY`\n- `PINATA_JWT`\n- `PINATA_GATEWAY` (recommended for verification fetch)\n\n### Script commands\n\n```bash\n# 1) Register on-chain with empty URI -> returns agentId\nnode \u002Fopt\u002Ferc8004-scripts\u002Fregister.mjs --network monad-mainnet\n\n# 2) Build card JSON with registrations[] embedded\nnode \u002Fopt\u002Ferc8004-scripts\u002Fbuild-card.mjs \\\n  --network monad-mainnet \\\n  --agentId 42 \\\n  --template \u002Froot\u002F.openclaw\u002Fworkspace\u002Fskills\u002F8004-skill\u002Fassets\u002Fregistration-template.json \\\n  --name \"CEO-1\" \\\n  --description \"Autonomous strategist for The CEO Protocol\" \\\n  --out \u002Ftmp\u002Fagent-42.json\n\n# 3) Upload to Pinata -> returns ipfs:\u002F\u002FCID\nnode \u002Fopt\u002Ferc8004-scripts\u002Fupload-pinata.mjs --file \u002Ftmp\u002Fagent-42.json\n\n# 4) Set token URI on-chain\nnode \u002Fopt\u002Ferc8004-scripts\u002Fset-agent-uri.mjs \\\n  --network monad-mainnet \\\n  --agentId 42 \\\n  --uri ipfs:\u002F\u002FCID\n\n# 5) Verify owner, tokenURI, wallet, and registrations[] match\nnode \u002Fopt\u002Ferc8004-scripts\u002Fverify.mjs --network monad-mainnet --agentId 42\n```\n\n### One-shot command\n\n```bash\nnode \u002Fopt\u002Ferc8004-scripts\u002Ffull-register.mjs \\\n  --network monad-mainnet \\\n  --name \"CEO-1\" \\\n  --description \"Autonomous strategist for The CEO Protocol\" \\\n  --template \u002Froot\u002F.openclaw\u002Fworkspace\u002Fskills\u002F8004-skill\u002Fassets\u002Fregistration-template.json \\\n  --outCard \u002Ftmp\u002Fagent-card.json \\\n  --identityFile \u002Froot\u002F.openclaw\u002Fworkspace\u002FAGENT_IDENTITY.md\n```\n\nThis executes all 4 registration steps (register -> build card -> upload -> set URI) and writes identity state for later CEO Protocol onboarding.\n\n## Registration Flow\n\n1. **Prerequisites**\n   - Wallet with MON for gas (use `viem-local-signer address` to confirm signer).\n   - `agentURI`: a URI pointing to your registration JSON (use the template above). Use IPFS (`ipfs:\u002F\u002F...`) or a data URI (`data:application\u002Fjson;base64,...`).\n\n2. **Call `register(agentURI)`**\n   - Encode calldata with `encodeFunctionData`.\n   - Send via `viem-local-signer send-contract`.\n   - Parse `Registered` event or return value for `agentId`.\n\n3. **Store `agentId`**\n   - The returned `agentId` (token ID) is required for CEO Protocol `registerAgent(metadataURI, ceoAmount, erc8004Id)`.\n   - Persist it in an identity file (see below).\n\n## Identity File Template\n\nAfter registration, persist the on-chain identity so the agent can reference it for CEO Protocol and other flows. Use this template:\n\n```markdown\n# Agent Identity\n- **Address**: `\u003CNOT SET>`\n- **Agent ID**: `\u003CNOT SET>`\n- **Agent Registry**: `\u003CNOT SET>`\n- **Chain ID**: `\u003CNOT SET>`\n```\n\n### How to fill it\n\n| Field | Source | Example |\n|-------|--------|---------|\n| **Address** | `viem-local-signer address` (signer wallet) | `0xB4AF3708DA37a485E84b4F09c146eD0A8B7Df5c4` |\n| **Agent ID** | Return value from `register(agentURI)` | `42` |\n| **Agent Registry** | ERC-8004 Identity contract (Monad: `eip155:143:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432`) | `eip155:143:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432` |\n| **Chain ID** | Monad mainnet | `143` |\n\n### How to use it\n\n1. **After registration**: Write the identity file to `workspace\u002FIDENTITY.md` or `workspace\u002FAGENT_IDENTITY.md` so it is in the agent's context.\n2. **Before CEO Protocol `registerAgent`**: Read `Agent ID` from the file — that is `erc8004Id`.\n3. **Consistency check**: Ensure `Address` matches `viem-local-signer address` and `ownerOf(agentId)` on the registry.\n\nExample filled identity:\n\n```markdown\n# Agent Identity\n- **Address**: `0xB4AF3708DA37a485E84b4F09c146eD0A8B7Df5c4`\n- **Agent ID**: `42`\n- **Agent Registry**: `eip155:143:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432`\n- **Chain ID**: `143`\n```\n\n## ABI (minimal)\n\n```json\n[\n  {\n    \"type\": \"function\",\n    \"name\": \"register\",\n    \"stateMutability\": \"nonpayable\",\n    \"inputs\": [{ \"name\": \"agentURI\", \"type\": \"string\" }],\n    \"outputs\": [{ \"name\": \"agentId\", \"type\": \"uint256\" }]\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"register\",\n    \"stateMutability\": \"nonpayable\",\n    \"inputs\": [\n      { \"name\": \"agentURI\", \"type\": \"string\" },\n      {\n        \"name\": \"metadata\",\n        \"type\": \"tuple[]\",\n        \"components\": [\n          { \"name\": \"metadataKey\", \"type\": \"string\" },\n          { \"name\": \"metadataValue\", \"type\": \"bytes\" }\n        ]\n      }\n    ],\n    \"outputs\": [{ \"name\": \"agentId\", \"type\": \"uint256\" }]\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"register\",\n    \"stateMutability\": \"nonpayable\",\n    \"inputs\": [],\n    \"outputs\": [{ \"name\": \"agentId\", \"type\": \"uint256\" }]\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"setAgentURI\",\n    \"stateMutability\": \"nonpayable\",\n    \"inputs\": [\n      { \"name\": \"agentId\", \"type\": \"uint256\" },\n      { \"name\": \"newURI\", \"type\": \"string\" }\n    ],\n    \"outputs\": []\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"setMetadata\",\n    \"stateMutability\": \"nonpayable\",\n    \"inputs\": [\n      { \"name\": \"agentId\", \"type\": \"uint256\" },\n      { \"name\": \"metadataKey\", \"type\": \"string\" },\n      { \"name\": \"metadataValue\", \"type\": \"bytes\" }\n    ],\n    \"outputs\": []\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"ownerOf\",\n    \"stateMutability\": \"view\",\n    \"inputs\": [{ \"name\": \"tokenId\", \"type\": \"uint256\" }],\n    \"outputs\": [{ \"name\": \"\", \"type\": \"address\" }]\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"tokenURI\",\n    \"stateMutability\": \"view\",\n    \"inputs\": [{ \"name\": \"tokenId\", \"type\": \"uint256\" }],\n    \"outputs\": [{ \"name\": \"\", \"type\": \"string\" }]\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"getAgentWallet\",\n    \"stateMutability\": \"view\",\n    \"inputs\": [{ \"name\": \"agentId\", \"type\": \"uint256\" }],\n    \"outputs\": [{ \"name\": \"\", \"type\": \"address\" }]\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"getMetadata\",\n    \"stateMutability\": \"view\",\n    \"inputs\": [\n      { \"name\": \"agentId\", \"type\": \"uint256\" },\n      { \"name\": \"metadataKey\", \"type\": \"string\" }\n    ],\n    \"outputs\": [{ \"name\": \"\", \"type\": \"bytes\" }]\n  }\n]\n```\n\n## Encoding and Sending\n\nUse `viem` to encode, then `viem-local-signer send-contract` to broadcast. Example (Node\u002Fscript):\n\n```typescript\nimport { encodeFunctionData } from \"viem\";\n\nconst ERC8004_IDENTITY = \"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\";\n\nconst abi = [\n  {\n    type: \"function\",\n    name: \"register\",\n    stateMutability: \"nonpayable\",\n    inputs: [{ name: \"agentURI\", type: \"string\" }],\n    outputs: [{ name: \"agentId\", type: \"uint256\" }],\n  },\n] as const;\n\nconst agentURI = \"ipfs:\u002F\u002FQm...\"; \u002F\u002F or data:application\u002Fjson;base64,...\nconst data = encodeFunctionData({\n  abi,\n  functionName: \"register\",\n  args: [agentURI],\n});\n\n\u002F\u002F Then run:\n\u002F\u002F viem-local-signer send-contract --to 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 --data \u003Chex> --value-wei 0 --wait\n```\n\n## Agent Runbook\n\n1. Confirm signer: `viem-local-signer address`\n2. Ensure wallet has MON for gas.\n3. Prepare `agentURI` (IPFS or data URI with registration JSON).\n4. Encode `register(agentURI)` with viem.\n5. Present tx summary and ask for user confirmation.\n6. Run `viem-local-signer send-contract --to 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 --data \u003Ccalldata> --value-wei 0 --wait`\n7. Parse receipt\u002Flogs for `agentId` (or read from `Registered` event).\n8. Write identity file (`workspace\u002FAGENT_IDENTITY.md` or `workspace\u002FIDENTITY.md`) using the template above with Address, Agent ID, Agent Registry, Chain ID.\n\n## CEO Protocol Integration\n\nCEOVault requires an ERC-8004 identity before `registerAgent`:\n\n```\nCEOVault.registerAgent(metadataURI, ceoAmount, erc8004Id)\n```\n\n- `erc8004Id` = the token ID from `ERC8004Identity.register(...)`.\n- Caller must own that NFT (`ownerOf(erc8004Id) == msg.sender`).\n\n## Block Explorer\n\n- Monad: `https:\u002F\u002Fmonadscan.com\u002F`\n- Tx link: `https:\u002F\u002Fmonadscan.com\u002Ftx\u002F\u003Chash>`\n- Contract: `https:\u002F\u002Fmonadscan.com\u002Faddress\u002F0x8004A169FB4a3325136EB29fA0ceB6D2e539a432`\n","# ERC-8004 Identity Skill\n\nUse 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).\n\nReference: [EIP-8004 Trustless Agents](https:\u002F\u002Feips.ethereum.org\u002FEIPS\u002Feip-8004)\n\n## Contract Address (Monad Mainnet)\n\n| Contract | Address |\n|----------|---------|\n| ERC-8004 Identity | `0x8004A169FB4a3325136EB29fA0ceB6D2e539a432` |\n\n## Interface Summary\n\nThe Identity Registry is ERC-721 based. Registering mints an NFT to `msg.sender`; the token ID is the agent ID.\n\n### Write Functions\n\n| Function | Purpose |\n|----------|---------|\n| `register(string agentURI)` | Register with a URI; mints NFT, returns `agentId` |\n| `register(string agentURI, MetadataEntry[] metadata)` | Register with URI and on-chain metadata |\n| `register()` | Register with no URI (set later via `setAgentURI`) |\n| `setAgentURI(uint256 agentId, string newURI)` | Update the agent's URI |\n| `setMetadata(uint256 agentId, string metadataKey, bytes metadataValue)` | Set on-chain metadata |\n\n### Read Functions (view)\n\n| Function | Returns | Use |\n|----------|---------|-----|\n| `ownerOf(uint256 tokenId)` | `address` | Check who owns an agent NFT |\n| `tokenURI(uint256 tokenId)` | `string` | Get agent URI (same as agentURI) |\n| `getAgentWallet(uint256 agentId)` | `address` | Get wallet linked to agent |\n| `getMetadata(uint256 agentId, string metadataKey)` | `bytes` | Get on-chain metadata |\n\n### Events\n\n| Event | Use |\n|-------|-----|\n| `Registered(uint256 indexed agentId, string agentURI, address indexed owner)` | Emitted on mint |\n| `URIUpdated(uint256 indexed agentId, string newURI, address indexed updatedBy)` | Emitted on URI change |\n| `MetadataSet(uint256 indexed agentId, string indexed metadataKey, string metadataKey, bytes metadataValue)` | Emitted on metadata set |\n\n## Registration Data Template\n\nThe `agentURI` must resolve to a JSON document conforming to EIP-8004 registration. Use this template and replace placeholders before hosting (IPFS or data URI):\n\n```json\n{\n  \"type\": \"https:\u002F\u002Feips.ethereum.org\u002FEIPS\u002Feip-8004#registration-v1\",\n  \"name\": \"AGENT_NAME\",\n  \"description\": \"AGENT_DESCRIPTION\",\n  \"image\": \"https:\u002F\u002Fexample.com\u002Fagent-image.png\",\n  \"services\": [\n    {\n      \"name\": \"A2A\",\n      \"endpoint\": \"https:\u002F\u002FYOUR_DOMAIN\u002F.well-known\u002Fagent-card.json\",\n      \"version\": \"0.3.0\"\n    },\n    {\n      \"name\": \"MCP\",\n      \"endpoint\": \"https:\u002F\u002FYOUR_DOMAIN\u002Fmcp\",\n      \"version\": \"2025-06-18\"\n    }\n  ],\n  \"x402Support\": false,\n  \"active\": true,\n  \"registrations\": [],\n  \"supportedTrust\": [\n    \"reputation\"\n  ]\n}\n```\n\n| Field | Replace with |\n|-------|--------------|\n| `AGENT_NAME` | Agent display name |\n| `AGENT_DESCRIPTION` | Short description of capabilities |\n| `image` | URL to agent avatar\u002Fimage |\n| `YOUR_DOMAIN` | Your domain for A2A\u002FMCP endpoints (or omit services if not applicable) |\n| `supportedTrust` | Trust models (e.g. `[\"reputation\"]` for CEO Protocol) |\n\nFor a minimal CEO Protocol–only registration, you can omit `services` or set them to empty; `supportedTrust: [\"reputation\"]` is typical.\n\n## Automated Scripts (preferred)\n\nThe Docker image includes production-ready scripts at:\n\n`\u002Fopt\u002Ferc8004-scripts`\n\nSource in workspace:\n\n`\u002Froot\u002F.openclaw\u002Fworkspace\u002Fskills\u002F8004-skill\u002Fscripts`\n\n### Required env vars for script flow\n\n- `MONAD_RPC_URL`\n- `MONAD_CHAIN_ID=143` (or pass `--chainId`)\n- `AGENT_PRIVATE_KEY`\n- `PINATA_JWT`\n- `PINATA_GATEWAY` (recommended for verification fetch)\n\n### Script commands\n\n```bash\n# 1) Register on-chain with empty URI -> returns agentId\nnode \u002Fopt\u002Ferc8004-scripts\u002Fregister.mjs --network monad-mainnet\n\n# 2) Build card JSON with registrations[] embedded\nnode \u002Fopt\u002Ferc8004-scripts\u002Fbuild-card.mjs \\\n  --network monad-mainnet \\\n  --agentId 42 \\\n  --template \u002Froot\u002F.openclaw\u002Fworkspace\u002Fskills\u002F8004-skill\u002Fassets\u002Fregistration-template.json \\\n  --name \"CEO-1\" \\\n  --description \"Autonomous strategist for The CEO Protocol\" \\\n  --out \u002Ftmp\u002Fagent-42.json\n\n# 3) Upload to Pinata -> returns ipfs:\u002F\u002FCID\nnode \u002Fopt\u002Ferc8004-scripts\u002Fupload-pinata.mjs --file \u002Ftmp\u002Fagent-42.json\n\n# 4) Set token URI on-chain\nnode \u002Fopt\u002Ferc8004-scripts\u002Fset-agent-uri.mjs \\\n  --network monad-mainnet \\\n  --agentId 42 \\\n  --uri ipfs:\u002F\u002FCID\n\n# 5) Verify owner, tokenURI, wallet, and registrations[] match\nnode \u002Fopt\u002Ferc8004-scripts\u002Fverify.mjs --network monad-mainnet --agentId 42\n```\n\n### One-shot command\n\n```bash\nnode \u002Fopt\u002Ferc8004-scripts\u002Ffull-register.mjs \\\n  --network monad-mainnet \\\n  --name \"CEO-1\" \\\n  --description \"Autonomous strategist for The CEO Protocol\" \\\n  --template \u002Froot\u002F.openclaw\u002Fworkspace\u002Fskills\u002F8004-skill\u002Fassets\u002Fregistration-template.json \\\n  --outCard \u002Ftmp\u002Fagent-card.json \\\n  --identityFile \u002Froot\u002F.openclaw\u002Fworkspace\u002FAGENT_IDENTITY.md\n```\n\nThis executes all 4 registration steps (register -> build card -> upload -> set URI) and writes identity state for later CEO Protocol onboarding.\n\n## Registration Flow\n\n1. **Prerequisites**\n   - Wallet with MON for gas (use `viem-local-signer address` to confirm signer).\n   - `agentURI`: a URI pointing to your registration JSON (use the template above). Use IPFS (`ipfs:\u002F\u002F...`) or a data URI (`data:application\u002Fjson;base64,...`).\n\n2. **Call `register(agentURI)`**\n   - Encode calldata with `encodeFunctionData`.\n   - Send via `viem-local-signer send-contract`.\n   - Parse `Registered` event or return value for `agentId`.\n\n3. **Store `agentId`**\n   - The returned `agentId` (token ID) is required for CEO Protocol `registerAgent(metadataURI, ceoAmount, erc8004Id)`.\n   - Persist it in an identity file (see below).\n\n## Identity File Template\n\nAfter registration, persist the on-chain identity so the agent can reference it for CEO Protocol and other flows. Use this template:\n\n```markdown\n# Agent Identity\n- **Address**: `\u003CNOT SET>`\n- **Agent ID**: `\u003CNOT SET>`\n- **Agent Registry**: `\u003CNOT SET>`\n- **Chain ID**: `\u003CNOT SET>`\n```\n\n### How to fill it\n\n| Field | Source | Example |\n|-------|--------|---------|\n| **Address** | `viem-local-signer address` (signer wallet) | `0xB4AF3708DA37a485E84b4F09c146eD0A8B7Df5c4` |\n| **Agent ID** | Return value from `register(agentURI)` | `42` |\n| **Agent Registry** | ERC-8004 Identity contract (Monad: `eip155:143:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432`) | `eip155:143:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432` |\n| **Chain ID** | Monad mainnet | `143` |\n\n### How to use it\n\n1. **After registration**: Write the identity file to `workspace\u002FIDENTITY.md` or `workspace\u002FAGENT_IDENTITY.md` so it is in the agent's context.\n2. **Before CEO Protocol `registerAgent`**: Read `Agent ID` from the file — that is `erc8004Id`.\n3. **Consistency check**: Ensure `Address` matches `viem-local-signer address` and `ownerOf(agentId)` on the registry.\n\nExample filled identity:\n\n```markdown\n# Agent Identity\n- **Address**: `0xB4AF3708DA37a485E84b4F09c146eD0A8B7Df5c4`\n- **Agent ID**: `42`\n- **Agent Registry**: `eip155:143:0x8004A169FB4a3325136EB29fA0ceB6D2e539a432`\n- **Chain ID**: `143`\n```\n\n## ABI (minimal)\n\n```json\n[\n  {\n    \"type\": \"function\",\n    \"name\": \"register\",\n    \"stateMutability\": \"nonpayable\",\n    \"inputs\": [{ \"name\": \"agentURI\", \"type\": \"string\" }],\n    \"outputs\": [{ \"name\": \"agentId\", \"type\": \"uint256\" }]\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"register\",\n    \"stateMutability\": \"nonpayable\",\n    \"inputs\": [\n      { \"name\": \"agentURI\", \"type\": \"string\" },\n      {\n        \"name\": \"metadata\",\n        \"type\": \"tuple[]\",\n        \"components\": [\n          { \"name\": \"metadataKey\", \"type\": \"string\" },\n          { \"name\": \"metadataValue\", \"type\": \"bytes\" }\n        ]\n      }\n    ],\n    \"outputs\": [{ \"name\": \"agentId\", \"type\": \"uint256\" }]\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"register\",\n    \"stateMutability\": \"nonpayable\",\n    \"inputs\": [],\n    \"outputs\": [{ \"name\": \"agentId\", \"type\": \"uint256\" }]\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"setAgentURI\",\n    \"stateMutability\": \"nonpayable\",\n    \"inputs\": [\n      { \"name\": \"agentId\", \"type\": \"uint256\" },\n      { \"name\": \"newURI\", \"type\": \"string\" }\n    ],\n    \"outputs\": []\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"setMetadata\",\n    \"stateMutability\": \"nonpayable\",\n    \"inputs\": [\n      { \"name\": \"agentId\", \"type\": \"uint256\" },\n      { \"name\": \"metadataKey\", \"type\": \"string\" },\n      { \"name\": \"metadataValue\", \"type\": \"bytes\" }\n    ],\n    \"outputs\": []\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"ownerOf\",\n    \"stateMutability\": \"view\",\n    \"inputs\": [{ \"name\": \"tokenId\", \"type\": \"uint256\" }],\n    \"outputs\": [{ \"name\": \"\", \"type\": \"address\" }]\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"tokenURI\",\n    \"stateMutability\": \"view\",\n    \"inputs\": [{ \"name\": \"tokenId\", \"type\": \"uint256\" }],\n    \"outputs\": [{ \"name\": \"\", \"type\": \"string\" }]\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"getAgentWallet\",\n    \"stateMutability\": \"view\",\n    \"inputs\": [{ \"name\": \"agentId\", \"type\": \"uint256\" }],\n    \"outputs\": [{ \"name\": \"\", \"type\": \"address\" }]\n  },\n  {\n    \"type\": \"function\",\n    \"name\": \"getMetadata\",\n    \"stateMutability\": \"view\",\n    \"inputs\": [\n      { \"name\": \"agentId\", \"type\": \"uint256\" },\n      { \"name\": \"metadataKey\", \"type\": \"string\" }\n    ],\n    \"outputs\": [{ \"name\": \"\", \"type\": \"bytes\" }]\n  }\n]\n```\n\n## Encoding and Sending\n\nUse `viem` to encode, then `viem-local-signer send-contract` to broadcast. Example (Node\u002Fscript):\n\n```typescript\nimport { encodeFunctionData } from \"viem\";\n\nconst ERC8004_IDENTITY = \"0x8004A169FB4a3325136EB29fA0ceB6D2e539a432\";\n\nconst abi = [\n  {\n    type: \"function\",\n    name: \"register\",\n    stateMutability: \"nonpayable\",\n    inputs: [{ name: \"agentURI\", type: \"string\" }],\n    outputs: [{ name: \"agentId\", type: \"uint256\" }],\n  },\n] as const;\n\nconst agentURI = \"ipfs:\u002F\u002FQm...\"; \u002F\u002F or data:application\u002Fjson;base64,...\nconst data = encodeFunctionData({\n  abi,\n  functionName: \"register\",\n  args: [agentURI],\n});\n\n\u002F\u002F Then run:\n\u002F\u002F viem-local-signer send-contract --to 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 --data \u003Chex> --value-wei 0 --wait\n```\n\n## Agent Runbook\n\n1. Confirm signer: `viem-local-signer address`\n2. Ensure wallet has MON for gas.\n3. Prepare `agentURI` (IPFS or data URI with registration JSON).\n4. Encode `register(agentURI)` with viem.\n5. Present tx summary and ask for user confirmation.\n6. Run `viem-local-signer send-contract --to 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 --data \u003Ccalldata> --value-wei 0 --wait`\n7. Parse receipt\u002Flogs for `agentId` (or read from `Registered` event).\n8. Write identity file (`workspace\u002FAGENT_IDENTITY.md` or `workspace\u002FIDENTITY.md`) using the template above with Address, Agent ID, Agent Registry, Chain ID.\n\n## CEO Protocol Integration\n\nCEOVault requires an ERC-8004 identity before `registerAgent`:\n\n```\nCEOVault.registerAgent(metadataURI, ceoAmount, erc8004Id)\n```\n\n- `erc8004Id` = the token ID from `ERC8004Identity.register(...)`.\n- Caller must own that NFT (`ownerOf(erc8004Id) == msg.sender`).\n\n## Block Explorer\n\n- Monad: `https:\u002F\u002Fmonadscan.com\u002F`\n- Tx link: `https:\u002F\u002Fmonadscan.com\u002Ftx\u002F\u003Chash>`\n- Contract: `https:\u002F\u002Fmonadscan.com\u002Faddress\u002F0x8004A169FB4a3325136EB29fA0ceB6D2e539a432`\n",{"name":5,"description":7},"main","3df1d0d67b30ff15236561f8c0f9f06d33f42dfd","skills\u002Fidentity\u002F8004-skill-monad",17,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia","https:\u002F\u002Feth2030.com","Hardcore infra. Building @alt-research and applied cryptography.","2026-11-15 02:28:10",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add jiayaoqijia\u002Fcryptoskill --skill 8004-skill",{"tool":56,"command":57},"bunx","bunx skills add jiayaoqijia\u002Fcryptoskill --skill 8004-skill",{"tool":59,"command":60},"pnpm","pnpm dlx skills add jiayaoqijia\u002Fcryptoskill --skill 8004-skill","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002FSKILL.md",true,[64,70,75,79,85,89,93,97,101,105,109,113,117,121],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"_meta.json","REFERENCE","参考文档",135,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002F_meta.json",{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":68,"sourceHtmlUrl":74},"assets\u002FAGENT_IDENTITY.template.md","ASSET","资产文件","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002Fassets\u002FAGENT_IDENTITY.template.md",{"path":76,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":77,"sourceHtmlUrl":78},"assets\u002Fregistration-template.json",550,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002Fassets\u002Fregistration-template.json",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Fbuild-card.mjs","SCRIPT","脚本",1631,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002Fscripts\u002Fbuild-card.mjs",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"scripts\u002Fcommon.mjs",3966,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002Fscripts\u002Fcommon.mjs",{"path":90,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":91,"sourceHtmlUrl":92},"scripts\u002Ffull-register.mjs",4056,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002Fscripts\u002Ffull-register.mjs",{"path":94,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":95,"sourceHtmlUrl":96},"scripts\u002Fpackage.json",164,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002Fscripts\u002Fpackage.json",{"path":98,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":99,"sourceHtmlUrl":100},"scripts\u002Fregister.mjs",1412,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002Fscripts\u002Fregister.mjs",{"path":102,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":103,"sourceHtmlUrl":104},"scripts\u002Fset-agent-uri.mjs",1145,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002Fscripts\u002Fset-agent-uri.mjs",{"path":106,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":107,"sourceHtmlUrl":108},"scripts\u002Fupload-pinata.mjs",1316,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002Fscripts\u002Fupload-pinata.mjs",{"path":110,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":111,"sourceHtmlUrl":112},"scripts\u002Fverify.mjs",2296,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002Fscripts\u002Fverify.mjs",{"path":114,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":115,"sourceHtmlUrl":116},"skill-card.md",2613,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002Fskill-card.md",{"path":118,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":119,"sourceHtmlUrl":120},"SOURCE.md",270,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002FSOURCE.md",{"path":122,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":123,"sourceHtmlUrl":124},"TRUST.auto.yaml",2050,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fidentity\u002F8004-skill-monad\u002FTRUST.auto.yaml",[126,136,144,152,160,168],{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":130,"licenseFileUrl":131,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":135},"01M7DTKCERMV0RNX3HZJP4CZ26","troves","Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say \"Troves\" explicitly.","MIT","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-troves\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-troves\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":130,"licenseFileUrl":140,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":135},"01M7DTK6CJSMGC8KCQHGNYFZBD","trade","Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say \"swap\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-trade\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-trade\u002FSKILL.md",[],[],{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":130,"licenseFileUrl":148,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":135},"01M7DTJZ6A0X4PAW3Y8W4J9K64","staking","Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say \"stake\" explicitly.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-staking\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-staking\u002FSKILL.md",[],[],{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":130,"licenseFileUrl":156,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":135},"01M7DTJSDZJKCDMW7GHRF4BRH5","send","Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say \"pay 10 STRK to 0x...\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-send\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-send\u002FSKILL.md",[],[],{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":130,"licenseFileUrl":164,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":135},"01M7DTJG1E480D51ZQ7WKDQ26K","portfolio","View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks \"what do I have\", \"show me everything\", \"how much am I worth\", \"my positions\", \"my investments\", \"rebalance my portfolio\", \"I want 50% ETH\", \"optimize my holdings\", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say \"portfolio\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-portfolio\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-portfolio\u002FSKILL.md",[],[],{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":130,"licenseFileUrl":172,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":135},"01M7DTJ7M8TE9R2N36HFBZDGVD","multi-swap","Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions \"two swaps\", \"three swaps\", \"swap X and Y at the same time\", or wants to convert multiple tokens in a single call.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-multi-swap\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-multi-swap\u002FSKILL.md",[],[]]