Automate Twitter/X tasks via Rube MCP (Composio): posts, search, users, bookmarks, lists, media. Always search tools first for current schemas.
Add this skill
npx mdskills install sickn33/twitter-automationComprehensive Twitter automation with clear workflows, detailed pitfalls, and excellent reference tables
1---2name: twitter-automation3description: "Automate Twitter/X tasks via Rube MCP (Composio): posts, search, users, bookmarks, lists, media. Always search tools first for current schemas."4requires:5 mcp: [rube]6---78# Twitter/X Automation via Rube MCP910Automate Twitter/X operations through Composio's Twitter toolkit via Rube MCP.1112## Prerequisites1314- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)15- Active Twitter connection via `RUBE_MANAGE_CONNECTIONS` with toolkit `twitter`16- Always call `RUBE_SEARCH_TOOLS` first to get current tool schemas1718## Setup1920**Get Rube MCP**: Add `https://rube.app/mcp` as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.2122231. Verify Rube MCP is available by confirming `RUBE_SEARCH_TOOLS` responds242. Call `RUBE_MANAGE_CONNECTIONS` with toolkit `twitter`253. If connection is not ACTIVE, follow the returned auth link to complete Twitter OAuth264. Confirm connection status shows ACTIVE before running any workflows2728## Core Workflows2930### 1. Create and Manage Posts3132**When to use**: User wants to create, delete, or look up tweets/posts3334**Tool sequence**:351. `TWITTER_USER_LOOKUP_ME` - Get authenticated user info [Prerequisite]362. `TWITTER_UPLOAD_MEDIA` / `TWITTER_UPLOAD_LARGE_MEDIA` - Upload media [Optional]373. `TWITTER_CREATION_OF_A_POST` - Create a new post [Required]384. `TWITTER_POST_LOOKUP_BY_POST_ID` - Look up a specific post [Optional]395. `TWITTER_POST_DELETE_BY_POST_ID` - Delete a post [Optional]4041**Key parameters**:42- `text`: Post text content (max 280 weighted characters)43- `media__media_ids`: Array of media ID strings for attachments44- `reply__in_reply_to_tweet_id`: Tweet ID to reply to45- `quote_tweet_id`: Tweet ID to quote46- `id`: Post ID for lookup/delete4748**Pitfalls**:49- Post text is limited to 280 weighted characters; some characters count as more than one50- Posting is NOT idempotent; retrying on timeout will create duplicate posts51- Media IDs must be numeric strings, not integers52- UPLOAD_LARGE_MEDIA is for videos/GIFs; UPLOAD_MEDIA for images53- Always call USER_LOOKUP_ME first to get the authenticated user's ID5455### 2. Search Posts5657**When to use**: User wants to find tweets matching specific criteria5859**Tool sequence**:601. `TWITTER_RECENT_SEARCH` - Search recent tweets (last 7 days) [Required]612. `TWITTER_FULL_ARCHIVE_SEARCH` - Search full archive (Academic access) [Optional]623. `TWITTER_RECENT_SEARCH_COUNTS` - Get tweet count matching query [Optional]6364**Key parameters**:65- `query`: Search query using Twitter search operators66- `max_results`: Results per page (10-100)67- `next_token`: Pagination token68- `start_time`/`end_time`: ISO 8601 time range69- `tweet__fields`: Comma-separated fields to include70- `expansions`: Related objects to expand7172**Pitfalls**:73- RECENT_SEARCH covers only the last 7 days; use FULL_ARCHIVE_SEARCH for older tweets74- FULL_ARCHIVE_SEARCH requires Academic Research or Enterprise access75- Query operators: `from:username`, `to:username`, `is:retweet`, `has:media`, `-is:retweet`76- Empty results return `meta.result_count: 0` with no `data` field77- Rate limits vary by endpoint and access level; check response headers7879### 3. Look Up Users8081**When to use**: User wants to find or inspect Twitter user profiles8283**Tool sequence**:841. `TWITTER_USER_LOOKUP_ME` - Get authenticated user [Optional]852. `TWITTER_USER_LOOKUP_BY_USERNAME` - Look up by username [Optional]863. `TWITTER_USER_LOOKUP_BY_ID` - Look up by user ID [Optional]874. `TWITTER_USER_LOOKUP_BY_IDS` - Batch look up multiple users [Optional]8889**Key parameters**:90- `username`: Twitter handle without @ prefix91- `id`: Numeric user ID string92- `ids`: Comma-separated user IDs for batch lookup93- `user__fields`: Fields to return (description, public_metrics, etc.)9495**Pitfalls**:96- Usernames are case-insensitive but must not include the @ prefix97- User IDs are numeric strings, not integers98- Suspended or deleted accounts return errors, not empty results99- LOOKUP_BY_IDS accepts max 100 IDs per request100101### 4. Manage Bookmarks102103**When to use**: User wants to save, view, or remove bookmarked tweets104105**Tool sequence**:1061. `TWITTER_USER_LOOKUP_ME` - Get authenticated user ID [Prerequisite]1072. `TWITTER_BOOKMARKS_BY_USER` - List bookmarked posts [Required]1083. `TWITTER_ADD_POST_TO_BOOKMARKS` - Bookmark a post [Optional]1094. `TWITTER_REMOVE_A_BOOKMARKED_POST` - Remove bookmark [Optional]110111**Key parameters**:112- `id`: User ID (from USER_LOOKUP_ME) for listing bookmarks113- `tweet_id`: Tweet ID to bookmark or unbookmark114- `max_results`: Results per page115- `pagination_token`: Token for next page116117**Pitfalls**:118- Bookmarks require the authenticated user's ID, not username119- Bookmarks are private; only the authenticated user can see their own120- Pagination uses `pagination_token`, not `next_token`121122### 5. Manage Lists123124**When to use**: User wants to view or manage Twitter lists125126**Tool sequence**:1271. `TWITTER_USER_LOOKUP_ME` - Get authenticated user ID [Prerequisite]1282. `TWITTER_GET_A_USER_S_OWNED_LISTS` - List owned lists [Optional]1293. `TWITTER_GET_A_USER_S_LIST_MEMBERSHIPS` - List memberships [Optional]1304. `TWITTER_GET_A_USER_S_PINNED_LISTS` - Get pinned lists [Optional]1315. `TWITTER_GET_USER_S_FOLLOWED_LISTS` - Get followed lists [Optional]1326. `TWITTER_LIST_LOOKUP_BY_LIST_ID` - Get list details [Optional]133134**Key parameters**:135- `id`: User ID for listing owned/member/followed lists136- `list_id`: List ID for specific list lookup137- `max_results`: Results per page (1-100)138139**Pitfalls**:140- List IDs and User IDs are numeric strings141- Lists endpoints require the user's numeric ID, not username142143### 6. Interact with Posts144145**When to use**: User wants to like, unlike, or view liked posts146147**Tool sequence**:1481. `TWITTER_USER_LOOKUP_ME` - Get authenticated user ID [Prerequisite]1492. `TWITTER_RETURNS_POST_OBJECTS_LIKED_BY_THE_PROVIDED_USER_ID` - Get liked posts [Optional]1503. `TWITTER_UNLIKE_POST` - Unlike a post [Optional]151152**Key parameters**:153- `id`: User ID for listing liked posts154- `tweet_id`: Tweet ID to unlike155156**Pitfalls**:157- Like/unlike endpoints require user ID from USER_LOOKUP_ME158- Liked posts pagination may be slow for users with many likes159160## Common Patterns161162### Search Query Syntax163164**Operators**:165- `from:username` - Posts by user166- `to:username` - Replies to user167- `@username` - Mentions user168- `#hashtag` - Contains hashtag169- `"exact phrase"` - Exact match170- `has:media` - Contains media171- `has:links` - Contains links172- `is:retweet` / `-is:retweet` - Include/exclude retweets173- `is:reply` / `-is:reply` - Include/exclude replies174- `lang:en` - Language filter175176**Combinators**:177- Space for AND178- `OR` for either condition179- `-` prefix for NOT180- Parentheses for grouping181182### Media Upload Flow183184```1851. Upload media with TWITTER_UPLOAD_MEDIA (images) or TWITTER_UPLOAD_LARGE_MEDIA (video/GIF)1862. Get media_id from response1873. Pass media_id as string in media__media_ids array to TWITTER_CREATION_OF_A_POST188```189190## Known Pitfalls191192**Character Limits**:193- Standard posts: 280 weighted characters194- Some Unicode characters count as more than 1195- URLs are shortened and count as fixed length (23 characters)196197**Rate Limits**:198- Vary significantly by access tier (Free, Basic, Pro, Enterprise)199- Free tier: very limited (e.g., 1,500 posts/month)200- Check `x-rate-limit-remaining` header in responses201202**Idempotency**:203- Post creation is NOT idempotent; duplicate posts will be created on retry204- Implement deduplication logic for automated posting205206## Quick Reference207208| Task | Tool Slug | Key Params |209|------|-----------|------------|210| Create post | TWITTER_CREATION_OF_A_POST | text |211| Delete post | TWITTER_POST_DELETE_BY_POST_ID | id |212| Look up post | TWITTER_POST_LOOKUP_BY_POST_ID | id |213| Recent search | TWITTER_RECENT_SEARCH | query |214| Archive search | TWITTER_FULL_ARCHIVE_SEARCH | query |215| Search counts | TWITTER_RECENT_SEARCH_COUNTS | query |216| My profile | TWITTER_USER_LOOKUP_ME | (none) |217| User by name | TWITTER_USER_LOOKUP_BY_USERNAME | username |218| User by ID | TWITTER_USER_LOOKUP_BY_ID | id |219| Users by IDs | TWITTER_USER_LOOKUP_BY_IDS | ids |220| Upload media | TWITTER_UPLOAD_MEDIA | media |221| Upload video | TWITTER_UPLOAD_LARGE_MEDIA | media |222| List bookmarks | TWITTER_BOOKMARKS_BY_USER | id |223| Add bookmark | TWITTER_ADD_POST_TO_BOOKMARKS | tweet_id |224| Remove bookmark | TWITTER_REMOVE_A_BOOKMARKED_POST | tweet_id |225| Unlike post | TWITTER_UNLIKE_POST | tweet_id |226| Liked posts | TWITTER_RETURNS_POST_OBJECTS_LIKED_BY_THE_PROVIDED_USER_ID | id |227| Owned lists | TWITTER_GET_A_USER_S_OWNED_LISTS | id |228| List memberships | TWITTER_GET_A_USER_S_LIST_MEMBERSHIPS | id |229| Pinned lists | TWITTER_GET_A_USER_S_PINNED_LISTS | id |230| Followed lists | TWITTER_GET_USER_S_FOLLOWED_LISTS | id |231| List details | TWITTER_LIST_LOOKUP_BY_LIST_ID | list_id |232
Full transparency — inspect the skill content before installing.