Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Post, read, and search X (Twitter) content using x-cli or the X API v2
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 598% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 35% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 23% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 43% | 0% |
| case-07 | ✓→✓ | = Same ✓ | 57% | 0% |
Read, post, and search X content using the x-cli command-line tool or the X API v2 directly. Requires X API credentials.
Register at https://developer.twitter.com → Create Project → Create App. Get:
API_KEY, API_SECRETACCESS_TOKEN, ACCESS_TOKEN_SECRETBEARER_TOKEN (for read-only app-only auth)powershell$env:X_BEARER_TOKEN = "your_bearer_token" $env:X_API_KEY = "your_api_key" $env:X_API_SECRET = "your_api_secret" $env:X_ACCESS_TOKEN = "your_access_token" $env:X_ACCESS_SECRET = "your_access_secret"
pythonimport requests, os def search_tweets(query, max_results=10): headers = {"Authorization": f"Bearer {os.environ['X_BEARER_TOKEN']}"} params = { "query": f"{query} -is:retweet lang:en", "max_results": max_results, "tweet.fields": "created_at,author_id,public_metrics" } resp = requests.get("https://api.twitter.com/2/tweets/search/recent", headers=headers, params=params) resp.raise_for_status() for tweet in resp.json().get("data", []): print(f"• {tweet['text'][:120]}") print(f" {tweet['created_at']} likes={tweet['public_metrics']['like_count']}\n") search_tweets("Aiden AI agent 2026", max_results=5)
pythonimport requests, os, time, hashlib, hmac, base64, urllib.parse, uuid def post_tweet(text): url = "https://api.twitter.com/2/tweets" params = {"text": text} # OAuth 1.0a signature oauth_params = { "oauth_consumer_key": os.environ["X_API_KEY"], "oauth_nonce": uuid.uuid4().hex, "oauth_signature_method": "HMAC-SHA1", "oauth_timestamp": str(int(time.time())), "oauth_token": os.environ["X_ACCESS_TOKEN"], "oauth_version": "1.0", } signing_key = "&".join([urllib.parse.quote(os.environ["X_API_SECRET"], safe=""), urllib.parse.quote(os.environ["X_ACCESS_SECRET"], safe="")]) base_string = "&".join(["POST", urllib.parse.quote(url, safe=""), urllib.parse.quote("&".join(f"{k}={v}" for k,v in sorted(oauth_params.items())), safe="")]) signature = base64.b64encode(hmac.new(signing_key.encode(), base_string.encode(), hashlib.sha1).digest()).decode() oauth_params["oauth_signature"] = signature auth_header = "OAuth " + ", ".join(f'{k}="{urllib.parse.quote(v, safe="")}"' for k,v in oauth_params.items()) resp = requests.post(url, json=params, headers={"Authorization": auth_header, "Content-Type": "application/json"}) resp.raise_for_status() print(f"Posted tweet: {resp.json()['data']['id']}") post_tweet("Hello from Aiden! 🤖 #AI #automation")
pythonimport requests, os def get_user_timeline(username, max_results=10): headers = {"Authorization": f"Bearer {os.environ['X_BEARER_TOKEN']}"} user = requests.get(f"https://api.twitter.com/2/users/by/username/{username}", headers=headers).json() user_id = user["data"]["id"] resp = requests.get( f"https://api.twitter.com/2/users/{user_id}/tweets", headers=headers, params={"max_results": max_results, "tweet.fields": "created_at,public_metrics", "exclude": "retweets"} ) for tweet in resp.json().get("data", []): print(f"• {tweet['text'][:120]}\n {tweet['created_at']}\n") get_user_timeline("elonmusk", max_results=5)
pythonimport requests, os def get_mentions(user_id, max_results=10): headers = {"Authorization": f"Bearer {os.environ['X_BEARER_TOKEN']}"} resp = requests.get( f"https://api.twitter.com/2/users/{user_id}/mentions", headers=headers, params={"max_results": max_results, "tweet.fields": "created_at,author_id"} ) for tweet in resp.json().get("data", []): print(f"• {tweet['text'][:120]}\n {tweet['created_at']}\n")
"Search for recent tweets about LLM agents" → Use step 2 with query "LLM agents".
"Post a tweet saying 'Aiden just automated my morning report'" → Ask user to confirm before posting, then use step 3.
"Show me the last 10 tweets from a specific account" → Use step 4 with the target username.
Other measured skills in the registry, with their headline benchmark lift.