Skip to main content

Overview

Twitter Hand is an AI-powered social media manager that creates content, manages your posting schedule, handles engagement, and tracks performance — all while maintaining your unique voice. Category: Communication
Icon: 𝕏 (X logo)

What It Does

1

Content Research

Analyze trending topics in your niche and identify content gaps
2

Generate Content

Create tweets, threads, and replies matching your brand voice
3

Build Queue

Maintain a queue of ready-to-post content (approval mode by default)
4

Manage Posting

Post on schedule or write to queue for your review
5

Engage

Reply to mentions and like relevant content (when enabled)
6

Track Performance

Monitor engagement rates and optimize content strategy

Requirements

Twitter Hand requires a Twitter/X Developer account and API access.

Twitter API Setup

1

Create Developer Account

Go to developer.twitter.com and sign up
2

Create Project & App

Create a new Project and App in the Developer Portal (free tier works)
3

Generate Bearer Token

Navigate to your App’s “Keys and tokens” page and generate a Bearer Token
4

Set Environment Variable

export TWITTER_BEARER_TOKEN=your_token_here
5

Restart OpenFang

Reload config for the token to take effect
Estimated setup time: 5-10 minutes

Configuration

Content Settings

SettingOptionsDescription
Content Styleprofessional, casual, witty, educational, provocative, inspirationalVoice and tone
Content TopicsComma-separatedTopics to tweet about (e.g., “AI, startups, productivity”)
Brand VoiceFree textDescribe your unique voice (e.g., “sarcastic founder who simplifies complex tech”)
Thread ModeToggleInclude multi-tweet threads in content mix

Posting Schedule

SettingOptionsDescription
Post Frequency1_daily, 3_daily, 5_daily, hourlyHow often to post
Content Queue Size5, 10, 20, 50Number of tweets to keep ready
Approval ModeToggle (default: ON)Review before posting vs auto-post
Approval mode is ON by default for safety. Tweets are written to a queue file for your review instead of posting automatically.

Engagement Settings

SettingOptionsDescription
Auto ReplyToggleAutomatically reply to mentions
Auto LikeToggleLike tweets from your network
Engagement Hoursbusiness_hours, waking_hours, all_dayWhen to check for engagement

Activation

Basic Setup

openfang hand activate twitter
Configure your voice and topics:
openfang hand config twitter \
  --set content_style="witty" \
  --set content_topics="AI agents, automation, productivity" \
  --set brand_voice="Technical founder who makes AI accessible with humor" \
  --set post_frequency="3_daily" \
  --set approval_mode="true"

Example Workflow

Style: Witty
Topics: AI agents, automation, productivity
Frequency: 3 tweets per day (8 AM, 12 PM, 5 PM)
Mode: Approval (queue for review)

> Generate 10 tweets about AI agent trends
Twitter Hand will:
  1. Research trending AI agent topics
  2. Generate 10 tweets in witty style
  3. Write to twitter_queue.json
  4. Create human-readable twitter_queue_preview.md
  5. Notify you that queue is ready for review
  6. Wait for your approval to post

How It Works

1. API Initialization

Verifies Twitter API access:
curl -H "Authorization: Bearer $TWITTER_BEARER_TOKEN" \
  "https://api.twitter.com/2/users/me"
Extracts your user_id and username for later API calls.

2. Content Research

Before generating content: Trend analysis:
web_search("AI agents trending today")
web_search("productivity latest news")
web_search("automation viral tweets") // for format inspiration only
Performance analysis:
curl -H "Authorization: Bearer $TWITTER_BEARER_TOKEN" \
  "https://api.twitter.com/2/tweets/search/recent?query=AI%20agents&max_results=10&tweet.fields=public_metrics"
Identifies:
  • What’s trending in your topics
  • Content gaps (what’s NOT being said)
  • High-performing tweet formats

3. Content Generation

