twitter-send-skill

Post tweets, reply to tweets, retweet, like/unlike, and delete tweets on Twitter/X. Supports threading, 280-char tweets, and automatic token refresh.

100 stars

Best use case

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

Post tweets, reply to tweets, retweet, like/unlike, and delete tweets on Twitter/X. Supports threading, 280-char tweets, and automatic token refresh.

Teams using twitter-send-skill 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/twitter-send-skill/SKILL.md --create-dirs "https://raw.githubusercontent.com/trohitg/MachinaOS/main/server/skills/social_agent/twitter-send-skill/SKILL.md"

Manual Installation

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

How twitter-send-skill Compares

Feature / Agenttwitter-send-skillStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Post tweets, reply to tweets, retweet, like/unlike, and delete tweets on Twitter/X. Supports threading, 280-char tweets, and automatic token refresh.

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.

SKILL.md Source

# Twitter Send Tool

Post and interact with tweets on Twitter/X via X API v2.

## How It Works

This skill provides instructions for the **Twitter Send** tool node. Connect the **Twitter Send** node to an AI Agent's `input-tools` handle to enable posting and interactions.

All actions use OAuth 2.0 user context with automatic token refresh on expiry (tokens last 2 hours).

## twitter_send Tool

Send tweets, replies, retweets, likes, and deletions.

### Schema Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| action | string | Yes | Action type: `tweet`, `reply`, `retweet`, `like`, `unlike`, `delete` |
| text | string | If tweet/reply | Tweet text content (max 280 characters) |
| tweet_id | string | If retweet/like/unlike/delete | Target tweet ID |
| reply_to_id | string | If reply | Tweet ID to reply to |

### Actions

| Action | Required Fields | Description | Rate Limit Notes |
|--------|-----------------|-------------|------------------|
| `tweet` | text | Post a new tweet | 200 tweets/15min (app), 300/3hr (user) |
| `reply` | text, reply_to_id | Reply to an existing tweet | Same as tweet limits |
| `retweet` | tweet_id | Retweet an existing tweet | 5 retweets/15min (free tier) |
| `like` | tweet_id | Like a tweet | 200 likes/24hr (free tier) |
| `unlike` | tweet_id | Remove like from a tweet | 50 unlikes/15min |
| `delete` | tweet_id | Delete your own tweet | 50 deletes/15min |

### Examples

**Post a tweet:**
```json
{
  "action": "tweet",
  "text": "Hello Twitter! This is my first automated tweet."
}
```

**Reply to a tweet:**
```json
{
  "action": "reply",
  "text": "Thanks for sharing this!",
  "reply_to_id": "1234567890123456789"
}
```

**Create a thread (chain of replies):**
First post:
```json
{
  "action": "tweet",
  "text": "Thread: Here are 3 tips for better code (1/3)"
}
```
Then reply to the returned tweet ID for each subsequent post:
```json
{
  "action": "reply",
  "text": "Tip 1: Write tests first (2/3)",
  "reply_to_id": "<id_from_first_tweet>"
}
```

**Retweet:**
```json
{
  "action": "retweet",
  "tweet_id": "1234567890123456789"
}
```

**Like a tweet:**
```json
{
  "action": "like",
  "tweet_id": "1234567890123456789"
}
```

**Unlike a tweet:**
```json
{
  "action": "unlike",
  "tweet_id": "1234567890123456789"
}
```

**Delete a tweet:**
```json
{
  "action": "delete",
  "tweet_id": "1234567890123456789"
}
```

### Response Format

**Tweet/Reply:**
```json
{
  "success": true,
  "result": {
    "id": "1234567890123456789",
    "text": "Hello Twitter!"
  },
  "execution_time": 0.45
}
```

**Retweet:**
```json
{
  "success": true,
  "result": {
    "retweeted": true
  },
  "execution_time": 0.3
}
```

**Like:**
```json
{
  "success": true,
  "result": {
    "liked": true
  },
  "execution_time": 0.25
}
```

**Delete:**
```json
{
  "success": true,
  "result": {
    "deleted": true
  },
  "execution_time": 0.3
}
```

### Error Response

```json
{
  "success": false,
  "error": "Tweet text is required",
  "execution_time": 0.01
}
```

## Guidelines

1. **Character limit**: Tweets are limited to 280 characters. The API will reject longer text.
2. **Tweet IDs**: Use the numeric ID string (e.g., `1234567890123456789`). Get these from search results or user timelines.
3. **Rate limits**: X API has strict rate limits (see table above). Space out rapid actions.
4. **Content policy**: Follow X's content policies and terms of service.
5. **Threading**: Use reply action with `reply_to_id` set to the previous tweet's ID to create threads.
6. **Token refresh**: If a 401/403 error occurs, the system automatically refreshes the OAuth token and retries.
7. **Retweet vs Quote**: This tool only supports native retweets. For quote tweets, use `tweet` action and include the tweet URL in the text.

## Common Use Cases

- Post automated updates and announcements
- Reply to mentions or specific tweets
- Like tweets matching certain criteria (found via twitter_search)
- Create tweet threads by chaining replies using returned IDs
- Engage with followers programmatically
- Delete tweets that match certain conditions

## Setup Requirements

1. Connect the **Twitter Send** node to an AI Agent's `input-tools` handle
2. Ensure Twitter is connected (authenticated via OAuth in Credentials Modal)
3. Your X Developer account must have appropriate API access level
4. Required OAuth scopes: `tweet.read`, `tweet.write`, `like.read`, `like.write`, `users.read`, `offline.access`

Related Skills

whatsapp-send-skill

100
from trohitg/MachinaOS

Send WhatsApp messages to contacts, groups, or channels. Supports text, images, videos, audio, documents, stickers, locations, and contacts.

twitter-user-skill

100
from trohitg/MachinaOS

Look up Twitter/X user profiles with descriptions, get authenticated user info, and retrieve followers/following lists with profile details.

twitter-search-skill

100
from trohitg/MachinaOS

Search for recent tweets on Twitter/X using keywords, hashtags, mentions, and advanced query operators. Returns rich tweet data with expanded URLs, author info, media, metrics, and referenced tweets.

serper-search-skill

100
from trohitg/MachinaOS

Search the web using Serper API for Google-powered search results including web, news, images, and places.

proxy-config-skill

100
from trohitg/MachinaOS

Configure residential proxy providers and make proxied HTTP requests with geo-targeting.

perplexity-search-skill

100
from trohitg/MachinaOS

Search the web using Perplexity Sonar AI for synthesized answers with citations, related questions, and optional images.

http-request-skill

100
from trohitg/MachinaOS

Make HTTP requests to external APIs and web services. Supports GET, POST, PUT, DELETE, PATCH methods with headers and JSON body.

duckduckgo-search-skill

100
from trohitg/MachinaOS

Search the web using DuckDuckGo for free, privacy-focused results with no API key required.

crawlee-scraper-skill

100
from trohitg/MachinaOS

Read and extract content from any web page URL.

browser-skill

100
from trohitg/MachinaOS

Interactive browser automation - navigate, click, type, fill forms, take screenshots, get accessibility snapshots. Supports system Chrome/Edge via auto-detection.

brave-search-skill

100
from trohitg/MachinaOS

Search the web using Brave Search API for privacy-focused, independent search results with no tracking.

apify-skill

100
from trohitg/MachinaOS

Run web scrapers and extract data from websites and social media platforms using Apify actors. Supports Instagram, TikTok, Twitter/X, LinkedIn, Facebook, YouTube, Google Search, and general web crawling.