# Send X Api to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- 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.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
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. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "x-api",
    "name": "X Api",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/lobstergeneralintelligence/x-api",
    "canonicalUrl": "https://clawhub.ai/lobstergeneralintelligence/x-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/x-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x-api",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "scripts/package.json",
      "scripts/x-post.mjs"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "x-api",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-11T05:33:52.846Z",
      "expiresAt": "2026-05-18T05:33:52.846Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x-api",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=x-api",
        "contentDisposition": "attachment; filename=\"x-api-0.1.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "x-api"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/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."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/x-api",
    "downloadUrl": "https://openagent3.xyz/downloads/x-api",
    "agentUrl": "https://openagent3.xyz/skills/x-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/x-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/x-api/agent.md"
  }
}
```
## Documentation

### x-api 🐦

Post to X using the official API (OAuth 1.0a).

### When to Use

Posting tweets (cookie-based bird tweet gets blocked by bot detection)
Official API access is needed for reliability

For reading (timeline, search, mentions), use bird CLI instead — it's free and works well for reads.

### 1. Get API Credentials

Go to https://developer.x.com/en/portal/dashboard
Create a Project and App
Set App permissions to Read and Write
Get your keys from "Keys and tokens" tab:

API Key (Consumer Key)
API Key Secret (Consumer Secret)
Access Token
Access Token Secret

### 2. Configure Credentials

Option A: Environment variables

export X_API_KEY="your-api-key"
export X_API_SECRET="your-api-secret"
export X_ACCESS_TOKEN="your-access-token"
export X_ACCESS_SECRET="your-access-token-secret"

Option B: Config file at ~/.clawdbot/secrets/x-api.json

{
  "consumerKey": "your-api-key",
  "consumerSecret": "your-api-secret",
  "accessToken": "your-access-token",
  "accessTokenSecret": "your-access-token-secret"
}

### 3. Install Dependency

npm install -g twitter-api-v2

### Post a Tweet

x-post "Your tweet text here"

Or with full path:

node /path/to/skills/x-api/scripts/x-post.mjs "Your tweet text here"

Supports multi-line tweets:

x-post "Line one

Line two

Line three"

Returns the tweet URL on success.

### Limits

Free tier: 1,500 posts/month (requires credits in X Developer Portal)
Basic tier ($100/mo): Higher limits

### Reading (use bird)

For reading, searching, and monitoring — use the bird CLI:

bird home                    # Timeline
bird mentions                # Mentions
bird search "query"          # Search
bird user-tweets @handle     # User's posts
bird read <tweet-url>        # Single tweet

### Troubleshooting

402 Credits Depleted: Add credits in X Developer Portal → Dashboard

401 Unauthorized: Regenerate Access Token (ensure Read+Write permissions are set first)

No credentials found: Set env vars or create config file (see Setup above)
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: lobstergeneralintelligence
- Version: 0.1.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-11T05:33:52.846Z
- Expires at: 2026-05-18T05:33:52.846Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/x-api)
- [Send to Agent page](https://openagent3.xyz/skills/x-api/agent)
- [JSON manifest](https://openagent3.xyz/skills/x-api/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/x-api/agent.md)
- [Download page](https://openagent3.xyz/downloads/x-api)