7 content types in rotation:
TypeDescriptionExample
Hot takeStrong opinion on trending topic”Unpopular opinion: Most ‘AI agents’ are just chatbots with extra steps”
ThreadDeep dive (3-10 tweets)“Why agent frameworks are about to eat traditional SaaS 🧵“
Tip/How-toActionable advice”Build your first AI agent in 5 lines of Python:…”
QuestionEngagement driver”What’s the hardest part of building AI agents? 🤔“
Curated shareLink + insight”This article on ReAct agents is 🔥 [link] Key insight:…”
Story/AnecdotePersonal narrative”I spent 6 months building agents. Here’s what I learned…”
Data/StatInteresting data + commentary”AI agent API calls grew 400% in Q1. This changes everything because…”
Style adaptation:
// Professional style
"AI agents represent a fundamental shift in how we interact with software systems."

// Casual style
"ngl ai agents are kinda wild when you see them in action 🤖"

// Witty style
"AI agents are like interns who never sleep, complain, or ask for equity. Perfect."

// Educational style
"Let's break down how AI agents work:
1. LLM generates plan
2. Tools execute actions
3. Results feed back
4. Repeat until done"

// Provocative style
"Hot take: If your 'AI agent' can't handle failures, it's not an agent — it's a script."

// Inspirational style
"Imagine a world where every repetitive task runs itself. We're building that future. ✨"
Tweet rules:
  • 280 characters max (hard limit)
  • Front-load hook (first line grabs attention)
  • Use line breaks for readability
  • 0-2 hashtags max (avoid spam)
  • Threads: first tweet must stand alone

4. Content Queue

If approval_mode = true (default): Queue file (twitter_queue.json):
[
  {
    "id": "q_001",
    "content": "Unpopular opinion: Most 'AI agents' are just chatbots with extra steps.\n\nReal agents:\n• Plan multi-step workflows\n• Use tools autonomously\n• Recover from failures\n
Chatbots with function calling aren't agents. They're assistants.\n\nThe bar is higher.",
    "type": "hot_take",
    "created": "2026-03-06T10:30:00Z",
    "status": "pending"
  },
  {
    "id": "q_002",
    "content": "Build your first AI agent in 5 lines of Python:\n\n```python\nfrom anthropic import Anthropic\nclient = Anthropic()\nresponse = client.messages.create(\n  model='claude-3-5-sonnet',\n  tools=[calculator, web_search],\n  messages=[{'role': 'user', 'content': 'Research AI trends'}]\n)\n```\n\nThat's it. Claude handles the rest.",
    "type": "tip",
    "created": "2026-03-06T10:31:00Z",
    "status": "pending"
  }
]
Preview file (twitter_queue_preview.md):
# Twitter Queue — 10 tweets ready

## Tweet 1 (Hot take)
Unpopular opinion: Most 'AI agents' are just chatbots with extra steps.

Real agents:
• Plan multi-step workflows
• Use tools autonomously
• Recover from failures

Chatbots with function calling aren't agents. They're assistants.

The bar is higher.

---

## Tweet 2 (Tip)
Build your first AI agent in 5 lines of Python:

```python
from anthropic import Anthropic
...

[… 8 more tweets …]

To approve and post:
1. Review `twitter_queue_preview.md`
2. Edit if needed
3. Tell Twitter Hand: "Post the queue" or "Post tweet #1"

### 5. Posting (Manual Approval or Auto)

If approved:

**Post a tweet:**
```bash
curl -X POST "https://api.twitter.com/2/tweets" \
  -H "Authorization: Bearer $TWITTER_BEARER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"text": "tweet content here"}'
Post a thread:
# Tweet 1
curl -X POST "https://api.twitter.com/2/tweets" \
  -d '{"text": "Thread hook tweet"}' \
  -o response1.json

# Extract tweet_id from response1.json
FIRST_ID=$(jq -r '.data.id' response1.json)

# Tweet 2 (reply to tweet 1)
curl -X POST "https://api.twitter.com/2/tweets" \
  -d '{"text": "Thread continuation", "reply": {"in_reply_to_tweet_id": "'$FIRST_ID'"}}' \
  -o response2.json

# Repeat for remaining tweets in thread
Rate limits: Twitter API allows 300 tweets per 3 hours. Twitter Hand respects this automatically. Logs each posted tweet to twitter_posted.json:
{
  "id": "1234567890",
  "text": "...",
  "posted_at": "2026-03-06T12:00:00Z",
  "type": "hot_take",
  "metrics": null // updated later
}

