{
  "schemaVersion": "1.0",
  "item": {
    "slug": "twitter-x-api",
    "name": "Twitter/X API",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/klemenska/twitter-x-api",
    "canonicalUrl": "https://clawhub.ai/klemenska/twitter-x-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/twitter-x-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=twitter-x-api",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/api-limits.md",
      "references/search-operators.md",
      "scripts/tweet.py"
    ],
    "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/twitter-x-api"
    },
    "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/twitter-x-api",
    "agentPageUrl": "https://openagent3.xyz/skills/twitter-x-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/twitter-x-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/twitter-x-api/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": "Twitter/X API Skill",
        "body": "Interact with X (Twitter) via API v2 for reading, posting, replying, DMs, search, and analytics."
      },
      {
        "title": "Credentials",
        "body": "Store credentials in environment variables or ~/.config/twitter/credentials.json:\n\nexport TWITTER_API_KEY=\"your-api-key\"\nexport TWITTER_API_SECRET=\"your-api-secret\"\nexport TWITTER_ACCESS_TOKEN=\"your-access-token\"\nexport TWITTER_ACCESS_SECRET=\"your-access-secret\"\nexport TWITTER_BEARER_TOKEN=\"your-bearer-token\"  # For read-only operations\n\nOr create credentials file:\n\nmkdir -p ~/.config/twitter\ncat > ~/.config/twitter/credentials.json << 'EOF'\n{\n  \"api_key\": \"your-api-key\",\n  \"api_secret\": \"your-api-secret\",\n  \"access_token\": \"your-access-token\",\n  \"access_secret\": \"your-access-secret\",\n  \"bearer_token\": \"your-bearer-token\"\n}\nEOF\nchmod 600 ~/.config/twitter/credentials.json"
      },
      {
        "title": "Install Dependencies",
        "body": "pip install tweepy"
      },
      {
        "title": "Quick Reference",
        "body": "TaskCommandPost tweet{baseDir}/scripts/tweet.py post \"text\"Post with image{baseDir}/scripts/tweet.py post \"text\" --media image.pngReply{baseDir}/scripts/tweet.py reply TWEET_ID \"text\"Thread{baseDir}/scripts/tweet.py thread \"tweet1\" \"tweet2\" ...Get timeline{baseDir}/scripts/tweet.py timeline [--count 20]Get mentions{baseDir}/scripts/tweet.py mentions [--count 20]Get DMs{baseDir}/scripts/tweet.py dms [--count 20]Send DM{baseDir}/scripts/tweet.py dm USERNAME \"message\"Search{baseDir}/scripts/tweet.py search \"query\" [--count 20]User info{baseDir}/scripts/tweet.py user USERNAMETweet info{baseDir}/scripts/tweet.py show TWEET_IDAnalytics{baseDir}/scripts/tweet.py analytics TWEET_ID"
      },
      {
        "title": "tweet.py",
        "body": "Main script for all Twitter operations. Run with --help for details:\n\n{baseDir}/scripts/tweet.py --help\n{baseDir}/scripts/tweet.py post --help"
      },
      {
        "title": "Common Workflows",
        "body": "Post a simple tweet:\n\n{baseDir}/scripts/tweet.py post \"Hello, world!\"\n\nPost with image:\n\n{baseDir}/scripts/tweet.py post \"Check this out!\" --media photo.png\n{baseDir}/scripts/tweet.py post \"Multiple images\" --media img1.png --media img2.png\n\nReply to a tweet:\n\n{baseDir}/scripts/tweet.py reply 1234567890 \"Great point!\"\n\nPost a thread:\n\n{baseDir}/scripts/tweet.py thread \\\n  \"First tweet in thread\" \\\n  \"Second tweet\" \\\n  \"Third tweet\"\n\nRead your mentions:\n\n{baseDir}/scripts/tweet.py mentions --count 50\n\nSearch for tweets:\n\n{baseDir}/scripts/tweet.py search \"openclaw agent\" --count 20\n{baseDir}/scripts/tweet.py search \"#AI lang:en\" --count 20\n\nGet user info:\n\n{baseDir}/scripts/tweet.py user elonmusk\n\nSend a DM:\n\n{baseDir}/scripts/tweet.py dm username \"Hello from OpenClaw!\"\n\nView tweet analytics:\n\n{baseDir}/scripts/tweet.py analytics 1234567890"
      },
      {
        "title": "API Tiers & Limits",
        "body": "TierCostReadWriteSearchFree$0Limited--Basic$100/mo10k/mo1.5k/mo50/moPro$5000/mo1M/mo300k/mo500/mo\n\nFree tier can only post tweets (no read access to timeline/mentions).\nBasic tier required for reading mentions, timeline, and search.\nWrite-only operations work on free tier.\n\nSee {baseDir}/references/api-limits.md for detailed rate limits."
      },
      {
        "title": "Error Handling",
        "body": "Common errors:\n\nErrorCauseSolution403 ForbiddenInsufficient tierUpgrade API tier or check endpoint access429 Too Many RequestsRate limit hitWait and retry; check rate limit headers401 UnauthorizedInvalid credentialsVerify API keys and tokens404 Not FoundTweet/user deletedHandle gracefully, inform user422 UnprocessableDuplicate tweetWait before posting same content"
      },
      {
        "title": "Notes",
        "body": "Rate limits: X API has strict rate limits. Scripts include retry logic.\nMedia uploads: Images must be <5MB (PNG/JPG) or <15MB (GIF). Videos <512MB.\nCharacter limit: 280 characters per tweet. Threads for longer content.\nDMs: Require OAuth 1.0a user context (not Bearer token).\nSearch operators: {baseDir}/references/search-operators.md for advanced queries."
      },
      {
        "title": "Related Files",
        "body": "{baseDir}/scripts/tweet.py - Main CLI for all operations\n{baseDir}/references/api-limits.md - Detailed rate limits by endpoint\n{baseDir}/references/search-operators.md - Twitter search syntax"
      }
    ],
    "body": "Twitter/X API Skill\n\nInteract with X (Twitter) via API v2 for reading, posting, replying, DMs, search, and analytics.\n\nSetup\nCredentials\n\nStore credentials in environment variables or ~/.config/twitter/credentials.json:\n\nexport TWITTER_API_KEY=\"your-api-key\"\nexport TWITTER_API_SECRET=\"your-api-secret\"\nexport TWITTER_ACCESS_TOKEN=\"your-access-token\"\nexport TWITTER_ACCESS_SECRET=\"your-access-secret\"\nexport TWITTER_BEARER_TOKEN=\"your-bearer-token\"  # For read-only operations\n\n\nOr create credentials file:\n\nmkdir -p ~/.config/twitter\ncat > ~/.config/twitter/credentials.json << 'EOF'\n{\n  \"api_key\": \"your-api-key\",\n  \"api_secret\": \"your-api-secret\",\n  \"access_token\": \"your-access-token\",\n  \"access_secret\": \"your-access-secret\",\n  \"bearer_token\": \"your-bearer-token\"\n}\nEOF\nchmod 600 ~/.config/twitter/credentials.json\n\nInstall Dependencies\npip install tweepy\n\nQuick Reference\nTask\tCommand\nPost tweet\t{baseDir}/scripts/tweet.py post \"text\"\nPost with image\t{baseDir}/scripts/tweet.py post \"text\" --media image.png\nReply\t{baseDir}/scripts/tweet.py reply TWEET_ID \"text\"\nThread\t{baseDir}/scripts/tweet.py thread \"tweet1\" \"tweet2\" ...\nGet timeline\t{baseDir}/scripts/tweet.py timeline [--count 20]\nGet mentions\t{baseDir}/scripts/tweet.py mentions [--count 20]\nGet DMs\t{baseDir}/scripts/tweet.py dms [--count 20]\nSend DM\t{baseDir}/scripts/tweet.py dm USERNAME \"message\"\nSearch\t{baseDir}/scripts/tweet.py search \"query\" [--count 20]\nUser info\t{baseDir}/scripts/tweet.py user USERNAME\nTweet info\t{baseDir}/scripts/tweet.py show TWEET_ID\nAnalytics\t{baseDir}/scripts/tweet.py analytics TWEET_ID\nScripts\ntweet.py\n\nMain script for all Twitter operations. Run with --help for details:\n\n{baseDir}/scripts/tweet.py --help\n{baseDir}/scripts/tweet.py post --help\n\nCommon Workflows\n\nPost a simple tweet:\n\n{baseDir}/scripts/tweet.py post \"Hello, world!\"\n\n\nPost with image:\n\n{baseDir}/scripts/tweet.py post \"Check this out!\" --media photo.png\n{baseDir}/scripts/tweet.py post \"Multiple images\" --media img1.png --media img2.png\n\n\nReply to a tweet:\n\n{baseDir}/scripts/tweet.py reply 1234567890 \"Great point!\"\n\n\nPost a thread:\n\n{baseDir}/scripts/tweet.py thread \\\n  \"First tweet in thread\" \\\n  \"Second tweet\" \\\n  \"Third tweet\"\n\n\nRead your mentions:\n\n{baseDir}/scripts/tweet.py mentions --count 50\n\n\nSearch for tweets:\n\n{baseDir}/scripts/tweet.py search \"openclaw agent\" --count 20\n{baseDir}/scripts/tweet.py search \"#AI lang:en\" --count 20\n\n\nGet user info:\n\n{baseDir}/scripts/tweet.py user elonmusk\n\n\nSend a DM:\n\n{baseDir}/scripts/tweet.py dm username \"Hello from OpenClaw!\"\n\n\nView tweet analytics:\n\n{baseDir}/scripts/tweet.py analytics 1234567890\n\nAPI Tiers & Limits\nTier\tCost\tRead\tWrite\tSearch\nFree\t$0\tLimited\t-\t-\nBasic\t$100/mo\t10k/mo\t1.5k/mo\t50/mo\nPro\t$5000/mo\t1M/mo\t300k/mo\t500/mo\n\nFree tier can only post tweets (no read access to timeline/mentions). Basic tier required for reading mentions, timeline, and search. Write-only operations work on free tier.\n\nSee {baseDir}/references/api-limits.md for detailed rate limits.\n\nError Handling\n\nCommon errors:\n\nError\tCause\tSolution\n403 Forbidden\tInsufficient tier\tUpgrade API tier or check endpoint access\n429 Too Many Requests\tRate limit hit\tWait and retry; check rate limit headers\n401 Unauthorized\tInvalid credentials\tVerify API keys and tokens\n404 Not Found\tTweet/user deleted\tHandle gracefully, inform user\n422 Unprocessable\tDuplicate tweet\tWait before posting same content\nNotes\nRate limits: X API has strict rate limits. Scripts include retry logic.\nMedia uploads: Images must be <5MB (PNG/JPG) or <15MB (GIF). Videos <512MB.\nCharacter limit: 280 characters per tweet. Threads for longer content.\nDMs: Require OAuth 1.0a user context (not Bearer token).\nSearch operators: {baseDir}/references/search-operators.md for advanced queries.\nRelated Files\n{baseDir}/scripts/tweet.py - Main CLI for all operations\n{baseDir}/references/api-limits.md - Detailed rate limits by endpoint\n{baseDir}/references/search-operators.md - Twitter search syntax"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/klemenska/twitter-x-api",
    "publisherUrl": "https://clawhub.ai/klemenska/twitter-x-api",
    "owner": "klemenska",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/twitter-x-api",
    "downloadUrl": "https://openagent3.xyz/downloads/twitter-x-api",
    "agentUrl": "https://openagent3.xyz/skills/twitter-x-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/twitter-x-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/twitter-x-api/agent.md"
  }
}