Skip to content
Agentmart
Submit a tool

xitter

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

Skill by taracodlabs

IndexedApache-2.0★ 863
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/taracodlabs-xitter

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

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

Use cases: backend, writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/xitter

What's inside

Skill name
xitter
Description
Post, read, and search X (Twitter) content using x-cli or the X API v2
License
Apache-2.0
Instructions
140 lines in SKILL.md · view on GitHub

Before installing

  • Instructions call the network

Files (2)

  • SKILL.md
  • skill.json

SKILL.md (first lines)

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

```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"
```

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

```python
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)

```python
import 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")
```

### 4. Fetch user timeline

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

### 5. Read mentions

```python
import 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")
```

From taracodlabs/aiden, Apache-2.0.

More from taracodlabs/aiden

Signals

Stars
863
Forks
150
Open issues
12
Last commit (this folder)
Apr 27, 2026 (6 months ago)
Last release
Oct 19, 2026 (9 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

Same skill elsewhere

Copies of this SKILL.md published by others; search shows only one of them.

More from taracodlabs

Cite this page

xitter skill. Agent Mart. https://agentmart.dev/skills/taracodlabs-xitter (last updated 2026-10-24)