{
  "schemaVersion": "1.0",
  "item": {
    "slug": "grok",
    "name": "xAI Grok Search",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/castanley/grok",
    "canonicalUrl": "https://clawhub.ai/castanley/grok",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/grok",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=grok",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "search.mjs"
    ],
    "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-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-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/grok"
    },
    "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/grok",
    "agentPageUrl": "https://openagent3.xyz/skills/grok/agent",
    "manifestUrl": "https://openagent3.xyz/skills/grok/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/grok/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": "xAI Grok Search",
        "body": "Search the web and X (Twitter) using xAI's Grok API with real-time internet access, citations, and optional image/video understanding."
      },
      {
        "title": "Use Web Search For:",
        "body": "Current information from websites, news articles, documentation\nReal-time data (stock prices, weather, recent events)\nResearch topics with up-to-date web sources\nFinding information from specific websites/domains\nVerifying current facts"
      },
      {
        "title": "Use X Search For:",
        "body": "What people are saying on X/Twitter about a topic\nTrending discussions and social sentiment\nReal-time reactions to events\nPosts from specific X handles/users\nRecent social media activity within date ranges\n\nDo NOT use for:\n\nHistorical facts that won't change\nGeneral knowledge already available\nMathematical calculations\nCode generation\nCreative writing"
      },
      {
        "title": "Required Environment Variables",
        "body": "export XAI_API_KEY=\"your-xai-api-key-here\"\n\nGet your API key from: https://console.x.ai/"
      },
      {
        "title": "Usage",
        "body": "The agent will automatically choose the right tool based on the user's query:\n\nUser: \"What's the latest news about AI regulation?\"\n→ Uses web_search\n\nUser: \"What are people saying about OpenAI on X?\"\n→ Uses x_search"
      },
      {
        "title": "Function: search_web",
        "body": "Search the web using xAI's Grok API.\n\nParameters:\n\nquery (required): Search query string\nmodel (optional): Model to use (default: \"grok-4-1-fast-reasoning\")\nallowed_domains (optional): Array of domains to restrict search (max 5)\nexcluded_domains (optional): Array of domains to exclude (max 5)\nenable_image_understanding (optional): Enable image analysis (default: false)\n\nReturns:\n\ncontent: The search response text\ncitations: Array of sources with url, title, and snippet\nusage: Token usage statistics"
      },
      {
        "title": "Function: search_x",
        "body": "Search X (Twitter) using xAI's Grok API.\n\nParameters:\n\nquery (required): Search query string\nmodel (optional): Model to use (default: \"grok-4-1-fast-reasoning\")\nallowed_x_handles (optional): Array of X handles to search (max 10, without @)\nexcluded_x_handles (optional): Array of X handles to exclude (max 10, without @)\nfrom_date (optional): Start date in ISO8601 format (YYYY-MM-DD)\nto_date (optional): End date in ISO8601 format (YYYY-MM-DD)\nenable_image_understanding (optional): Enable image analysis (default: false)\nenable_video_understanding (optional): Enable video analysis (default: false)\n\nReturns:\n\ncontent: The search response text\ncitations: Array of X posts with url, title, and snippet\nusage: Token usage statistics"
      },
      {
        "title": "Implementation",
        "body": "This skill uses the xAI Responses API (/v1/responses endpoint)."
      },
      {
        "title": "Web Search",
        "body": "async function search_web(options) {\n  const { query, model = 'grok-4-1-fast-reasoning', \n          allowed_domains, excluded_domains, enable_image_understanding } = options;\n\n  const tool = { type: 'web_search' };\n  if (allowed_domains) tool.allowed_domains = allowed_domains;\n  if (excluded_domains) tool.excluded_domains = excluded_domains;\n  if (enable_image_understanding) tool.enable_image_understanding = true;\n\n  const response = await fetch('https://api.x.ai/v1/responses', {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json',\n      'Authorization': `Bearer ${process.env.XAI_API_KEY}`\n    },\n    body: JSON.stringify({\n      model,\n      input: [{ role: 'user', content: query }],\n      tools: [tool]\n    })\n  });\n\n  const data = await response.json();\n  return { \n    content: data.output[data.output.length - 1].content,\n    citations: data.citations \n  };\n}"
      },
      {
        "title": "X Search",
        "body": "async function search_x(options) {\n  const { query, model = 'grok-4-1-fast-reasoning',\n          allowed_x_handles, excluded_x_handles, from_date, to_date,\n          enable_image_understanding, enable_video_understanding } = options;\n\n  const tool = { type: 'x_search' };\n  if (allowed_x_handles) tool.allowed_x_handles = allowed_x_handles;\n  if (excluded_x_handles) tool.excluded_x_handles = excluded_x_handles;\n  if (from_date) tool.from_date = from_date;\n  if (to_date) tool.to_date = to_date;\n  if (enable_image_understanding) tool.enable_image_understanding = true;\n  if (enable_video_understanding) tool.enable_video_understanding = true;\n\n  const response = await fetch('https://api.x.ai/v1/responses', {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json',\n      'Authorization': `Bearer ${process.env.XAI_API_KEY}`\n    },\n    body: JSON.stringify({\n      model,\n      input: [{ role: 'user', content: query }],\n      tools: [tool]\n    })\n  });\n\n  const data = await response.json();\n  return { \n    content: data.output[data.output.length - 1].content,\n    citations: data.citations \n  };\n}"
      },
      {
        "title": "Web Search - Current Events",
        "body": "const result = await search_web({ \n  query: \"latest AI regulation developments\" \n});"
      },
      {
        "title": "Web Search - Specific Domains",
        "body": "const result = await search_web({\n  query: \"UN climate summit latest\",\n  allowed_domains: [\"un.org\", \"gov.uk\", \"grokipedia.com\"]\n});"
      },
      {
        "title": "X Search - Social Sentiment",
        "body": "const result = await search_x({\n  query: \"new iPhone reactions opinions\"\n});"
      },
      {
        "title": "X Search - Specific Handles",
        "body": "const result = await search_x({\n  query: \"AI thoughts\",\n  allowed_x_handles: [\"elonmusk\", \"cstanley\"],\n  from_date: \"2025-01-01\"\n});"
      },
      {
        "title": "X Search - With Media",
        "body": "const result = await search_x({\n  query: \"Mars landing images\",\n  enable_image_understanding: true,\n  enable_video_understanding: true\n});"
      },
      {
        "title": "Web Search",
        "body": "Use allowed_domains to limit to specific domains (max 5)\nUse excluded_domains for known bad sources (max 5)\nCannot use both at same time\nEnable image understanding only when needed"
      },
      {
        "title": "X Search",
        "body": "Use allowed_x_handles to focus on specific accounts (max 10)\nUse excluded_x_handles to filter noise (max 10)\nCannot use both at same time\nDon't include @ symbol in handles\nUse ISO8601 date format: YYYY-MM-DD\nMedia understanding adds API costs"
      },
      {
        "title": "\"XAI_API_KEY not found\"",
        "body": "export XAI_API_KEY=\"your-key-here\""
      },
      {
        "title": "Rate Limiting",
        "body": "Implement exponential backoff\nCache frequent queries"
      },
      {
        "title": "Poor Results",
        "body": "Add domain/handle filters\nMake queries more specific\nNarrow date ranges"
      },
      {
        "title": "Slow Responses",
        "body": "Search queries using reasoning models (e.g. grok-4-1-fast-reasoning) can take 30-60+ seconds to return, especially when the model performs multiple web or X searches. If the search is lagging, inform the user that results are still loading and ask them to type \"poll\" to check for the completed response."
      },
      {
        "title": "API Documentation",
        "body": "Web Search: https://docs.x.ai/developers/tools/web-search\nX Search: https://docs.x.ai/developers/tools/x-search"
      }
    ],
    "body": "xAI Grok Search\n\nSearch the web and X (Twitter) using xAI's Grok API with real-time internet access, citations, and optional image/video understanding.\n\nWhen to Use This Skill\nUse Web Search For:\nCurrent information from websites, news articles, documentation\nReal-time data (stock prices, weather, recent events)\nResearch topics with up-to-date web sources\nFinding information from specific websites/domains\nVerifying current facts\nUse X Search For:\nWhat people are saying on X/Twitter about a topic\nTrending discussions and social sentiment\nReal-time reactions to events\nPosts from specific X handles/users\nRecent social media activity within date ranges\n\nDo NOT use for:\n\nHistorical facts that won't change\nGeneral knowledge already available\nMathematical calculations\nCode generation\nCreative writing\nSetup\nRequired Environment Variables\nexport XAI_API_KEY=\"your-xai-api-key-here\"\n\n\nGet your API key from: https://console.x.ai/\n\nUsage\n\nThe agent will automatically choose the right tool based on the user's query:\n\nUser: \"What's the latest news about AI regulation?\" → Uses web_search\n\nUser: \"What are people saying about OpenAI on X?\" → Uses x_search\n\nAPI Reference\nFunction: search_web\n\nSearch the web using xAI's Grok API.\n\nParameters:\n\nquery (required): Search query string\nmodel (optional): Model to use (default: \"grok-4-1-fast-reasoning\")\nallowed_domains (optional): Array of domains to restrict search (max 5)\nexcluded_domains (optional): Array of domains to exclude (max 5)\nenable_image_understanding (optional): Enable image analysis (default: false)\n\nReturns:\n\ncontent: The search response text\ncitations: Array of sources with url, title, and snippet\nusage: Token usage statistics\nFunction: search_x\n\nSearch X (Twitter) using xAI's Grok API.\n\nParameters:\n\nquery (required): Search query string\nmodel (optional): Model to use (default: \"grok-4-1-fast-reasoning\")\nallowed_x_handles (optional): Array of X handles to search (max 10, without @)\nexcluded_x_handles (optional): Array of X handles to exclude (max 10, without @)\nfrom_date (optional): Start date in ISO8601 format (YYYY-MM-DD)\nto_date (optional): End date in ISO8601 format (YYYY-MM-DD)\nenable_image_understanding (optional): Enable image analysis (default: false)\nenable_video_understanding (optional): Enable video analysis (default: false)\n\nReturns:\n\ncontent: The search response text\ncitations: Array of X posts with url, title, and snippet\nusage: Token usage statistics\nImplementation\n\nThis skill uses the xAI Responses API (/v1/responses endpoint).\n\nWeb Search\nasync function search_web(options) {\n  const { query, model = 'grok-4-1-fast-reasoning', \n          allowed_domains, excluded_domains, enable_image_understanding } = options;\n\n  const tool = { type: 'web_search' };\n  if (allowed_domains) tool.allowed_domains = allowed_domains;\n  if (excluded_domains) tool.excluded_domains = excluded_domains;\n  if (enable_image_understanding) tool.enable_image_understanding = true;\n\n  const response = await fetch('https://api.x.ai/v1/responses', {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json',\n      'Authorization': `Bearer ${process.env.XAI_API_KEY}`\n    },\n    body: JSON.stringify({\n      model,\n      input: [{ role: 'user', content: query }],\n      tools: [tool]\n    })\n  });\n\n  const data = await response.json();\n  return { \n    content: data.output[data.output.length - 1].content,\n    citations: data.citations \n  };\n}\n\nX Search\nasync function search_x(options) {\n  const { query, model = 'grok-4-1-fast-reasoning',\n          allowed_x_handles, excluded_x_handles, from_date, to_date,\n          enable_image_understanding, enable_video_understanding } = options;\n\n  const tool = { type: 'x_search' };\n  if (allowed_x_handles) tool.allowed_x_handles = allowed_x_handles;\n  if (excluded_x_handles) tool.excluded_x_handles = excluded_x_handles;\n  if (from_date) tool.from_date = from_date;\n  if (to_date) tool.to_date = to_date;\n  if (enable_image_understanding) tool.enable_image_understanding = true;\n  if (enable_video_understanding) tool.enable_video_understanding = true;\n\n  const response = await fetch('https://api.x.ai/v1/responses', {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json',\n      'Authorization': `Bearer ${process.env.XAI_API_KEY}`\n    },\n    body: JSON.stringify({\n      model,\n      input: [{ role: 'user', content: query }],\n      tools: [tool]\n    })\n  });\n\n  const data = await response.json();\n  return { \n    content: data.output[data.output.length - 1].content,\n    citations: data.citations \n  };\n}\n\nExamples\nWeb Search - Current Events\nconst result = await search_web({ \n  query: \"latest AI regulation developments\" \n});\n\nWeb Search - Specific Domains\nconst result = await search_web({\n  query: \"UN climate summit latest\",\n  allowed_domains: [\"un.org\", \"gov.uk\", \"grokipedia.com\"]\n});\n\nX Search - Social Sentiment\nconst result = await search_x({\n  query: \"new iPhone reactions opinions\"\n});\n\nX Search - Specific Handles\nconst result = await search_x({\n  query: \"AI thoughts\",\n  allowed_x_handles: [\"elonmusk\", \"cstanley\"],\n  from_date: \"2025-01-01\"\n});\n\nX Search - With Media\nconst result = await search_x({\n  query: \"Mars landing images\",\n  enable_image_understanding: true,\n  enable_video_understanding: true\n});\n\nBest Practices\nWeb Search\nUse allowed_domains to limit to specific domains (max 5)\nUse excluded_domains for known bad sources (max 5)\nCannot use both at same time\nEnable image understanding only when needed\nX Search\nUse allowed_x_handles to focus on specific accounts (max 10)\nUse excluded_x_handles to filter noise (max 10)\nCannot use both at same time\nDon't include @ symbol in handles\nUse ISO8601 date format: YYYY-MM-DD\nMedia understanding adds API costs\nTroubleshooting\n\"XAI_API_KEY not found\"\nexport XAI_API_KEY=\"your-key-here\"\n\nRate Limiting\nImplement exponential backoff\nCache frequent queries\nPoor Results\nAdd domain/handle filters\nMake queries more specific\nNarrow date ranges\nSlow Responses\n\nSearch queries using reasoning models (e.g. grok-4-1-fast-reasoning) can take 30-60+ seconds to return, especially when the model performs multiple web or X searches. If the search is lagging, inform the user that results are still loading and ask them to type \"poll\" to check for the completed response.\n\nAPI Documentation\nWeb Search: https://docs.x.ai/developers/tools/web-search\nX Search: https://docs.x.ai/developers/tools/x-search"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/castanley/grok",
    "publisherUrl": "https://clawhub.ai/castanley/grok",
    "owner": "castanley",
    "version": "1.0.3",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/grok",
    "downloadUrl": "https://openagent3.xyz/downloads/grok",
    "agentUrl": "https://openagent3.xyz/skills/grok/agent",
    "manifestUrl": "https://openagent3.xyz/skills/grok/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/grok/agent.md"
  }
}