원클릭으로
twitter-agent
Twitter, tweet, timeline, mentions, X, social media, feed, engagement, replies, drafts, scoring (project)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Twitter, tweet, timeline, mentions, X, social media, feed, engagement, replies, drafts, scoring (project)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
brief, summary, daily, weekly, end of day, EOD, digest, morning, recap, meeting prep, what's due, status update, review
Interactive web tasks, browser login, click, scroll, form interaction, authenticated sessions, Playwright MCP (project)
Query and summarize Claude Code terminal session history
Email, inbox, Outlook, Microsoft 365, mail, messages, fetch emails, search emails, draft, reply, email processing (project)
fact, decision, architecture, knowledge, permanent, remember forever, always know, decisions, outcomes, lessons learned
GitHub CLI, docker commands, git operations, curl, native CLI tools, gh issue, gh pr, container, repository, API calls (project)
| name | twitter-agent |
| description | Twitter, tweet, timeline, mentions, X, social media, feed, engagement, replies, drafts, scoring (project) |
Twitter/X social management agent. Extracts feed, scores posts for relevance, and creates draft responses for the user's approval.
references/operating-manual.md for voice, audience, and approval gates# Extract posts from timeline (requires Playwright MCP login)
python twitter.py extract --limit 20
# Score unscored posts (surfaces high-relevance only)
python twitter.py score-feed
# View high-relevance posts
python twitter.py high-relevance
# List pending drafts
python twitter.py drafts
# Create a draft reply (does NOT post)
python twitter.py draft-reply POST_ID "Response text"
Timeline ─> Extract ─> Score ─> Present High-Relevance ─> User Reviews
│
Create Drafts (if warranted)
│
User Approves/Rejects
│
User Posts Manually
Twitter extraction requires Playwright MCP with persistent login:
# Install Playwright MCP with persistent browser session
claude mcp add playwright -- npx @playwright/mcp@latest --user-data-dir ~/.playwright-data/twitter
# First time: log in via the browser
# Subsequent runs: session persists
Per the user's Operating Manual, prioritize these audiences:
The user should ONLY engage when he can:
from twitter import extract_feed, store_extracted_post
# Get extraction instructions (uses Playwright MCP)
result = extract_feed(limit=20)
# Follow the instructions with browser tools
# Store each extracted tweet
store_extracted_post(
post_id="1234567890",
author_name="Display Name",
author_handle="username",
content="Tweet content here",
engagement={"likes": 50, "retweets": 10}
)
from twitter import score_relevance, score_feed, get_high_relevance_posts
# Score a single post
result = score_relevance(post)
# Returns: {score, audience_match, engagement_fit, reasoning, suggested_action}
# Score all unscored posts and get high-relevance ones (>0.9)
high_relevance = score_feed(min_score=0.9)
# Get already-scored high-relevance posts
posts = get_high_relevance_posts(min_score=0.9)
from twitter import draft_reply, draft_quote, draft_dm, get_pending_drafts
# Create draft reply to a post
result = draft_reply(post_id=42, suggested_text="Great point about HPC...")
# Returns: {success, draft_id, message: "the user must review and post manually"}
# Create draft quote tweet
result = draft_quote(post_id=42, suggested_text="This connects to...")
# Create draft DM
result = draft_dm(handle="username", suggested_text="Quick question...")
# List all pending drafts for the user to review
drafts = get_pending_drafts()
from twitter import approve_draft, reject_draft
# the user approves a draft (still must manually post)
approve_draft(draft_id=1)
# the user rejects a draft
reject_draft(draft_id=1)
# Extract tweets from timeline
python twitter.py extract [--limit N]
# Store a tweet manually
python twitter.py store POST_ID --author "Name" --handle "username" --content "Text"
# Score all unscored posts
python twitter.py score-feed [--min-score 0.9] [--show-all]
# Score a single post
python twitter.py score-post DB_ID
# Show high-relevance posts
python twitter.py high-relevance [--min-score 0.9]
# List pending drafts
python twitter.py drafts
# Create drafts (DOES NOT POST)
python twitter.py draft-reply POST_ID "Response text"
python twitter.py draft-quote POST_ID "Quote text"
python twitter.py draft-dm HANDLE "DM text"
# Approve/reject drafts
python twitter.py approve DRAFT_ID
python twitter.py reject DRAFT_ID
| User Says | Action |
|---|---|
| "Check my Twitter" | Extract feed, score, show high-relevance posts |
| "Any good engagement opportunities?" | python twitter.py high-relevance |
| "Draft a reply to that post" | draft_reply(post_id, text) + show draft |
| "Reply to @username about X" | Search posts, create draft_reply |
| "DM that person" | draft_dm(handle, text) |
| "Show pending drafts" | python twitter.py drafts |
| "Approve draft 5" | approve_draft(5) + remind the user to post manually |
Can post without asking:
Must get user approval on:
Ban list:
Stores all extracted posts:
| Column | Description |
|---|---|
| id | Database ID |
| platform | Always "twitter" |
| post_id | Twitter's post ID |
| author_name | Display name |
| author_handle | @handle (no @) |
| content | Tweet text |
| engagement | JSON: {likes, retweets, replies} |
| relevance_score | 0.0-1.0 from scoring |
| suggested_action | reply/quote/like/ignore |
| action_taken | What was done |
| captured_at | When extracted |
Stores draft responses:
| Column | Description |
|---|---|
| id | Draft ID |
| post_id | FK to social_feed (for replies/quotes) |
| draft_type | reply/quote/dm |
| target_handle | For DMs |
| draft_text | Draft content |
| status | pending/approved/rejected |
| created_at | When drafted |
| approved_at | When approved |
references/operating-manual.md - the user's full X Operating ManualRemember: This is a DRAFT-ONLY system. Never auto-post. the user must manually post all content.