Marketplace twitter-automation
Automate Twitter/X tasks via Rube MCP (Composio): posts, search, users, bookmarks, lists, media. Always search tools first for current schemas.
git clone https://github.com/aiskillstore/marketplace
T=$(mktemp -d) && git clone --depth=1 https://github.com/aiskillstore/marketplace "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/sickn33/twitter-automation" ~/.claude/skills/aiskillstore-marketplace-twitter-automation-4c8dab && rm -rf "$T"
skills/sickn33/twitter-automation/SKILL.mdTwitter/X Automation via Rube MCP
Automate Twitter/X operations through Composio's Twitter toolkit via Rube MCP.
Prerequisites
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active Twitter connection via
with toolkitRUBE_MANAGE_CONNECTIONStwitter - Always call
first to get current tool schemasRUBE_SEARCH_TOOLS
Setup
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.
- Verify Rube MCP is available by confirming
respondsRUBE_SEARCH_TOOLS - Call
with toolkitRUBE_MANAGE_CONNECTIONStwitter - If connection is not ACTIVE, follow the returned auth link to complete Twitter OAuth
- Confirm connection status shows ACTIVE before running any workflows
Core Workflows
1. Create and Manage Posts
When to use: User wants to create, delete, or look up tweets/posts
Tool sequence:
- Get authenticated user info [Prerequisite]TWITTER_USER_LOOKUP_ME
/TWITTER_UPLOAD_MEDIA
- Upload media [Optional]TWITTER_UPLOAD_LARGE_MEDIA
- Create a new post [Required]TWITTER_CREATION_OF_A_POST
- Look up a specific post [Optional]TWITTER_POST_LOOKUP_BY_POST_ID
- Delete a post [Optional]TWITTER_POST_DELETE_BY_POST_ID
Key parameters:
: Post text content (max 280 weighted characters)text
: Array of media ID strings for attachmentsmedia__media_ids
: Tweet ID to reply toreply__in_reply_to_tweet_id
: Tweet ID to quotequote_tweet_id
: Post ID for lookup/deleteid
Pitfalls:
- Post text is limited to 280 weighted characters; some characters count as more than one
- Posting is NOT idempotent; retrying on timeout will create duplicate posts
- Media IDs must be numeric strings, not integers
- UPLOAD_LARGE_MEDIA is for videos/GIFs; UPLOAD_MEDIA for images
- Always call USER_LOOKUP_ME first to get the authenticated user's ID
2. Search Posts
When to use: User wants to find tweets matching specific criteria
Tool sequence:
- Search recent tweets (last 7 days) [Required]TWITTER_RECENT_SEARCH
- Search full archive (Academic access) [Optional]TWITTER_FULL_ARCHIVE_SEARCH
- Get tweet count matching query [Optional]TWITTER_RECENT_SEARCH_COUNTS
Key parameters:
: Search query using Twitter search operatorsquery
: Results per page (10-100)max_results
: Pagination tokennext_token
/start_time
: ISO 8601 time rangeend_time
: Comma-separated fields to includetweet__fields
: Related objects to expandexpansions
Pitfalls:
- RECENT_SEARCH covers only the last 7 days; use FULL_ARCHIVE_SEARCH for older tweets
- FULL_ARCHIVE_SEARCH requires Academic Research or Enterprise access
- Query operators:
,from:username
,to:username
,is:retweet
,has:media-is:retweet - Empty results return
with nometa.result_count: 0
fielddata - Rate limits vary by endpoint and access level; check response headers
3. Look Up Users
When to use: User wants to find or inspect Twitter user profiles
Tool sequence:
- Get authenticated user [Optional]TWITTER_USER_LOOKUP_ME
- Look up by username [Optional]TWITTER_USER_LOOKUP_BY_USERNAME
- Look up by user ID [Optional]TWITTER_USER_LOOKUP_BY_ID
- Batch look up multiple users [Optional]TWITTER_USER_LOOKUP_BY_IDS
Key parameters:
: Twitter handle without @ prefixusername
: Numeric user ID stringid
: Comma-separated user IDs for batch lookupids
: Fields to return (description, public_metrics, etc.)user__fields
Pitfalls:
- Usernames are case-insensitive but must not include the @ prefix
- User IDs are numeric strings, not integers
- Suspended or deleted accounts return errors, not empty results
- LOOKUP_BY_IDS accepts max 100 IDs per request
4. Manage Bookmarks
When to use: User wants to save, view, or remove bookmarked tweets
Tool sequence:
- Get authenticated user ID [Prerequisite]TWITTER_USER_LOOKUP_ME
- List bookmarked posts [Required]TWITTER_BOOKMARKS_BY_USER
- Bookmark a post [Optional]TWITTER_ADD_POST_TO_BOOKMARKS
- Remove bookmark [Optional]TWITTER_REMOVE_A_BOOKMARKED_POST
Key parameters:
: User ID (from USER_LOOKUP_ME) for listing bookmarksid
: Tweet ID to bookmark or unbookmarktweet_id
: Results per pagemax_results
: Token for next pagepagination_token
Pitfalls:
- Bookmarks require the authenticated user's ID, not username
- Bookmarks are private; only the authenticated user can see their own
- Pagination uses
, notpagination_tokennext_token
5. Manage Lists
When to use: User wants to view or manage Twitter lists
Tool sequence:
- Get authenticated user ID [Prerequisite]TWITTER_USER_LOOKUP_ME
- List owned lists [Optional]TWITTER_GET_A_USER_S_OWNED_LISTS
- List memberships [Optional]TWITTER_GET_A_USER_S_LIST_MEMBERSHIPS
- Get pinned lists [Optional]TWITTER_GET_A_USER_S_PINNED_LISTS
- Get followed lists [Optional]TWITTER_GET_USER_S_FOLLOWED_LISTS
- Get list details [Optional]TWITTER_LIST_LOOKUP_BY_LIST_ID
Key parameters:
: User ID for listing owned/member/followed listsid
: List ID for specific list lookuplist_id
: Results per page (1-100)max_results
Pitfalls:
- List IDs and User IDs are numeric strings
- Lists endpoints require the user's numeric ID, not username
6. Interact with Posts
When to use: User wants to like, unlike, or view liked posts
Tool sequence:
- Get authenticated user ID [Prerequisite]TWITTER_USER_LOOKUP_ME
- Get liked posts [Optional]TWITTER_RETURNS_POST_OBJECTS_LIKED_BY_THE_PROVIDED_USER_ID
- Unlike a post [Optional]TWITTER_UNLIKE_POST
Key parameters:
: User ID for listing liked postsid
: Tweet ID to unliketweet_id
Pitfalls:
- Like/unlike endpoints require user ID from USER_LOOKUP_ME
- Liked posts pagination may be slow for users with many likes
Common Patterns
Search Query Syntax
Operators:
- Posts by userfrom:username
- Replies to userto:username
- Mentions user@username
- Contains hashtag#hashtag
- Exact match"exact phrase"
- Contains mediahas:media
- Contains linkshas:links
/is:retweet
- Include/exclude retweets-is:retweet
/is:reply
- Include/exclude replies-is:reply
- Language filterlang:en
Combinators:
- Space for AND
for either conditionOR
prefix for NOT-- Parentheses for grouping
Media Upload Flow
1. Upload media with TWITTER_UPLOAD_MEDIA (images) or TWITTER_UPLOAD_LARGE_MEDIA (video/GIF) 2. Get media_id from response 3. Pass media_id as string in media__media_ids array to TWITTER_CREATION_OF_A_POST
Known Pitfalls
Character Limits:
- Standard posts: 280 weighted characters
- Some Unicode characters count as more than 1
- URLs are shortened and count as fixed length (23 characters)
Rate Limits:
- Vary significantly by access tier (Free, Basic, Pro, Enterprise)
- Free tier: very limited (e.g., 1,500 posts/month)
- Check
header in responsesx-rate-limit-remaining
Idempotency:
- Post creation is NOT idempotent; duplicate posts will be created on retry
- Implement deduplication logic for automated posting
Quick Reference
| Task | Tool Slug | Key Params |
|---|---|---|
| Create post | TWITTER_CREATION_OF_A_POST | text |
| Delete post | TWITTER_POST_DELETE_BY_POST_ID | id |
| Look up post | TWITTER_POST_LOOKUP_BY_POST_ID | id |
| Recent search | TWITTER_RECENT_SEARCH | query |
| Archive search | TWITTER_FULL_ARCHIVE_SEARCH | query |
| Search counts | TWITTER_RECENT_SEARCH_COUNTS | query |
| My profile | TWITTER_USER_LOOKUP_ME | (none) |
| User by name | TWITTER_USER_LOOKUP_BY_USERNAME | username |
| User by ID | TWITTER_USER_LOOKUP_BY_ID | id |
| Users by IDs | TWITTER_USER_LOOKUP_BY_IDS | ids |
| Upload media | TWITTER_UPLOAD_MEDIA | media |
| Upload video | TWITTER_UPLOAD_LARGE_MEDIA | media |
| List bookmarks | TWITTER_BOOKMARKS_BY_USER | id |
| Add bookmark | TWITTER_ADD_POST_TO_BOOKMARKS | tweet_id |
| Remove bookmark | TWITTER_REMOVE_A_BOOKMARKED_POST | tweet_id |
| Unlike post | TWITTER_UNLIKE_POST | tweet_id |
| Liked posts | TWITTER_RETURNS_POST_OBJECTS_LIKED_BY_THE_PROVIDED_USER_ID | id |
| Owned lists | TWITTER_GET_A_USER_S_OWNED_LISTS | id |
| List memberships | TWITTER_GET_A_USER_S_LIST_MEMBERSHIPS | id |
| Pinned lists | TWITTER_GET_A_USER_S_PINNED_LISTS | id |
| Followed lists | TWITTER_GET_USER_S_FOLLOWED_LISTS | id |
| List details | TWITTER_LIST_LOOKUP_BY_LIST_ID | list_id |