6. Engagement

If auto_reply or auto_like enabled: Check mentions:
curl -H "Authorization: Bearer $TWITTER_BEARER_TOKEN" \
  "https://api.twitter.com/2/users/$USER_ID/mentions?max_results=10&tweet.fields=created_at"
Generate reply (if auto_reply enabled):
// Mention: "@you What's the best agent framework?"
// Generated reply (matching your style):
"Great question! For production, I'd go with LangGraph (flexibility) or Claude's native tool use (simplicity). Depends if you need complex workflows or straightforward tasks."
In approval mode, replies go to queue. Otherwise, posted directly. Auto-like (if enabled):
curl -X POST "https://api.twitter.com/2/users/$USER_ID/likes" \
  -H "Authorization: Bearer $TWITTER_BEARER_TOKEN" \
  -d '{"tweet_id": "1234567890"}'
Like tweets from:
  • People who engage with you
  • Relevant content in your topics
Max 50 likes per cycle (avoid rate limits).
Twitter Hand NEVER:
  • Argues with trolls
  • Engages with toxic accounts
  • Posts defamatory or harmful content
  • Impersonates others
  • Violates Twitter Terms of Service

7. Performance Tracking

Fetch metrics for recent tweets:
curl -H "Authorization: Bearer $TWITTER_BEARER_TOKEN" \
  "https://api.twitter.com/2/tweets?ids=ID1,ID2,ID3&tweet.fields=public_metrics"
Response:
{
  "data": [
    {
      "id": "1234567890",
      "text": "...",
      "public_metrics": {
        "retweet_count": 12,
        "reply_count": 8,
        "like_count": 45,
        "quote_count": 3,
        "bookmark_count": 7,
        "impression_count": 2341
      }
    }
  ]
}
Analyze patterns:
  • Which content types perform best?
  • Which posting times get most engagement?
  • Which topics resonate most?
Stores insights in knowledge graph for future content optimization.

Output

FileDescription
twitter_queue.jsonPending tweets (JSON)
twitter_queue_preview.mdHuman-readable queue
twitter_posted.jsonPosting history with metrics

Dashboard Metrics

  • Tweets Posted — Total tweets published
  • Replies Sent — Total engagement replies
  • Queue Size — Current queue size
  • Engagement Rate — Average engagement rate

Tips & Best Practices

For best results:
  • Start with approval mode ON — review quality before auto-posting
  • Be specific with brand_voice — “Technical founder” is better than “professional”
  • Mix content types — all hot takes or all threads gets stale
  • Review performance weekly — refine topics based on what works
  • Keep queue size at 10-20 for flexibility

Common Issues

“Unauthorized error”
Check your Bearer Token: echo $TWITTER_BEARER_TOKEN
Regenerate if needed via Developer Portal.
“Rate limit exceeded”
Twitter limits 300 tweets per 3 hours. Twitter Hand respects this, but manual posting can hit limits.
“Tweets lack personality”
Be more specific in brand_voice. Instead of “professional,” try “CTO who explains AI like teaching a 5-year-old, with occasional sarcasm.”
“Low engagement”
Check performance metrics. Try different content types, posting times, or topics. Engagement takes time to build.

Advanced Usage

On-Demand Content

Generate 5 tweets about [breaking news topic]

Thread Deep-Dives

Write a 10-tweet thread explaining AI agent architectures for developers

Reply to Specific Tweet

Reply to this mention with a helpful response: [tweet URL or text]

Performance Analysis

Analyze my tweet performance from the last month. What's working?

Export Content Calendar

cat twitter_queue.json | jq -r '.[] | "\(.created): \(.content)"'

Safety & Guidelines

Important safety rules:
  • Approval mode is ON by default for good reason — AI can make mistakes
  • Review tweets before posting to large audiences
  • Never store passwords or API keys in tweets
  • Don’t post private information about anyone
  • Block/ignore trolls — never engage negatively
  • Respect Twitter’s automation rules and rate limits

Next Steps

Clip Hand

Create video clips to share on Twitter

Researcher Hand

Research trending topics for tweet content