twitter-x
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTwitter/X Skill
Twitter/X 技能
Overview
概述
Automates Twitter/X operations including tweeting, engaging with content, managing followers, and analyzing metrics through the web interface.
通过网页界面自动化Twitter/X的操作,包括发推文、内容互动、关注者管理和指标分析。
Quick Install
快速安装
bash
curl -sSL https://canifi.com/skills/twitter-x/install.sh | bashOr manually:
bash
cp -r skills/twitter-x ~/.canifi/skills/bash
curl -sSL https://canifi.com/skills/twitter-x/install.sh | bash或者手动安装:
bash
cp -r skills/twitter-x ~/.canifi/skills/Setup
设置
Configure via canifi-env:
bash
undefined通过canifi-env进行配置:
bash
undefinedFirst, ensure canifi-env is installed:
首先,确保已安装canifi-env:
curl -sSL https://canifi.com/install.sh | bash
curl -sSL https://canifi.com/install.sh | bash
canifi-env set TWITTER_USERNAME "your-username"
canifi-env set TWITTER_PASSWORD "your-password"
undefinedcanifi-env set TWITTER_USERNAME "你的用户名"
canifi-env set TWITTER_PASSWORD "你的密码"
undefinedPrivacy & Authentication
隐私与认证
Your credentials, your choice. Canifi LifeOS respects your privacy.
你的凭证,由你做主。 Canifi LifeOS 尊重你的隐私。
Option 1: Manual Browser Login (Recommended)
选项1:手动浏览器登录(推荐)
If you prefer not to share credentials with Claude Code:
- Complete the Browser Automation Setup using CDP mode
- Login to the service manually in the Playwright-controlled Chrome window
- Claude will use your authenticated session without ever seeing your password
如果你不想与Claude Code共享凭证:
- 使用CDP模式完成浏览器自动化设置
- 在Playwright控制的Chrome窗口中手动登录服务
- Claude将使用你的已认证会话,且永远不会看到你的密码
Option 2: Environment Variables
选项2:环境变量
If you're comfortable sharing credentials, you can store them locally:
bash
canifi-env set SERVICE_EMAIL "your-email"
canifi-env set SERVICE_PASSWORD "your-password"Note: Credentials stored in canifi-env are only accessible locally on your machine and are never transmitted.
如果你愿意共享凭证,可以将其存储在本地:
bash
canifi-env set SERVICE_EMAIL "你的邮箱"
canifi-env set SERVICE_PASSWORD "你的密码"注意:存储在canifi-env中的凭证仅能在你的本地机器上访问,绝不会被传输。
Capabilities
功能
- Create and post tweets
- Retweet and quote tweet
- Like and bookmark tweets
- Follow/unfollow accounts
- Search users and topics
- View notifications and mentions
- Access analytics
- Create and manage lists
- 创建并发布推文
- 转发和引用推文
- 点赞和收藏推文
- 关注/取消关注账户
- 搜索用户和话题
- 查看通知和提及
- 访问分析数据
- 创建和管理列表
Usage Examples
使用示例
Example 1: Post a Tweet
示例1:发布推文
User: "Tweet about the new product feature"
Claude: I'll post that tweet.
- Navigate to twitter.com
- Click compose tweet
- Write tweet about new feature
- Add hashtags if appropriate
- Post tweet
- Confirm published用户:“发布关于新产品功能的推文”
Claude:我会发布这条推文。
- 导航至twitter.com
- 点击撰写推文
- 撰写关于新功能的推文
- 酌情添加话题标签
- 发布推文
- 确认已发布Example 2: Engage with Mentions
示例2:互动提及内容
User: "Reply to my recent mentions"
Claude: I'll respond to mentions.
- Navigate to Notifications > Mentions
- Review recent mentions
- Compose appropriate replies
- Post responses
- Confirm replies sent用户:“回复我最近的提及”
Claude:我会回复这些提及。
- 导航至通知 > 提及
- 查看最近的提及
- 撰写合适的回复
- 发布回复
- 确认回复已发送Example 3: Create Thread
示例3:创建推文线程
User: "Create a Twitter thread about our company story"
Claude: I'll create that thread.
- Compose first tweet
- Add subsequent tweets as replies
- Connect as thread
- Publish thread
- Confirm all tweets posted用户:“创建关于我们公司故事的Twitter线程”
Claude:我会创建这个线程。
- 撰写第一条推文
- 添加后续推文作为回复
- 关联为线程
- 发布线程
- 确认所有推文已发布Example 4: Check Analytics
示例4:查看分析数据
User: "Show me my tweet performance this week"
Claude: I'll pull your analytics.
- Navigate to Analytics section
- Gather impressions and engagement
- Compile this week's data
- Present performance summary用户:“展示我本周的推文表现”
Claude:我会提取你的分析数据。
- 导航至分析板块
- 收集曝光量和互动数据
- 整理本周的数据
- 呈现表现总结Authentication Flow
认证流程
- Navigate to twitter.com/login via Playwright MCP
- Enter username/email from canifi-env
- Enter password
- Handle phone/email verification if prompted
- Complete 2FA if enabled (notify user via iMessage)
- Verify home feed access
- Maintain session cookies
- 通过Playwright MCP导航至twitter.com/login
- 从canifi-env中输入用户名/邮箱
- 输入密码
- 如有提示,处理电话/邮箱验证
- 如启用了双因素认证(2FA),完成验证(通过iMessage通知用户)
- 验证主页信息流访问权限
- 保存会话Cookie
Error Handling
错误处理
- Login Failed: Try email vs username, retry
- Session Expired: Re-authenticate automatically
- 2FA Required: iMessage for verification code
- Verification Required: Handle phone/email check
- Rate Limited: Wait before retrying (15+ min)
- Tweet Failed: Check character limit and content
- Account Locked: Notify user of suspension
- Shadow Ban: Check account status
- 登录失败:尝试使用邮箱而非用户名,重试
- 会话过期:自动重新认证
- 需要双因素认证:通过iMessage获取验证码
- 需要验证:处理电话/邮箱验证
- 速率限制:等待后重试(15分钟以上)
- 推文发布失败:检查字符限制和内容
- 账户锁定:通知用户账户已暂停
- 影子封禁:检查账户状态
Self-Improvement Instructions
自我改进说明
When encountering new Twitter/X features:
- Document new UI elements
- Add support for new tweet types
- Log successful thread patterns
- Update for X rebranding changes
当遇到Twitter/X的新功能时:
- 记录新的UI元素
- 添加对新推文类型的支持
- 记录成功的线程模式
- 根据X的品牌更新进行适配
Notes
注意事项
- Twitter rebranded to X
- Character limit is 280 (4000 for Premium)
- Rate limits strictly enforced
- Premium features require subscription
- Analytics need time to populate
- Lists can be public or private
- Scheduled tweets available on web
- Twitter已更名为X
- 字符限制为280(高级账户为4000)
- 严格执行速率限制
- 高级功能需要订阅
- 分析数据需要时间生成
- 列表可以是公开或私有
- 网页端支持定时推文