---
name: use-twitter
description: Interact with Twitter/X using cookie-based authentication. Read timeline, bookmarks, post tweets, reply, search, and more — without needing API keys or OAuth.
metadata:
  auth_method: cookies
  requires: auth_token and ct0 cookies from browser
---
# use-twitter

This Skill lets you interact with Twitter/X using cookie-based authentication. No API keys or OAuth required.

## How to Get Your Cookies

### Option 1: Chrome DevTools (Fastest)

1. Open https://x.com in Chrome (must be logged in)
2. Press **F12** or **Cmd+Option+I** to open DevTools
3. Go to the **Application** tab
4. Left sidebar → **Cookies** → `https://x.com`
5. Find and copy these two **Value** fields:
   - `auth_token`
   - `ct0`

### Option 2: From Mac Terminal

```bash
bunx @steipete/bird check
```

Then use the tokens shown.

## Setup in Zo

Go to [Settings > Developers](/?t=settings&s=developers) and add two secrets:
- `TWITTER_AUTH_TOKEN` — Your `auth_token` value
- `TWITTER_CT0` — Your `ct0` value

## Usage

Run from `scripts/twitter.ts`:

```bash
bun scripts/twitter.ts <command> [args]
```

### Available Commands

| Command | Description |
|---------|-------------|
| `timeline` | Get your home timeline (recent tweets) |
| `bookmarks` | Get your bookmarked tweets |
| `notifications` | Get your notifications |
| `mentions` | Get tweets mentioning you |
| `post <text>` | Post a new tweet |
| `reply <tweet-id> <text>` | Reply to a tweet |
| `search <query>` | Search for tweets |
| `user <handle>` | Get a user's recent tweets |
| `like <tweet-id>` | Like a tweet |

### Examples

```bash
# Read your timeline
bun scripts/twitter.ts timeline

# Get bookmarks
bun scripts/twitter.ts bookmarks

# Post a tweet
bun scripts/twitter.ts post "Hello from Zo!"

# Reply to a tweet
bun scripts/twitter.ts reply 123456789 "Great point!"

# Search
bun scripts/twitter.ts search "AI agents"
```

## Security Notes

- Cookies are session tokens that last months to years
- Invalidated if you log out of that browser session
- Can be revoked in Twitter Settings → Security → Sessions
- Stored as Zo secrets, not in the skill files

## Troubleshooting

If you see "login required" errors:
1. Your cookies may have expired — re-export from DevTools
2. You may have logged out of Twitter in that browser

For help with Bird (Mac CLI): https://github.com/steipete/bird