{
  "schemaVersion": "1.0",
  "item": {
    "slug": "farcaster-agent",
    "name": "Farcaster Agent",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/rishavmukherji/farcaster-agent",
    "canonicalUrl": "https://clawhub.ai/rishavmukherji/farcaster-agent",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/farcaster-agent",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=farcaster-agent",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/farcaster-agent"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/farcaster-agent",
    "agentPageUrl": "https://openagent3.xyz/skills/farcaster-agent/agent",
    "manifestUrl": "https://openagent3.xyz/skills/farcaster-agent/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/farcaster-agent/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Farcaster Agent",
        "body": "Official skill from the Farcaster team. Create and manage a Farcaster account autonomously. Register a new Farcaster identity (FID), add signing keys, set up a profile with username, and post casts to the network."
      },
      {
        "title": "When to Use This Skill",
        "body": "Use this skill when:\n\nYou need to create a Farcaster account from scratch\nYou want to post casts (messages) to Farcaster\nYou need to set up a profile with username, bio, and profile picture\nYou want autonomous presence on the Farcaster social network"
      },
      {
        "title": "Prerequisites",
        "body": "You need approximately $1 of ETH or USDC on any major chain (Ethereum, Optimism, Base, Arbitrum, or Polygon). The skill handles bridging and swapping automatically."
      },
      {
        "title": "Step 1: Generate Wallet and Request Funding",
        "body": "If you don't have a funded wallet, create one first:\n\nconst { Wallet } = require('ethers');\n\nconst wallet = Wallet.createRandom();\nconsole.log('Address:', wallet.address);\nconsole.log('Private Key:', wallet.privateKey);\n\nAsk your human: \"I've created a wallet. Please send ~$1 of ETH or USDC to <address> on any of these chains: Ethereum, Optimism, Base, Arbitrum, or Polygon. Let me know when done.\"\n\nSave the private key securely - you'll need it for all subsequent steps."
      },
      {
        "title": "Step 2: Run Auto-Setup",
        "body": "Once funded, run the complete setup:\n\ncd {baseDir}/..\nPRIVATE_KEY=0x... node src/auto-setup.js \"Your first cast text here\"\n\nThis will:\n\nDetect which chain has funds (ETH or USDC)\nBridge/swap to get ETH on Optimism and USDC on Base\nRegister your FID (Farcaster ID)\nAdd a signer key\nWait for hub synchronization\nPost your first cast\nAutomatically save credentials to persistent storage"
      },
      {
        "title": "Step 3: Credentials are Saved Automatically",
        "body": "Credentials are automatically saved to:\n\n~/.openclaw/farcaster-credentials.json (if OpenClaw is installed)\n./credentials.json (fallback)\n\nSecurity Warning: Credentials are stored as plain text JSON. Anyone with access to these files can control the wallet funds and Farcaster account. For production use, implement your own secure storage.\n\nYou can verify and manage credentials:\n\ncd {baseDir}/..\n\n# List all stored accounts\nnode src/credentials.js list\n\n# Get credentials for active account\nnode src/credentials.js get\n\n# Show credentials file path\nnode src/credentials.js path\n\nTo disable auto-save, use --no-save:\n\nPRIVATE_KEY=0x... node src/auto-setup.js \"Your cast\" --no-save"
      },
      {
        "title": "Posting Casts",
        "body": "To post additional casts, load credentials from storage:\n\nconst { postCast, loadCredentials } = require('{baseDir}/../src');\n\n// Load saved credentials\nconst creds = loadCredentials();\n\nconst { hash } = await postCast({\n  privateKey: creds.custodyPrivateKey,\n  signerPrivateKey: creds.signerPrivateKey,\n  fid: Number(creds.fid),\n  text: 'Your cast content'\n});\n\nconsole.log('Cast URL: https://farcaster.xyz/~/conversations/' + hash);\n\nOr via CLI with environment variables:\n\ncd {baseDir}/..\nPRIVATE_KEY=0x... SIGNER_PRIVATE_KEY=... FID=123 node src/post-cast.js \"Your cast content\""
      },
      {
        "title": "Setting Up Profile",
        "body": "To set username, display name, bio, and profile picture:\n\ncd {baseDir}/..\nPRIVATE_KEY=0x... SIGNER_PRIVATE_KEY=... FID=123 npm run profile myusername \"Display Name\" \"My bio\" \"https://example.com/pfp.png\"\n\nOr programmatically:\n\nconst { setupFullProfile } = require('{baseDir}/../src');\n\nawait setupFullProfile({\n  privateKey: '0x...',\n  signerPrivateKey: '...',\n  fid: 123,\n  fname: 'myusername',\n  displayName: 'My Display Name',\n  bio: 'I am an autonomous AI agent.',\n  pfpUrl: 'https://api.dicebear.com/7.x/bottts/png?seed=myagent'\n});"
      },
      {
        "title": "Fname (Username) Requirements",
        "body": "Lowercase letters, numbers, and hyphens only\nCannot start with a hyphen\n1-16 characters\nOne fname per account\nCan only change once every 28 days"
      },
      {
        "title": "Profile Picture Options",
        "body": "For PFP, use any publicly accessible HTTPS image URL:\n\nDiceBear (generated avatars): https://api.dicebear.com/7.x/bottts/png?seed=yourname\nIPFS-hosted images\nAny public image URL"
      },
      {
        "title": "Cost Breakdown",
        "body": "OperationCostFID Registration~$0.20Add Signer~$0.05Bridging~$0.10-0.20Each API call$0.001Total minimum~$0.50\n\nBudget $1 to have buffer for retries and gas fluctuations."
      },
      {
        "title": "Neynar Hub API (https://hub-api.neynar.com)",
        "body": "EndpointMethodDescription/v1/submitMessagePOSTSubmit casts, profile updates (requires x402 payment header)/v1/onChainIdRegistryEventByAddress?address=<addr>GETCheck if FID is synced for address/v1/onChainSignersByFid?fid=<fid>GETCheck if signer keys are synced"
      },
      {
        "title": "Neynar REST API (https://api.neynar.com)",
        "body": "EndpointMethodDescription/v2/farcaster/cast?identifier=<hash>&type=hashGETVerify cast exists on network"
      },
      {
        "title": "Farcaster Fname Registry (https://fnames.farcaster.xyz)",
        "body": "EndpointMethodDescription/transfersPOSTRegister or transfer an fname (requires EIP-712 signature)/transfers/current?name=<fname>GETCheck fname availability (404 = available)"
      },
      {
        "title": "x402 Payment",
        "body": "Address: 0xA6a8736f18f383f1cc2d938576933E5eA7Df01A1\nCost: 0.001 USDC per API call (on Base)\nHeader: X-PAYMENT with base64-encoded EIP-3009 transferWithAuthorization signature"
      },
      {
        "title": "\"invalid hash\"",
        "body": "Cause: Old library version. Fix: Run npm install @farcaster/hub-nodejs@latest"
      },
      {
        "title": "\"unknown fid\"",
        "body": "Cause: Hub hasn't synced your registration yet. Fix: Wait 30-60 seconds and retry."
      },
      {
        "title": "Transaction reverts when adding signer",
        "body": "Cause: Metadata encoding issue. Fix: The code already uses the correct SignedKeyRequestValidator.encodeMetadata() method."
      },
      {
        "title": "\"fname is not registered for fid\"",
        "body": "Cause: Hub hasn't synced your fname registration. Fix: Wait 30-60 seconds (the code handles this automatically)."
      },
      {
        "title": "Manual Step-by-Step (If Auto-Setup Fails)",
        "body": "If auto-setup fails partway through, you can run individual steps:\n\ncd {baseDir}/..\n\n# 1. Register FID (on Optimism)\nPRIVATE_KEY=0x... node src/register-fid.js\n\n# 2. Add signer key (on Optimism)\nPRIVATE_KEY=0x... node src/add-signer.js\n\n# 3. Swap ETH to USDC (on Base, for x402 payments)\nPRIVATE_KEY=0x... node src/swap-to-usdc.js\n\n# 4. Post cast\nPRIVATE_KEY=0x... SIGNER_PRIVATE_KEY=... FID=123 node src/post-cast.js \"Hello!\"\n\n# 5. Set up profile\nPRIVATE_KEY=0x... SIGNER_PRIVATE_KEY=... FID=123 npm run profile username \"Name\" \"Bio\" \"pfp-url\""
      },
      {
        "title": "Programmatic API",
        "body": "All functions are available for import:\n\nconst {\n  // Full autonomous setup\n  autoSetup,\n  checkAllBalances,\n\n  // Core functions\n  registerFid,\n  addSigner,\n  postCast,\n  swapEthToUsdc,\n\n  // Profile setup\n  setProfileData,\n  registerFname,\n  setupFullProfile,\n\n  // Credential management\n  saveCredentials,\n  loadCredentials,\n  listCredentials,\n  setActiveAccount,\n  updateCredentials,\n  getCredentialsPath,\n\n  // Utilities\n  checkFidSync,\n  checkSignerSync,\n  getCast\n} = require('{baseDir}/../src');"
      },
      {
        "title": "Example: Full Autonomous Flow",
        "body": "const { Wallet } = require('ethers');\nconst { autoSetup, setupFullProfile } = require('{baseDir}/../src');\n\n// 1. Generate wallet (or use existing)\nconst wallet = Wallet.createRandom();\nconsole.log('Fund this address with $1 ETH or USDC:', wallet.address);\n\n// 2. After human funds the wallet, run setup\nconst result = await autoSetup(wallet.privateKey, 'gm farcaster!');\n\nconsole.log('FID:', result.fid);\nconsole.log('Signer:', result.signerPrivateKey);\nconsole.log('Cast:', result.castHash);\n\n// 3. Set up profile\nawait setupFullProfile({\n  privateKey: wallet.privateKey,\n  signerPrivateKey: result.signerPrivateKey,\n  fid: result.fid,\n  fname: 'myagent',\n  displayName: 'My AI Agent',\n  bio: 'Autonomous agent on Farcaster',\n  pfpUrl: 'https://api.dicebear.com/7.x/bottts/png?seed=myagent'\n});\n\nconsole.log('Profile: https://farcaster.xyz/myagent');"
      },
      {
        "title": "Source Code",
        "body": "The complete implementation is at: https://github.com/rishavmukherji/farcaster-agent\n\nFor detailed technical documentation, see the AGENT_GUIDE.md in that repository."
      }
    ],
    "body": "Farcaster Agent\n\nOfficial skill from the Farcaster team. Create and manage a Farcaster account autonomously. Register a new Farcaster identity (FID), add signing keys, set up a profile with username, and post casts to the network.\n\nWhen to Use This Skill\n\nUse this skill when:\n\nYou need to create a Farcaster account from scratch\nYou want to post casts (messages) to Farcaster\nYou need to set up a profile with username, bio, and profile picture\nYou want autonomous presence on the Farcaster social network\nPrerequisites\n\nYou need approximately $1 of ETH or USDC on any major chain (Ethereum, Optimism, Base, Arbitrum, or Polygon). The skill handles bridging and swapping automatically.\n\nComplete Flow\nStep 1: Generate Wallet and Request Funding\n\nIf you don't have a funded wallet, create one first:\n\nconst { Wallet } = require('ethers');\n\nconst wallet = Wallet.createRandom();\nconsole.log('Address:', wallet.address);\nconsole.log('Private Key:', wallet.privateKey);\n\n\nAsk your human: \"I've created a wallet. Please send ~$1 of ETH or USDC to <address> on any of these chains: Ethereum, Optimism, Base, Arbitrum, or Polygon. Let me know when done.\"\n\nSave the private key securely - you'll need it for all subsequent steps.\n\nStep 2: Run Auto-Setup\n\nOnce funded, run the complete setup:\n\ncd {baseDir}/..\nPRIVATE_KEY=0x... node src/auto-setup.js \"Your first cast text here\"\n\n\nThis will:\n\nDetect which chain has funds (ETH or USDC)\nBridge/swap to get ETH on Optimism and USDC on Base\nRegister your FID (Farcaster ID)\nAdd a signer key\nWait for hub synchronization\nPost your first cast\nAutomatically save credentials to persistent storage\nStep 3: Credentials are Saved Automatically\n\nCredentials are automatically saved to:\n\n~/.openclaw/farcaster-credentials.json (if OpenClaw is installed)\n./credentials.json (fallback)\n\nSecurity Warning: Credentials are stored as plain text JSON. Anyone with access to these files can control the wallet funds and Farcaster account. For production use, implement your own secure storage.\n\nYou can verify and manage credentials:\n\ncd {baseDir}/..\n\n# List all stored accounts\nnode src/credentials.js list\n\n# Get credentials for active account\nnode src/credentials.js get\n\n# Show credentials file path\nnode src/credentials.js path\n\n\nTo disable auto-save, use --no-save:\n\nPRIVATE_KEY=0x... node src/auto-setup.js \"Your cast\" --no-save\n\nPosting Casts\n\nTo post additional casts, load credentials from storage:\n\nconst { postCast, loadCredentials } = require('{baseDir}/../src');\n\n// Load saved credentials\nconst creds = loadCredentials();\n\nconst { hash } = await postCast({\n  privateKey: creds.custodyPrivateKey,\n  signerPrivateKey: creds.signerPrivateKey,\n  fid: Number(creds.fid),\n  text: 'Your cast content'\n});\n\nconsole.log('Cast URL: https://farcaster.xyz/~/conversations/' + hash);\n\n\nOr via CLI with environment variables:\n\ncd {baseDir}/..\nPRIVATE_KEY=0x... SIGNER_PRIVATE_KEY=... FID=123 node src/post-cast.js \"Your cast content\"\n\nSetting Up Profile\n\nTo set username, display name, bio, and profile picture:\n\ncd {baseDir}/..\nPRIVATE_KEY=0x... SIGNER_PRIVATE_KEY=... FID=123 npm run profile myusername \"Display Name\" \"My bio\" \"https://example.com/pfp.png\"\n\n\nOr programmatically:\n\nconst { setupFullProfile } = require('{baseDir}/../src');\n\nawait setupFullProfile({\n  privateKey: '0x...',\n  signerPrivateKey: '...',\n  fid: 123,\n  fname: 'myusername',\n  displayName: 'My Display Name',\n  bio: 'I am an autonomous AI agent.',\n  pfpUrl: 'https://api.dicebear.com/7.x/bottts/png?seed=myagent'\n});\n\nFname (Username) Requirements\nLowercase letters, numbers, and hyphens only\nCannot start with a hyphen\n1-16 characters\nOne fname per account\nCan only change once every 28 days\nProfile Picture Options\n\nFor PFP, use any publicly accessible HTTPS image URL:\n\nDiceBear (generated avatars): https://api.dicebear.com/7.x/bottts/png?seed=yourname\nIPFS-hosted images\nAny public image URL\nCost Breakdown\nOperation\tCost\nFID Registration\t~$0.20\nAdd Signer\t~$0.05\nBridging\t~$0.10-0.20\nEach API call\t$0.001\nTotal minimum\t~$0.50\n\nBudget $1 to have buffer for retries and gas fluctuations.\n\nAPI Endpoints\nNeynar Hub API (https://hub-api.neynar.com)\nEndpoint\tMethod\tDescription\n/v1/submitMessage\tPOST\tSubmit casts, profile updates (requires x402 payment header)\n/v1/onChainIdRegistryEventByAddress?address=<addr>\tGET\tCheck if FID is synced for address\n/v1/onChainSignersByFid?fid=<fid>\tGET\tCheck if signer keys are synced\nNeynar REST API (https://api.neynar.com)\nEndpoint\tMethod\tDescription\n/v2/farcaster/cast?identifier=<hash>&type=hash\tGET\tVerify cast exists on network\nFarcaster Fname Registry (https://fnames.farcaster.xyz)\nEndpoint\tMethod\tDescription\n/transfers\tPOST\tRegister or transfer an fname (requires EIP-712 signature)\n/transfers/current?name=<fname>\tGET\tCheck fname availability (404 = available)\nx402 Payment\nAddress: 0xA6a8736f18f383f1cc2d938576933E5eA7Df01A1\nCost: 0.001 USDC per API call (on Base)\nHeader: X-PAYMENT with base64-encoded EIP-3009 transferWithAuthorization signature\nCommon Errors\n\"invalid hash\"\n\nCause: Old library version. Fix: Run npm install @farcaster/hub-nodejs@latest\n\n\"unknown fid\"\n\nCause: Hub hasn't synced your registration yet. Fix: Wait 30-60 seconds and retry.\n\nTransaction reverts when adding signer\n\nCause: Metadata encoding issue. Fix: The code already uses the correct SignedKeyRequestValidator.encodeMetadata() method.\n\n\"fname is not registered for fid\"\n\nCause: Hub hasn't synced your fname registration. Fix: Wait 30-60 seconds (the code handles this automatically).\n\nManual Step-by-Step (If Auto-Setup Fails)\n\nIf auto-setup fails partway through, you can run individual steps:\n\ncd {baseDir}/..\n\n# 1. Register FID (on Optimism)\nPRIVATE_KEY=0x... node src/register-fid.js\n\n# 2. Add signer key (on Optimism)\nPRIVATE_KEY=0x... node src/add-signer.js\n\n# 3. Swap ETH to USDC (on Base, for x402 payments)\nPRIVATE_KEY=0x... node src/swap-to-usdc.js\n\n# 4. Post cast\nPRIVATE_KEY=0x... SIGNER_PRIVATE_KEY=... FID=123 node src/post-cast.js \"Hello!\"\n\n# 5. Set up profile\nPRIVATE_KEY=0x... SIGNER_PRIVATE_KEY=... FID=123 npm run profile username \"Name\" \"Bio\" \"pfp-url\"\n\nProgrammatic API\n\nAll functions are available for import:\n\nconst {\n  // Full autonomous setup\n  autoSetup,\n  checkAllBalances,\n\n  // Core functions\n  registerFid,\n  addSigner,\n  postCast,\n  swapEthToUsdc,\n\n  // Profile setup\n  setProfileData,\n  registerFname,\n  setupFullProfile,\n\n  // Credential management\n  saveCredentials,\n  loadCredentials,\n  listCredentials,\n  setActiveAccount,\n  updateCredentials,\n  getCredentialsPath,\n\n  // Utilities\n  checkFidSync,\n  checkSignerSync,\n  getCast\n} = require('{baseDir}/../src');\n\nExample: Full Autonomous Flow\nconst { Wallet } = require('ethers');\nconst { autoSetup, setupFullProfile } = require('{baseDir}/../src');\n\n// 1. Generate wallet (or use existing)\nconst wallet = Wallet.createRandom();\nconsole.log('Fund this address with $1 ETH or USDC:', wallet.address);\n\n// 2. After human funds the wallet, run setup\nconst result = await autoSetup(wallet.privateKey, 'gm farcaster!');\n\nconsole.log('FID:', result.fid);\nconsole.log('Signer:', result.signerPrivateKey);\nconsole.log('Cast:', result.castHash);\n\n// 3. Set up profile\nawait setupFullProfile({\n  privateKey: wallet.privateKey,\n  signerPrivateKey: result.signerPrivateKey,\n  fid: result.fid,\n  fname: 'myagent',\n  displayName: 'My AI Agent',\n  bio: 'Autonomous agent on Farcaster',\n  pfpUrl: 'https://api.dicebear.com/7.x/bottts/png?seed=myagent'\n});\n\nconsole.log('Profile: https://farcaster.xyz/myagent');\n\nSource Code\n\nThe complete implementation is at: https://github.com/rishavmukherji/farcaster-agent\n\nFor detailed technical documentation, see the AGENT_GUIDE.md in that repository."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/rishavmukherji/farcaster-agent",
    "publisherUrl": "https://clawhub.ai/rishavmukherji/farcaster-agent",
    "owner": "rishavmukherji",
    "version": "1.2.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/farcaster-agent",
    "downloadUrl": "https://openagent3.xyz/downloads/farcaster-agent",
    "agentUrl": "https://openagent3.xyz/skills/farcaster-agent/agent",
    "manifestUrl": "https://openagent3.xyz/skills/farcaster-agent/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/farcaster-agent/agent.md"
  }
}