reddit-chat

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Reddit Chat Skill

Reddit Chat Skill

Overview

概述

Automates Reddit chat and messaging operations including direct messages, group chats, and subreddit chat rooms through browser automation.
通过浏览器自动化实现Reddit聊天和消息操作的自动化,包括私信、群聊和子版块聊天室。

Quick Install

快速安装

bash
curl -sSL https://canifi.com/skills/reddit-chat/install.sh | bash
Or manually:
bash
cp -r skills/reddit-chat ~/.canifi/skills/
bash
curl -sSL https://canifi.com/skills/reddit-chat/install.sh | bash
或者手动安装:
bash
cp -r skills/reddit-chat ~/.canifi/skills/

Setup

配置

Configure via canifi-env:
bash
undefined
通过canifi-env进行配置:
bash
undefined

First, ensure canifi-env is installed:

首先,确保已安装canifi-env:

canifi-env set REDDIT_USERNAME "your-username" canifi-env set REDDIT_PASSWORD "your-password"
undefined
canifi-env set REDDIT_USERNAME "your-username" canifi-env set REDDIT_PASSWORD "your-password"
undefined

Privacy & 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:
  1. Complete the Browser Automation Setup using CDP mode
  2. Login to the service manually in the Playwright-controlled Chrome window
  3. Claude will use your authenticated session without ever seeing your password
如果你不想与Claude Code共享凭据:
  1. 使用CDP模式完成浏览器自动化设置
  2. 在Playwright控制的Chrome窗口中手动登录该服务
  3. 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 "your-email"
canifi-env set SERVICE_PASSWORD "your-password"
注意:存储在canifi-env中的凭据仅能在你的本地机器上访问,绝不会被传输。

Capabilities

功能

  • Send direct messages to users
  • Create and manage group chats
  • Participate in subreddit chat rooms
  • Search message history
  • Share posts via chat
  • Send images and GIFs
  • Manage chat notifications
  • Block and report users
  • 向用户发送私信
  • 创建和管理群聊
  • 参与子版块聊天室
  • 搜索消息历史
  • 通过聊天分享帖子
  • 发送图片和GIF
  • 管理聊天通知
  • 屏蔽和举报用户

Usage Examples

使用示例

Example 1: Send a DM

示例1:发送私信

User: "Message u/helpful_redditor thanking them for their advice"
Claude: I'll send that message.
- Navigate to reddit.com/chat
- Search for u/helpful_redditor
- Start or open conversation
- Send thank you message
- Confirm delivery
用户:“给u/helpful_redditor发消息,感谢他们的建议”
Claude:我会发送这条消息。
- 导航至reddit.com/chat
- 搜索u/helpful_redditor
- 开始或打开对话
- 发送感谢消息
- 确认送达

Example 2: Create Group Chat

示例2:创建群聊

User: "Create a Reddit group chat with the mod team"
Claude: I'll create that group chat.
- Open chat interface
- Click create group
- Add moderator usernames
- Name the group
- Confirm group created
用户:“创建一个包含版主团队的Reddit群聊”
Claude:我会创建这个群聊。
- 打开聊天界面
- 点击创建群组
- 添加版主用户名
- 为群组命名
- 确认群组创建完成

Example 3: Join Subreddit Chat

示例3:加入子版块聊天室

User: "Join the r/programming chat room"
Claude: I'll join that chat room.
- Navigate to r/programming
- Find chat room link
- Join the room
- Confirm joined successfully
用户:“加入r/programming聊天室”
Claude:我会加入这个聊天室。
- 导航至r/programming
- 找到聊天室链接
- 加入房间
- 确认成功加入

Example 4: Share a Post via Chat

示例4:通过聊天分享帖子

User: "Share that interesting post with my friend on Reddit"
Claude: I'll share the post.
- Copy post link
- Open chat with friend
- Share post via chat
- Add optional comment
- Confirm sent
用户:“在Reddit上把那个有趣的帖子分享给我的朋友”
Claude:我会分享这个帖子。
- 复制帖子链接
- 打开与朋友的聊天
- 通过聊天分享帖子
- 添加可选评论
- 确认已发送

Authentication Flow

认证流程

  1. Navigate to reddit.com/login via Playwright MCP
  2. Enter username and password from canifi-env
  3. Handle 2FA if enabled (notify user via iMessage)
  4. Verify access to chat feature
  5. Maintain session cookies
  6. Handle any CAPTCHA (notify user)
  1. 通过Playwright MCP导航至reddit.com/login
  2. 从canifi-env中输入用户名和密码
  3. 如果启用了双因素认证(2FA),通过iMessage通知用户
  4. 验证是否有权限使用聊天功能
  5. 维护会话Cookie
  6. 处理任何CAPTCHA验证(通知用户)

Error Handling

错误处理

  • Login Failed: Retry with fresh context, verify credentials
  • Session Expired: Re-authenticate automatically
  • 2FA Required: iMessage for verification code
  • Chat Disabled: User may have chat disabled
  • Rate Limited: Wait before sending more messages
  • User Not Found: Verify username spelling (no u/ prefix)
  • Account Suspended: Notify user of account status
  • CAPTCHA Required: Notify user for manual completion
  • 登录失败:使用新上下文重试,验证凭据
  • 会话过期:自动重新认证
  • 需要2FA:通过iMessage获取验证码
  • 聊天已禁用:用户可能已禁用聊天功能
  • 速率限制:等待后再发送更多消息
  • 用户未找到:验证用户名拼写(无需u/前缀)
  • 账户被暂停:通知用户账户状态
  • 需要CAPTCHA:通知用户手动完成

Self-Improvement Instructions

自我改进说明

When encountering new Reddit chat features:
  1. Document new chat UI elements
  2. Add support for new message features
  3. Log successful chat patterns
  4. Update for Reddit redesign changes
遇到新的Reddit聊天功能时:
  1. 记录新的聊天UI元素
  2. 添加对新消息功能的支持
  3. 记录成功的聊天模式
  4. 根据Reddit界面更新进行适配

Notes

注意事项

  • Reddit has both old and new chat systems
  • Some users disable chat functionality
  • Subreddit chat rooms may have rules
  • Chat history is limited
  • Reddit frequently updates UI
  • Some features require account age/karma
  • Group chats have member limits
  • Reddit同时存在新旧两套聊天系统
  • 部分用户会禁用聊天功能
  • 子版块聊天室可能有规则限制
  • 聊天历史存在限制
  • Reddit会频繁更新界面
  • 部分功能对账户注册时长/ karma值有要求
  • 群聊存在成员数量限制