tweetclaw

X/Twitter automation plugin. Post tweets, reply, like, retweet, follow, unfollow, send DMs, search tweets, look up users, extract bulk data, monitor accounts, run giveaway draws, and compose algorithm-optimized tweets via Xquik REST API. Use when the user asks about Twitter, X, tweets, followers, social media automation, tweet analytics, or giveaway management. Trigger with "post tweet", "search tweets", "extract followers", "run giveaway", "monitor account", "compose tweet", "trending topics".

1,868 stars

Best use case

tweetclaw is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

X/Twitter automation plugin. Post tweets, reply, like, retweet, follow, unfollow, send DMs, search tweets, look up users, extract bulk data, monitor accounts, run giveaway draws, and compose algorithm-optimized tweets via Xquik REST API. Use when the user asks about Twitter, X, tweets, followers, social media automation, tweet analytics, or giveaway management. Trigger with "post tweet", "search tweets", "extract followers", "run giveaway", "monitor account", "compose tweet", "trending topics".

Teams using tweetclaw should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/tweetclaw/SKILL.md --create-dirs "https://raw.githubusercontent.com/jeremylongshore/claude-code-plugins-plus-skills/main/plugins/automation/tweetclaw/skills/tweetclaw/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/tweetclaw/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How tweetclaw Compares

Feature / AgenttweetclawStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

X/Twitter automation plugin. Post tweets, reply, like, retweet, follow, unfollow, send DMs, search tweets, look up users, extract bulk data, monitor accounts, run giveaway draws, and compose algorithm-optimized tweets via Xquik REST API. Use when the user asks about Twitter, X, tweets, followers, social media automation, tweet analytics, or giveaway management. Trigger with "post tweet", "search tweets", "extract followers", "run giveaway", "monitor account", "compose tweet", "trending topics".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# TweetClaw

## Overview

TweetClaw provides full X/Twitter automation via the Xquik REST API. It covers 121 endpoints across 12 categories: tweet operations, user lookups, search, bulk extractions (23 tools), giveaway draws, account monitoring, webhook delivery, AI composition, style analysis, drafts, write actions, and account management.

Two MCP tools are available via the hosted server at `xquik.com/mcp` (not bundled with this plugin). See the MCP setup section in Resources for configuration instructions.

## Prerequisites

