/mirra:twitterfrom mirra
Posts tweets, uploads media, searches and retrieves Twitter (X) data via Mirra API. Covers postTweet, uploadMedia, getUserTweets, advancedSearch, getTweetById operations.
Ships in mirra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Twitter (X) posting and social media management
You need the user's API key. Ask for these if not provided:
API_KEY: Mirra API key (generated in Mirra app > Settings > API Keys)API_URL: Defaults to https://api.fxn.world (only ask if they mention a custom server)Note: Twitter requires OAuth authentication. The user must have connected their Twitter account in the Mirra app before these operations will work.
All operations use a single POST endpoint with the resource ID and method in the body:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{
"resourceId": "twitter",
"method": "{operation}",
"params": { ...args }
}' | jq .
Replace {operation} with the operation name from the table below.
Legacy alternative:
POST ${API_URL}/api/sdk/v1/twitter/{operation}with args as the request body also works but is not recommended for new integrations.
| Operation | Description |
|---|---|
postTweet | Post a tweet, optionally with up to 4 images. Upload each image with uploadMedia first and pass t... |
uploadMedia | Upload one image to X and get back a media id for postTweet. Takes a public https URL — X is not ... |
getUserTweets | Retrieve tweets from a Twitter user. Must provide either userId OR userName (not both). NOTE: Thi... |
advancedSearch | Search tweets using advanced Twitter search syntax. Supports operators like from:username, since:... |
getTweetById | Fetch one or more tweets by their IDs. Useful for retrieving parent/original tweets when processi... |
postTweetPost a tweet, optionally with up to 4 images. Upload each image with uploadMedia first and pass the ids it returns.
Arguments:
text (string, required): Tweet text (max 280 characters)mediaIds (array, optional): Up to 4 media ids from uploadMedia. Images do not consume characters.Returns:
AdapterOperationResult: Returns { tweetId: string, text: string } in result.data
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"twitter","method":"postTweet","params":{"text":"<value>"}}' | jq .
Warning: This is a destructive operation. Confirm with the user before executing.
uploadMediaUpload one image to X and get back a media id for postTweet. Takes a public https URL — X is not sent the link, the bytes are fetched and uploaded. Max 5MB; JPEG, PNG, WebP or GIF. Requires the media.write scope: a connection authorized before image posting shipped must be reconnected first.
Arguments:
imageUrl (string, required): Public https URL of the image to uploadaltText (string, optional): Alt text describing the image, for people using a screen reader (max 1000 chars)Returns:
AdapterOperationResult: Returns { mediaId: string } in result.data — pass it to postTweet as mediaIds: [mediaId]
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"twitter","method":"uploadMedia","params":{"imageUrl":"https://example.com"}}' | jq .
Warning: This is a destructive operation. Confirm with the user before executing.
getUserTweetsRetrieve tweets from a Twitter user. Must provide either userId OR userName (not both). NOTE: This operation ONLY accepts the 4 parameters listed below. There is NO maxResults, limit, count, or similar parameters - the API returns ~20 tweets per page, use cursor for pagination.
Arguments:
userId (string, optional): Twitter user ID (recommended for stability and speed). Provide userId OR userName, not both.userName (string, optional): Twitter username/handle without @ symbol (e.g., "elonmusk"). Provide userName OR userId, not both.cursor (string, optional): Pagination cursor from previous response's nextCursor field. Do not fabricate cursor values.includeReplies (boolean, optional): Whether to include replies in results. Defaults to false (only original tweets).Returns:
AdapterOperationResult: Returns normalized flat structure: { tweets: NormalizedTweet[], hasNextPage, nextCursor, totalRetrieved }. Each tweet has FLAT fields (no nested author object): id, text, url, createdAt, lang, likeCount, retweetCount, replyCount, quoteCount, viewCount, bookmarkCount, isReply, isRetweet, inReplyToTweetId, conversationId, source, authorId, authorName, authorUserName, authorFollowers, authorFollowing, authorIsVerified, authorVerifiedType, authorCreatedAt. For replies: inReplyToTweetId contains the parent tweet ID, conversationId contains the thread root tweet ID.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"twitter","method":"getUserTweets","params":{}}' | jq .
advancedSearchSearch tweets using advanced Twitter search syntax. Supports operators like from:username, since:date, until:date, lang:en, and boolean operators (AND, OR). NOTE: This operation ONLY accepts the 3 parameters listed below (query, queryType, cursor). There is NO minFollowers, maxResults, limit, or other filtering parameters - filter results client-side after fetching.
Arguments:
query (string, required): Search query with advanced syntax. Examples: "from:elonmusk", "bitcoin since:2024-01-01", "AI OR "machine learning"". Supported operators: from:user, to:user, since:YYYY-MM-DD, until:YYYY-MM-DD, lang:xx, filter:media, filter:links, -filter:retweets, AND, OR, -keyword, "exact phrase".queryType (string, optional): Type of search results: "Latest" (most recent) or "Top" (most relevant). Defaults to "Latest". Only these two values are valid.cursor (string, optional): Pagination cursor from previous response's nextCursor field. Do not fabricate cursor values.Returns:
AdapterOperationResult: Returns normalized flat structure: { query, queryType, tweets: NormalizedTweet[], hasNextPage, nextCursor, totalRetrieved }. Each tweet has FLAT fields (no nested author object): id, text, url, createdAt, lang, likeCount, retweetCount, replyCount, quoteCount, viewCount, bookmarkCount, isReply, isRetweet, inReplyToTweetId, conversationId, source, authorId, authorName, authorUserName, authorFollowers, authorFollowing, authorIsVerified, authorVerifiedType, authorCreatedAt. For replies: inReplyToTweetId contains the parent tweet ID, conversationId contains the thread root tweet ID. To filter by follower count, check tweet.authorFollowers >= threshold.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"twitter","method":"advancedSearch","params":{"query":"search term"}}' | jq .
getTweetByIdFetch one or more tweets by their IDs. Useful for retrieving parent/original tweets when processing replies. Accepts a single ID or comma-separated list of IDs (max 100).
Arguments:
tweetIds (string, required): One or more tweet IDs, comma-separated. Example: "1846987139428634858" or "1846987139428634858,1866332309399781537"Returns:
AdapterOperationResult: Returns normalized flat structure: { tweets: NormalizedTweet[], totalRetrieved }. Each tweet has the same FLAT fields as advancedSearch results: id, text, url, createdAt, lang, likeCount, retweetCount, replyCount, quoteCount, viewCount, bookmarkCount, isReply, isRetweet, inReplyToTweetId, conversationId, source, authorId, authorName, authorUserName, authorFollowers, authorFollowing, authorIsVerified, authorVerifiedType, authorCreatedAt.
Example:
curl -s -X POST "${API_URL}/api/sdk/v2/resources/call" \
-H "Content-Type: application/json" \
-H "x-api-key: ${API_KEY}" \
-d '{"resourceId":"twitter","method":"getTweetById","params":{"tweetIds":"<ID>"}}' | jq .
All SDK responses return the operation payload wrapped in a standard envelope:
{
"success": true,
"data": { ... }
}
The data field contains the operation result. Error responses include:
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message"
}
}
jq . to pretty-print responses, jq .data to extract just the payloaddata.results or directly in data (check examples)--fail-with-body to curl to see error details on HTTP failuresexport API_KEY="your-key"What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub oz-networks/mirra-sdk --plugin mirra39 skills in this plugin
/aiUse Mirra to access ai services for chat, decisions, and streaming with multi-provider support. Covers all AI Services SDK operations via REST API./channelsUse Mirra to the places a space publishes to — its corporate x, blog, newsletter — and the drafted copy waiting to go out to them. use listchannels to see what this space.... Covers all Space Channels SDK operations via REST API./contactsUse Mirra to manage user contacts - list, add, remove, search, block, and unblock contacts. Covers all Contacts SDK operations via REST API.Other plugins' skills for the same job