2
总安装量
2
周安装量
#75578
全站排名
安装命令
npx skills add https://github.com/secureskills-io/twitter-skill --skill twitter
Agent 安装分布
replit
2
openclaw
2
mcpjam
1
claude-code
1
windsurf
1
zencoder
1
Skill 文档
twitter-skill ð¦
Twitter/X CLI for OpenClaw agents with automatic cookie management.
Install
git clone https://github.com/SecureSkills-io/twitter-skill.git
cd twitter-skill && npm link
Authentication
Option 1: Save cookies directly
twitter auth <auth_token> <ct0> [twid] [guest_id]
Option 2: Save full cookie array (from browser export)
twitter auth --cookies-json '[{"name":"auth_token","value":"...",...}]'
Option 3: Environment variables
export TWITTER_AUTH_TOKEN="your_auth_token"
export TWITTER_CT0="your_ct0"
export TWITTER_TWID="your_twid"
Cookies are stored in ~/.config/twitter-skill/cookies.json with 600 permissions.
Commands
Post a Tweet
twitter post "Hello world!"
twitter tweet "Hello world!" # alias
Post a Thread
# Inline (split by ---)
twitter thread "First tweet---Second tweet---Third tweet"
# From file
twitter thread my-thread.txt
File format (my-thread.txt):
First tweet
---
Second tweet
---
Third tweet
Reply to a Tweet
twitter reply https://x.com/user/status/123456 "Great post!"
Like a Tweet
twitter like https://x.com/user/status/123456
Extract Fresh Cookies
After browser activity, extract updated cookies:
twitter extract
This updates ~/.config/twitter-skill/cookies.json with fresh session data.
Check Authentication
twitter whoami
How It Works
- Cookie Injection: The skill injects stored cookies into a Playwright browser session
- Browser Automation: Performs actions (post, reply, like) via browser automation
- Cookie Extraction: After actions, extracts fresh cookies and saves them
- Session Persistence: Fresh cookies ensure the session stays valid
Security
- Cookies stored with 600 permissions (owner read/write only)
- No external API dependencies
- Uses existing browser session (CDP on port 18800)
- Respects X’s rate limits with built-in delays
Requirements
- Node.js 18+
- Playwright browser running on CDP port 18800
- Valid X/Twitter session cookies
Trust Score
8.0/10 â Medium risk
- Network: Basic â X API calls
- Filesystem: Config only â ~/.config/twitter-skill/
- Credentials: User-provided â Cookie-based auth
- System: None â Browser automation only
TL;DR: Save cookies once, post/extract/update automatically. ð¦