- An API key from [xquik.com](https://xquik.com) (starts with `xq_`)
- Set `XQUIK_API_KEY` environment variable or configure via OpenClaw:
  ```bash
  openclaw config set plugins.entries.tweetclaw.config.apiKey "$XQUIK_API_KEY"
  ```

## Instructions

### Reading Data

Search tweets, fetch user profiles, get timelines, bookmarks, notifications, DM history, and trending topics.

```bash
# Search tweets
curl -H "x-api-key: $XQUIK_API_KEY" \
  "https://xquik.com/api/v1/x/tweets/search?query=AI+agents&count=20"

# Get user profile
curl -H "x-api-key: $XQUIK_API_KEY" \
  "https://xquik.com/api/v1/x/users/elonmusk"

# Get tweet by ID
curl -H "x-api-key: $XQUIK_API_KEY" \
  "https://xquik.com/api/v1/x/tweets/1234567890"
```

### Writing Data

Post tweets, delete tweets, like/unlike, retweet, follow/unfollow, send DMs, update profile, upload media.

```bash
# Post a tweet
curl -X POST -H "x-api-key: $XQUIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello from TweetClaw!"}' \
  "https://xquik.com/api/v1/x/tweets"

# Like a tweet
curl -X POST -H "x-api-key: $XQUIK_API_KEY" \
  "https://xquik.com/api/v1/x/tweets/1234567890/like"

# Follow a user (requires numeric user ID)
curl -X POST -H "x-api-key: $XQUIK_API_KEY" \
  "https://xquik.com/api/v1/x/users/44196397/follow"
```

### Bulk Extractions

23 extraction tools for replies, quotes, retweets, followers, following, mentions, community members, list members, space participants, and more. Always estimate before extracting.

```bash
# Estimate extraction cost
curl -X POST -H "x-api-key: $XQUIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "reply_extractor", "params": {"tweetId": "1234567890"}}' \
  "https://xquik.com/api/v1/extractions/estimate"

# Create extraction
curl -X POST -H "x-api-key: $XQUIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "reply_extractor", "params": {"tweetId": "1234567890"}}' \
  "https://xquik.com/api/v1/extractions"

# Retrieve results (poll status first)
curl -H "x-api-key: $XQUIK_API_KEY" \
  "https://xquik.com/api/v1/extractions/{id}/results"
```

### Giveaway Draws

Run auditable draws from tweet replies with filters (retweet required, follow check, min followers, account age, language, keywords).

```bash
curl -X POST -H "x-api-key: $XQUIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tweetUrl": "https://x.com/handle/status/1234567890",
    "winnerCount": 3,
    "filters": {"mustRetweet": true, "mustFollow": "handle", "minFollowers": 10}
  }' \
  "https://xquik.com/api/v1/draws"
```

### Account Monitoring

Monitor X accounts for new tweets, follows, unfollows. Deliver events via webhook or Telegram.

```bash
# Create monitor
curl -X POST -H "x-api-key: $XQUIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "openai"}' \
  "https://xquik.com/api/v1/monitors"

# Create webhook
curl -X POST -H "x-api-key: $XQUIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/webhook", "events": ["tweet.new"]}' \
  "https://xquik.com/api/v1/webhooks"
```

### AI Composition

Compose algorithm-optimized tweets with scoring, refinement, and style analysis.

```bash
curl -X POST -H "x-api-key: $XQUIK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"step": "compose", "topic": "AI productivity", "tone": "professional"}' \
  "https://xquik.com/api/v1/compose"
```

## Output

All endpoints return JSON. Successful responses include the requested data. Errors return `{"error": "error_code"}`.

| Status | Meaning | Action |
|--------|---------|--------|
| 200 | Success | Process response |
| 400 | Invalid request | Fix parameters |
| 401 | Unauthenticated | Check API key |
| 402 | Billing issue | Subscribe or add credits |
| 404 | Not found | Resource does not exist |
| 429 | Rate limited | Retry with backoff |
| 5xx | Server error | Retry with backoff |

## Error Handling

- Retry only 429 and 5xx (max 3 retries, exponential backoff). Never retry other 4xx.
- Rate limits are per method tier: Read (120/60s), Write (30/60s), Delete (15/60s).
- Follow/DM endpoints require numeric user IDs, not usernames. Look up the user first via `GET /x/users/{username}`.
- Extraction IDs are strings (bigints that overflow JavaScript Number). Always treat as strings.
- Webhook secrets are shown only once at creation. Store immediately.
- Cursors are opaque. Never decode or construct `nextCursor` values.
- Always estimate before extracting to avoid 402 errors mid-extraction.

## Examples

### Full workflow: search, analyze, and compose

1. Search tweets: `GET /x/tweets/search?query=AI+agents&count=50`
2. Analyze engagement: Check likes, retweets, reply counts in results
3. Compose optimized tweet: `POST /compose` with topic and tone
4. Score the draft: `POST /compose` with `step: "score"`
5. Post the tweet: `POST /x/tweets` with the final text

### Full workflow: giveaway draw

1. Create draw: `POST /draws` with tweet URL and filters
2. Poll status: `GET /draws/{id}` until `status: "completed"`
3. Export results: `GET /draws/{id}/export?format=csv`

## Resources

- [Xquik API docs](https://docs.xquik.com)
- [TweetClaw source](https://github.com/Xquik-dev/tweetclaw)
- [Pricing details](https://docs.xquik.com/guides/billing)
- [MCP server setup](https://docs.xquik.com/mcp/overview)

Related Skills

schema-optimization-orchestrator

1868
from jeremylongshore/claude-code-plugins-plus-skills

Multi-phase schema optimization workflow orchestrator. Creates session directories, spawns phase agents sequentially, validates outputs, aggregates results. Trigger: "run schema optimization", "optimize schema workflow", "execute schema phases"

test-skill

1868
from jeremylongshore/claude-code-plugins-plus-skills

Test skill for E2E validation. Trigger with "run test skill" or "execute test". Use this skill when testing skill activation and tool permissions.

example-skill

1868
from jeremylongshore/claude-code-plugins-plus-skills

Brief description of what this skill does and when the model should activate it. Use when [describe the user's intent or situation]. Trigger with "example phrase", "another trigger", "/example-skill".

testing-visual-regression

1868
from jeremylongshore/claude-code-plugins-plus-skills

Detect visual changes in UI components using screenshot comparison. Use when detecting unintended UI changes or pixel differences. Trigger with phrases like "test visual changes", "compare screenshots", or "detect UI regressions".

generating-unit-tests

1868
from jeremylongshore/claude-code-plugins-plus-skills

Test automatically generate comprehensive unit tests from source code covering happy paths, edge cases, and error conditions. Use when creating test coverage for functions, classes, or modules. Trigger with phrases like "generate unit tests", "create tests for", or "add test coverage".

generating-test-reports

1868
from jeremylongshore/claude-code-plugins-plus-skills

Generate comprehensive test reports with metrics, coverage, and visualizations. Use when performing specialized testing. Trigger with phrases like "generate test report", "create test documentation", or "show test metrics".

orchestrating-test-execution

1868
from jeremylongshore/claude-code-plugins-plus-skills

Test coordinate parallel test execution across multiple environments and frameworks. Use when performing specialized testing. Trigger with phrases like "orchestrate tests", "run parallel tests", or "coordinate test execution".

managing-test-environments

1868
from jeremylongshore/claude-code-plugins-plus-skills

Test provision and manage isolated test environments with configuration and data. Use when performing specialized testing. Trigger with phrases like "manage test environment", "provision test env", or "setup test infrastructure".

generating-test-doubles

1868
from jeremylongshore/claude-code-plugins-plus-skills

Generate mocks, stubs, spies, and fakes for dependency isolation. Use when creating mocks, stubs, or test isolation fixtures. Trigger with phrases like "generate mocks", "create test doubles", or "setup stubs".

generating-test-data

1868
from jeremylongshore/claude-code-plugins-plus-skills

Generate realistic test data including edge cases and boundary conditions. Use when creating realistic fixtures or edge case test data. Trigger with phrases like "generate test data", "create fixtures", or "setup test database".

analyzing-test-coverage

1868
from jeremylongshore/claude-code-plugins-plus-skills

Analyze code coverage metrics and identify untested code paths. Use when analyzing untested code or coverage gaps. Trigger with phrases like "analyze coverage", "check test coverage", or "find untested code".

managing-snapshot-tests

1868
from jeremylongshore/claude-code-plugins-plus-skills

Create and validate component snapshots for UI regression testing. Use when performing specialized testing. Trigger with phrases like "update snapshots", "test UI snapshots", or "validate component snapshots".