Skills

Xitter

Post, read, and search X (Twitter) content using x-cli or the X API v2

Install

npx skills add taracodlabs/aiden --skill xitter -g -a claude-code -y
Repository
taracodlabs/aiden868
Category
Engineering
Updated
16d ago
License
Apache-2.0
Context cost
Lightabout 1,252 tokens
Runs scripts
No, instructions only

What it does

Post, read, and search X (Twitter) content using x-cli or the X API v2

X (Twitter) Automation

Read, post, and search X content using the x-cli command-line tool or the X API v2 directly. Requires X API credentials.

When to Use

  • User wants to post a tweet or thread on X
  • User wants to search for recent tweets on a topic
  • User wants to read their home timeline or mentions
  • User wants to fetch tweets from a specific account
  • User wants to schedule or automate social media posts

How to Use

1. Set up X API credentials

Register at https://developer.twitter.com → Create Project → Create App. Get:

  • API_KEY, API_SECRET
  • ACCESS_TOKEN, ACCESS_TOKEN_SECRET
  • BEARER_TOKEN (for read-only app-only auth)
$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"

2. Search recent tweets (Bearer Token, no user auth needed)

import 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)

3. Post a tweet (OAuth 1.0a)

import requests, os, time, hashlib, hmac, base64, urllib.parse, uuid

def post_tweet(text):
  url    = "https://api.twitter.com/2/tweets"
  params = {"text": text}
Read the whole SKILL.md on GitHub

More in Engineering