{
  "schemaVersion": "1.0",
  "item": {
    "slug": "xai-plus",
    "name": "xAI Plus",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/mischasigtermans/xai-plus",
    "canonicalUrl": "https://clawhub.ai/mischasigtermans/xai-plus",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/xai-plus",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=xai-plus",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/grok_search.mjs",
      "scripts/chat.mjs",
      "scripts/models.mjs",
      "scripts/analyze.mjs",
      "references/analysis-prompts.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-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/xai-plus"
    },
    "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/xai-plus",
    "agentPageUrl": "https://openagent3.xyz/skills/xai-plus/agent",
    "manifestUrl": "https://openagent3.xyz/skills/xai-plus/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/xai-plus/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 Skill",
        "body": "Search X (Twitter), search the web, chat with Grok models (including vision), and analyze X content patterns using xAI's API."
      },
      {
        "title": "Features",
        "body": "X Search: Search posts, threads, and accounts with date/handle filters\nWeb Search: Search the web via Grok's web_search tool\nChat: Text and vision (image analysis) with Grok models\nAnalysis: Voice patterns, trend research, post safety checks\nModels: List available xAI models"
      },
      {
        "title": "API Key",
        "body": "Get your xAI API key from console.x.ai.\n\n# Via clawdbot config (recommended)\nclawdbot config set skills.entries.xai-plus.apiKey \"xai-YOUR-KEY\"\n\n# Or environment variable\nexport XAI_API_KEY=\"xai-YOUR-KEY\"\n\nThe scripts check these locations in order:\n\nXAI_API_KEY env var\n~/.clawdbot/clawdbot.json → env.XAI_API_KEY\n~/.clawdbot/clawdbot.json → skills.entries.xai-plus.apiKey\n~/.clawdbot/clawdbot.json → skills.entries[\"grok-search\"].apiKey (fallback)"
      },
      {
        "title": "Default Model (Optional)",
        "body": "Override the default model (grok-4-1-fast):\n\n# Via config\nclawdbot config set skills.entries.xai-plus.model \"grok-3\"\n\n# Or environment variable\nexport XAI_MODEL=\"grok-3\"\n\nModel priority:\n\nCommand-line --model flag (highest priority)\nXAI_MODEL env var\n~/.clawdbot/clawdbot.json → env.XAI_MODEL\n~/.clawdbot/clawdbot.json → skills.entries.xai-plus.model\nDefault: grok-4-1-fast"
      },
      {
        "title": "X Search",
        "body": "Search X posts and threads with optional filters.\n\nBasic search:\n\nnode {baseDir}/scripts/grok_search.mjs \"query\" --x\n\nWith date filter:\n\n# Last 7 days\nnode {baseDir}/scripts/grok_search.mjs \"Claude AI\" --x --days 7\n\n# Specific date range\nnode {baseDir}/scripts/grok_search.mjs \"AI agents\" --x --from 2026-01-01 --to 2026-01-31\n\nFilter by handles:\n\n# Only from specific accounts\nnode {baseDir}/scripts/grok_search.mjs \"AI news\" --x --handles @AnthropicAI,@OpenAI\n\n# Exclude accounts\nnode {baseDir}/scripts/grok_search.mjs \"GPT\" --x --exclude @spam1,@spam2\n\nOutput formats:\n\n# JSON (default, agent-friendly)\nnode {baseDir}/scripts/grok_search.mjs \"query\" --x\n\n# Links only\nnode {baseDir}/scripts/grok_search.mjs \"query\" --x --links-only\n\n# Human-readable text\nnode {baseDir}/scripts/grok_search.mjs \"query\" --x --text\n\nJSON output schema:\n\n{\n  \"query\": \"search query\",\n  \"mode\": \"x\",\n  \"results\": [\n    {\n      \"title\": \"@handle\",\n      \"url\": \"https://x.com/handle/status/123\",\n      \"snippet\": \"Post text...\",\n      \"author\": \"@handle\",\n      \"posted_at\": \"2026-01-15T10:30:00Z\"\n    }\n  ],\n  \"citations\": [\"https://x.com/...\"]\n}"
      },
      {
        "title": "Web Search",
        "body": "Search the web via Grok.\n\nnode {baseDir}/scripts/grok_search.mjs \"TypeScript best practices 2026\" --web\n\nJSON output schema:\n\n{\n  \"query\": \"search query\",\n  \"mode\": \"web\",\n  \"results\": [\n    {\n      \"title\": \"Page title\",\n      \"url\": \"https://example.com/page\",\n      \"snippet\": \"Description...\",\n      \"author\": null,\n      \"posted_at\": null\n    }\n  ],\n  \"citations\": [\"https://example.com/...\"]\n}"
      },
      {
        "title": "Search Options",
        "body": "FlagDescriptionExample--xSearch X/TwitterRequired for X search--webSearch the webRequired for web search--days NLast N days (X only)--days 7--from YYYY-MM-DDStart date (X only)--from 2026-01-01--to YYYY-MM-DDEnd date (X only)--to 2026-01-31--handles a,bOnly these accounts (X only)--handles @user1,@user2--exclude a,bExclude accounts (X only)--exclude @spam--max NMax results--max 20--model IDOverride model--model grok-3--jsonJSON output (default)---links-onlyJust URLs---textHuman-readable---rawInclude debug output-\n\nSee references/search-patterns.md for advanced query patterns and optimization tips."
      },
      {
        "title": "Text Chat",
        "body": "Ask Grok anything.\n\nnode {baseDir}/scripts/chat.mjs \"What is quantum computing?\"\n\nWith model override:\n\nnode {baseDir}/scripts/chat.mjs --model grok-3 \"Explain transformers in ML\"\n\nJSON output:\n\nnode {baseDir}/scripts/chat.mjs --json \"What is TypeScript?\"\n\nJSON schema:\n\n{\n  \"model\": \"grok-4-1-fast\",\n  \"prompt\": \"What is TypeScript?\",\n  \"text\": \"TypeScript is...\",\n  \"citations\": [\"https://...\"]\n}"
      },
      {
        "title": "Vision Chat",
        "body": "Analyze images with Grok.\n\nnode {baseDir}/scripts/chat.mjs --image ./screenshot.png \"What's in this image?\"\n\nMultiple images:\n\nnode {baseDir}/scripts/chat.mjs --image ./pic1.jpg --image ./pic2.jpg \"Compare these\"\n\nSupported formats: JPG, PNG, WebP, GIF"
      },
      {
        "title": "Chat Options",
        "body": "FlagDescriptionExample--model IDModel to use--model grok-2-vision-1212--image PATHAttach image (can repeat)--image ./pic.jpg--jsonJSON output---rawInclude debug output-\n\nSee references/models.md for model comparison and capabilities."
      },
      {
        "title": "Analysis",
        "body": "Analyze X content for voice patterns, trends, and post quality."
      },
      {
        "title": "Voice Analysis",
        "body": "Analyze an account's voice and writing patterns.\n\nnode {baseDir}/scripts/analyze.mjs voice @username\n\nCustom date range:\n\n# Last 60 days\nnode {baseDir}/scripts/analyze.mjs voice @username --days 60\n\nJSON output schema:\n\n{\n  \"handle\": \"@username\",\n  \"analyzed_posts\": 150,\n  \"voice\": {\n    \"tone\": \"casual, technical\",\n    \"personality\": [\"curious\", \"direct\", \"helpful\"],\n    \"perspective\": \"practitioner sharing lessons\",\n    \"energy_level\": \"medium\"\n  },\n  \"patterns\": {\n    \"sentence_structure\": [\"short declarative\", \"occasional fragments\"],\n    \"vocabulary\": [\"technical\", \"accessible\"],\n    \"formatting_quirks\": [\"line breaks for emphasis\", \"minimal punctuation\"],\n    \"recurring_phrases\": [\"here's the thing\", \"turns out\"]\n  },\n  \"topics\": [\"AI\", \"software engineering\", \"startups\"],\n  \"best_posts\": [\n    {\n      \"url\": \"https://x.com/username/status/123\",\n      \"text\": \"Post text...\",\n      \"why\": \"Authentic voice, specific example\"\n    }\n  ],\n  \"anti_patterns\": [\"never uses em-dashes\", \"avoids numbered lists\"]\n}"
      },
      {
        "title": "Trend Research",
        "body": "Research trends and discussions about a topic.\n\nnode {baseDir}/scripts/analyze.mjs trends \"AI agents\"\n\nJSON output schema:\n\n{\n  \"topic\": \"AI agents\",\n  \"trends\": [\n    {\n      \"pattern\": \"Shift from chatbots to autonomous agents\",\n      \"description\": \"Discussion focuses on...\",\n      \"example_posts\": [\"https://x.com/...\"]\n    }\n  ],\n  \"perspectives\": [\n    {\n      \"viewpoint\": \"Agents will replace most SaaS\",\n      \"supporters\": [\"@user1\", \"@user2\"]\n    }\n  ],\n  \"hashtags\": [\"#AIAgents\", \"#AutonomousAI\"],\n  \"key_accounts\": [\"@researcher1\", \"@founder2\"],\n  \"posting_angles\": [\n    {\n      \"angle\": \"Practical implementation challenges\",\n      \"hook\": \"Everyone talks about AI agents. Nobody talks about...\",\n      \"target_audience\": \"Engineers building with AI\"\n    }\n  ]\n}"
      },
      {
        "title": "Post Safety Check",
        "body": "Check a draft post or existing post for AI signals and platform flag patterns.\n\nCheck draft text:\n\nnode {baseDir}/scripts/analyze.mjs post \"Your draft post text here\"\n\nCheck existing post:\n\nnode {baseDir}/scripts/analyze.mjs post --url \"https://x.com/user/status/123\"\n\nJSON output schema:\n\n{\n  \"post_text\": \"Your post...\",\n  \"ai_detection_score\": 3,\n  \"ai_signals\": [\n    \"Contains em-dash\",\n    \"Ends with engagement bait question\"\n  ],\n  \"platform_flag_score\": 2,\n  \"platform_risks\": [\n    \"Generic question could trigger spam filter\"\n  ],\n  \"quality_score\": 7,\n  \"suggestions\": [\n    \"Replace em-dash with period or comma\",\n    \"Remove 'What do you think?' closer\",\n    \"Add specific personal detail\"\n  ]\n}\n\nScoring:\n\nAI Detection: 0-10 (10 = definitely AI)\nPlatform Flag Risk: 0-10 (10 = high spam risk)\nQuality: 0-10 (10 = excellent)"
      },
      {
        "title": "Analysis Options",
        "body": "FlagDescriptionExample--days NDate range for analysis--days 60--url URLAnalyze existing post--url https://x.com/...--model IDOverride model--model grok-3--jsonJSON output---rawInclude debug output-\n\nSee references/analysis-prompts.md for detailed prompt structures and scoring criteria."
      },
      {
        "title": "Models",
        "body": "List available xAI models.\n\nnode {baseDir}/scripts/models.mjs\n\nOutput:\n\ngrok-2-vision-1212\ngrok-3\ngrok-4-1-fast\ngrok-4-fast\n\nJSON output:\n\nnode {baseDir}/scripts/models.mjs --json\n\nQuick model comparison:\n\nModelSpeedQualityVisionBest Forgrok-4-1-fastFastGoodNoDefault (search, chat, analysis)grok-4-fastFastGoodNoAlternative fast modelgrok-3SlowerBestNoComplex reasoning, detailed analysisgrok-2-vision-1212MediumGoodYesImage analysis\n\nSee references/models.md for detailed model capabilities and use cases."
      },
      {
        "title": "Citation Deduplication",
        "body": "For X searches, the tool automatically deduplicates tweet URLs, preferring canonical /@handle/status/id over /i/status/id format."
      },
      {
        "title": "Custom Model Selection",
        "body": "Override the default model for any operation:\n\n# Search with grok-3 for better quality\nnode {baseDir}/scripts/grok_search.mjs \"complex query\" --x --model grok-3\n\n# Chat with vision model\nnode {baseDir}/scripts/chat.mjs --model grok-2-vision-1212 --image pic.jpg \"Describe\"\n\n# Analysis with grok-3 for deeper insights\nnode {baseDir}/scripts/analyze.mjs voice @username --model grok-3"
      },
      {
        "title": "Debugging",
        "body": "Add --raw to any command to see the full API response:\n\nnode {baseDir}/scripts/grok_search.mjs \"query\" --x --raw"
      },
      {
        "title": "Reference Documentation",
        "body": "API Reference - xAI API endpoints and parameters\nSearch Patterns - Query patterns, filters, optimization tips\nModels - Model comparison and capabilities\nAnalysis Prompts - Structured prompts and scoring criteria\nX Algorithm - Ranking, engagement weights, spam detection"
      },
      {
        "title": "Research a topic",
        "body": "# Find recent discussions\nnode {baseDir}/scripts/grok_search.mjs \"Claude Sonnet 4.5\" --x --days 3\n\n# Get trend analysis\nnode {baseDir}/scripts/analyze.mjs trends \"Claude Sonnet 4.5\""
      },
      {
        "title": "Analyze voice before drafting",
        "body": "# Study the target account\nnode {baseDir}/scripts/analyze.mjs voice @target_account --days 30\n\n# Check your draft\nnode {baseDir}/scripts/analyze.mjs post \"Your draft here\""
      },
      {
        "title": "Multi-modal research",
        "body": "# Search web for context\nnode {baseDir}/scripts/grok_search.mjs \"TypeScript 5.7 features\" --web\n\n# Ask follow-up\nnode {baseDir}/scripts/chat.mjs \"What are the key TypeScript 5.7 improvements?\"\n\n# Analyze screenshot\nnode {baseDir}/scripts/chat.mjs --image ./code.png \"Review this code\""
      },
      {
        "title": "Error Handling",
        "body": "Common errors and solutions:\n\nMissing API key:\n\nMissing XAI_API_KEY\n\n→ Set XAI_API_KEY environment variable or add to ~/.clawdbot/clawdbot.json\n\nInvalid mode:\n\nMust specify --web or --x\n\n→ Add --web or --x flag to search command\n\nImage format error:\n\nUnsupported image type\n\n→ Use JPG, PNG, WebP, or GIF format\n\nAPI error:\n\nxAI API error: 401 Unauthorized\n\n→ Check API key is valid and active"
      },
      {
        "title": "Tips",
        "body": "Default model (grok-4-1-fast) is fast and good for most tasks\nUse grok-3 for complex analysis or when quality matters more than speed\nX searches are limited by recency (xAI x_search tool constraints)\nWeb searches work best with specific, current queries\nVoice analysis needs sufficient post history (30+ posts recommended)\nPost safety checks are advisory; use judgment for final decisions\nJSON output is best for agent/script consumption\nText output is better for terminal/human reading"
      },
      {
        "title": "Troubleshooting",
        "body": "No results from X search:\n\nTry broader query or longer date range\nCheck if handles exist and are public\nRemove overly restrictive filters\n\nVoice analysis incomplete:\n\nIncrease --days to get more post history\nCheck if account is public and active\nVerify handle is correct (with or without @)\n\nAPI rate limits:\n\nxAI enforces rate limits per API key\nSpread requests over time if hitting limits\nConsider upgrading xAI plan for higher limits"
      },
      {
        "title": "Content Writing Workflow",
        "body": "Use the analysis tools to improve your X content:\n\n# Research before writing\nnode {baseDir}/scripts/analyze.mjs trends \"your topic\"\nnode {baseDir}/scripts/grok_search.mjs \"your topic\" --x --days 7\n\n# Study voice patterns\nnode {baseDir}/scripts/analyze.mjs voice @target_account\n\n# Check draft before posting\nnode {baseDir}/scripts/analyze.mjs post \"$(cat draft.txt)\"\n\nUse the JSON output to:\n\nResearch current discussions and posting angles\nLearn from successful voices in your niche\nCatch AI signals and platform flags before publishing"
      }
    ],
    "body": "xAI Skill\n\nSearch X (Twitter), search the web, chat with Grok models (including vision), and analyze X content patterns using xAI's API.\n\nFeatures\nX Search: Search posts, threads, and accounts with date/handle filters\nWeb Search: Search the web via Grok's web_search tool\nChat: Text and vision (image analysis) with Grok models\nAnalysis: Voice patterns, trend research, post safety checks\nModels: List available xAI models\nSetup\nAPI Key\n\nGet your xAI API key from console.x.ai.\n\n# Via clawdbot config (recommended)\nclawdbot config set skills.entries.xai-plus.apiKey \"xai-YOUR-KEY\"\n\n# Or environment variable\nexport XAI_API_KEY=\"xai-YOUR-KEY\"\n\n\nThe scripts check these locations in order:\n\nXAI_API_KEY env var\n~/.clawdbot/clawdbot.json → env.XAI_API_KEY\n~/.clawdbot/clawdbot.json → skills.entries.xai-plus.apiKey\n~/.clawdbot/clawdbot.json → skills.entries[\"grok-search\"].apiKey (fallback)\nDefault Model (Optional)\n\nOverride the default model (grok-4-1-fast):\n\n# Via config\nclawdbot config set skills.entries.xai-plus.model \"grok-3\"\n\n# Or environment variable\nexport XAI_MODEL=\"grok-3\"\n\n\nModel priority:\n\nCommand-line --model flag (highest priority)\nXAI_MODEL env var\n~/.clawdbot/clawdbot.json → env.XAI_MODEL\n~/.clawdbot/clawdbot.json → skills.entries.xai-plus.model\nDefault: grok-4-1-fast\nSearch\nX Search\n\nSearch X posts and threads with optional filters.\n\nBasic search:\n\nnode {baseDir}/scripts/grok_search.mjs \"query\" --x\n\n\nWith date filter:\n\n# Last 7 days\nnode {baseDir}/scripts/grok_search.mjs \"Claude AI\" --x --days 7\n\n# Specific date range\nnode {baseDir}/scripts/grok_search.mjs \"AI agents\" --x --from 2026-01-01 --to 2026-01-31\n\n\nFilter by handles:\n\n# Only from specific accounts\nnode {baseDir}/scripts/grok_search.mjs \"AI news\" --x --handles @AnthropicAI,@OpenAI\n\n# Exclude accounts\nnode {baseDir}/scripts/grok_search.mjs \"GPT\" --x --exclude @spam1,@spam2\n\n\nOutput formats:\n\n# JSON (default, agent-friendly)\nnode {baseDir}/scripts/grok_search.mjs \"query\" --x\n\n# Links only\nnode {baseDir}/scripts/grok_search.mjs \"query\" --x --links-only\n\n# Human-readable text\nnode {baseDir}/scripts/grok_search.mjs \"query\" --x --text\n\n\nJSON output schema:\n\n{\n  \"query\": \"search query\",\n  \"mode\": \"x\",\n  \"results\": [\n    {\n      \"title\": \"@handle\",\n      \"url\": \"https://x.com/handle/status/123\",\n      \"snippet\": \"Post text...\",\n      \"author\": \"@handle\",\n      \"posted_at\": \"2026-01-15T10:30:00Z\"\n    }\n  ],\n  \"citations\": [\"https://x.com/...\"]\n}\n\nWeb Search\n\nSearch the web via Grok.\n\nnode {baseDir}/scripts/grok_search.mjs \"TypeScript best practices 2026\" --web\n\n\nJSON output schema:\n\n{\n  \"query\": \"search query\",\n  \"mode\": \"web\",\n  \"results\": [\n    {\n      \"title\": \"Page title\",\n      \"url\": \"https://example.com/page\",\n      \"snippet\": \"Description...\",\n      \"author\": null,\n      \"posted_at\": null\n    }\n  ],\n  \"citations\": [\"https://example.com/...\"]\n}\n\nSearch Options\nFlag\tDescription\tExample\n--x\tSearch X/Twitter\tRequired for X search\n--web\tSearch the web\tRequired for web search\n--days N\tLast N days (X only)\t--days 7\n--from YYYY-MM-DD\tStart date (X only)\t--from 2026-01-01\n--to YYYY-MM-DD\tEnd date (X only)\t--to 2026-01-31\n--handles a,b\tOnly these accounts (X only)\t--handles @user1,@user2\n--exclude a,b\tExclude accounts (X only)\t--exclude @spam\n--max N\tMax results\t--max 20\n--model ID\tOverride model\t--model grok-3\n--json\tJSON output (default)\t-\n--links-only\tJust URLs\t-\n--text\tHuman-readable\t-\n--raw\tInclude debug output\t-\n\nSee references/search-patterns.md for advanced query patterns and optimization tips.\n\nChat\nText Chat\n\nAsk Grok anything.\n\nnode {baseDir}/scripts/chat.mjs \"What is quantum computing?\"\n\n\nWith model override:\n\nnode {baseDir}/scripts/chat.mjs --model grok-3 \"Explain transformers in ML\"\n\n\nJSON output:\n\nnode {baseDir}/scripts/chat.mjs --json \"What is TypeScript?\"\n\n\nJSON schema:\n\n{\n  \"model\": \"grok-4-1-fast\",\n  \"prompt\": \"What is TypeScript?\",\n  \"text\": \"TypeScript is...\",\n  \"citations\": [\"https://...\"]\n}\n\nVision Chat\n\nAnalyze images with Grok.\n\nnode {baseDir}/scripts/chat.mjs --image ./screenshot.png \"What's in this image?\"\n\n\nMultiple images:\n\nnode {baseDir}/scripts/chat.mjs --image ./pic1.jpg --image ./pic2.jpg \"Compare these\"\n\n\nSupported formats: JPG, PNG, WebP, GIF\n\nChat Options\nFlag\tDescription\tExample\n--model ID\tModel to use\t--model grok-2-vision-1212\n--image PATH\tAttach image (can repeat)\t--image ./pic.jpg\n--json\tJSON output\t-\n--raw\tInclude debug output\t-\n\nSee references/models.md for model comparison and capabilities.\n\nAnalysis\n\nAnalyze X content for voice patterns, trends, and post quality.\n\nVoice Analysis\n\nAnalyze an account's voice and writing patterns.\n\nnode {baseDir}/scripts/analyze.mjs voice @username\n\n\nCustom date range:\n\n# Last 60 days\nnode {baseDir}/scripts/analyze.mjs voice @username --days 60\n\n\nJSON output schema:\n\n{\n  \"handle\": \"@username\",\n  \"analyzed_posts\": 150,\n  \"voice\": {\n    \"tone\": \"casual, technical\",\n    \"personality\": [\"curious\", \"direct\", \"helpful\"],\n    \"perspective\": \"practitioner sharing lessons\",\n    \"energy_level\": \"medium\"\n  },\n  \"patterns\": {\n    \"sentence_structure\": [\"short declarative\", \"occasional fragments\"],\n    \"vocabulary\": [\"technical\", \"accessible\"],\n    \"formatting_quirks\": [\"line breaks for emphasis\", \"minimal punctuation\"],\n    \"recurring_phrases\": [\"here's the thing\", \"turns out\"]\n  },\n  \"topics\": [\"AI\", \"software engineering\", \"startups\"],\n  \"best_posts\": [\n    {\n      \"url\": \"https://x.com/username/status/123\",\n      \"text\": \"Post text...\",\n      \"why\": \"Authentic voice, specific example\"\n    }\n  ],\n  \"anti_patterns\": [\"never uses em-dashes\", \"avoids numbered lists\"]\n}\n\nTrend Research\n\nResearch trends and discussions about a topic.\n\nnode {baseDir}/scripts/analyze.mjs trends \"AI agents\"\n\n\nJSON output schema:\n\n{\n  \"topic\": \"AI agents\",\n  \"trends\": [\n    {\n      \"pattern\": \"Shift from chatbots to autonomous agents\",\n      \"description\": \"Discussion focuses on...\",\n      \"example_posts\": [\"https://x.com/...\"]\n    }\n  ],\n  \"perspectives\": [\n    {\n      \"viewpoint\": \"Agents will replace most SaaS\",\n      \"supporters\": [\"@user1\", \"@user2\"]\n    }\n  ],\n  \"hashtags\": [\"#AIAgents\", \"#AutonomousAI\"],\n  \"key_accounts\": [\"@researcher1\", \"@founder2\"],\n  \"posting_angles\": [\n    {\n      \"angle\": \"Practical implementation challenges\",\n      \"hook\": \"Everyone talks about AI agents. Nobody talks about...\",\n      \"target_audience\": \"Engineers building with AI\"\n    }\n  ]\n}\n\nPost Safety Check\n\nCheck a draft post or existing post for AI signals and platform flag patterns.\n\nCheck draft text:\n\nnode {baseDir}/scripts/analyze.mjs post \"Your draft post text here\"\n\n\nCheck existing post:\n\nnode {baseDir}/scripts/analyze.mjs post --url \"https://x.com/user/status/123\"\n\n\nJSON output schema:\n\n{\n  \"post_text\": \"Your post...\",\n  \"ai_detection_score\": 3,\n  \"ai_signals\": [\n    \"Contains em-dash\",\n    \"Ends with engagement bait question\"\n  ],\n  \"platform_flag_score\": 2,\n  \"platform_risks\": [\n    \"Generic question could trigger spam filter\"\n  ],\n  \"quality_score\": 7,\n  \"suggestions\": [\n    \"Replace em-dash with period or comma\",\n    \"Remove 'What do you think?' closer\",\n    \"Add specific personal detail\"\n  ]\n}\n\n\nScoring:\n\nAI Detection: 0-10 (10 = definitely AI)\nPlatform Flag Risk: 0-10 (10 = high spam risk)\nQuality: 0-10 (10 = excellent)\nAnalysis Options\nFlag\tDescription\tExample\n--days N\tDate range for analysis\t--days 60\n--url URL\tAnalyze existing post\t--url https://x.com/...\n--model ID\tOverride model\t--model grok-3\n--json\tJSON output\t-\n--raw\tInclude debug output\t-\n\nSee references/analysis-prompts.md for detailed prompt structures and scoring criteria.\n\nModels\n\nList available xAI models.\n\nnode {baseDir}/scripts/models.mjs\n\n\nOutput:\n\ngrok-2-vision-1212\ngrok-3\ngrok-4-1-fast\ngrok-4-fast\n\n\nJSON output:\n\nnode {baseDir}/scripts/models.mjs --json\n\n\nQuick model comparison:\n\nModel\tSpeed\tQuality\tVision\tBest For\ngrok-4-1-fast\tFast\tGood\tNo\tDefault (search, chat, analysis)\ngrok-4-fast\tFast\tGood\tNo\tAlternative fast model\ngrok-3\tSlower\tBest\tNo\tComplex reasoning, detailed analysis\ngrok-2-vision-1212\tMedium\tGood\tYes\tImage analysis\n\nSee references/models.md for detailed model capabilities and use cases.\n\nAdvanced Usage\nCitation Deduplication\n\nFor X searches, the tool automatically deduplicates tweet URLs, preferring canonical /@handle/status/id over /i/status/id format.\n\nCustom Model Selection\n\nOverride the default model for any operation:\n\n# Search with grok-3 for better quality\nnode {baseDir}/scripts/grok_search.mjs \"complex query\" --x --model grok-3\n\n# Chat with vision model\nnode {baseDir}/scripts/chat.mjs --model grok-2-vision-1212 --image pic.jpg \"Describe\"\n\n# Analysis with grok-3 for deeper insights\nnode {baseDir}/scripts/analyze.mjs voice @username --model grok-3\n\nDebugging\n\nAdd --raw to any command to see the full API response:\n\nnode {baseDir}/scripts/grok_search.mjs \"query\" --x --raw\n\nReference Documentation\nAPI Reference - xAI API endpoints and parameters\nSearch Patterns - Query patterns, filters, optimization tips\nModels - Model comparison and capabilities\nAnalysis Prompts - Structured prompts and scoring criteria\nX Algorithm - Ranking, engagement weights, spam detection\nExamples\nResearch a topic\n# Find recent discussions\nnode {baseDir}/scripts/grok_search.mjs \"Claude Sonnet 4.5\" --x --days 3\n\n# Get trend analysis\nnode {baseDir}/scripts/analyze.mjs trends \"Claude Sonnet 4.5\"\n\nAnalyze voice before drafting\n# Study the target account\nnode {baseDir}/scripts/analyze.mjs voice @target_account --days 30\n\n# Check your draft\nnode {baseDir}/scripts/analyze.mjs post \"Your draft here\"\n\nMulti-modal research\n# Search web for context\nnode {baseDir}/scripts/grok_search.mjs \"TypeScript 5.7 features\" --web\n\n# Ask follow-up\nnode {baseDir}/scripts/chat.mjs \"What are the key TypeScript 5.7 improvements?\"\n\n# Analyze screenshot\nnode {baseDir}/scripts/chat.mjs --image ./code.png \"Review this code\"\n\nError Handling\n\nCommon errors and solutions:\n\nMissing API key:\n\nMissing XAI_API_KEY\n\n\n→ Set XAI_API_KEY environment variable or add to ~/.clawdbot/clawdbot.json\n\nInvalid mode:\n\nMust specify --web or --x\n\n\n→ Add --web or --x flag to search command\n\nImage format error:\n\nUnsupported image type\n\n\n→ Use JPG, PNG, WebP, or GIF format\n\nAPI error:\n\nxAI API error: 401 Unauthorized\n\n\n→ Check API key is valid and active\n\nTips\nDefault model (grok-4-1-fast) is fast and good for most tasks\nUse grok-3 for complex analysis or when quality matters more than speed\nX searches are limited by recency (xAI x_search tool constraints)\nWeb searches work best with specific, current queries\nVoice analysis needs sufficient post history (30+ posts recommended)\nPost safety checks are advisory; use judgment for final decisions\nJSON output is best for agent/script consumption\nText output is better for terminal/human reading\nTroubleshooting\n\nNo results from X search:\n\nTry broader query or longer date range\nCheck if handles exist and are public\nRemove overly restrictive filters\n\nVoice analysis incomplete:\n\nIncrease --days to get more post history\nCheck if account is public and active\nVerify handle is correct (with or without @)\n\nAPI rate limits:\n\nxAI enforces rate limits per API key\nSpread requests over time if hitting limits\nConsider upgrading xAI plan for higher limits\nContent Writing Workflow\n\nUse the analysis tools to improve your X content:\n\n# Research before writing\nnode {baseDir}/scripts/analyze.mjs trends \"your topic\"\nnode {baseDir}/scripts/grok_search.mjs \"your topic\" --x --days 7\n\n# Study voice patterns\nnode {baseDir}/scripts/analyze.mjs voice @target_account\n\n# Check draft before posting\nnode {baseDir}/scripts/analyze.mjs post \"$(cat draft.txt)\"\n\n\nUse the JSON output to:\n\nResearch current discussions and posting angles\nLearn from successful voices in your niche\nCatch AI signals and platform flags before publishing"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/mischasigtermans/xai-plus",
    "publisherUrl": "https://clawhub.ai/mischasigtermans/xai-plus",
    "owner": "mischasigtermans",
    "version": "2.0.2",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/xai-plus",
    "downloadUrl": "https://openagent3.xyz/downloads/xai-plus",
    "agentUrl": "https://openagent3.xyz/skills/xai-plus/agent",
    "manifestUrl": "https://openagent3.xyz/skills/xai-plus/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/xai-plus/agent.md"
  }
}