linkedin-messages

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

LinkedIn Messages Skill

LinkedIn消息Skill

Overview

概述

Automates LinkedIn messaging including direct messages, InMail, group conversations, and connection requests with personalized notes through browser automation.
通过浏览器自动化实现LinkedIn消息的自动化处理,包括直接消息、InMail、群组对话以及带个性化备注的好友请求。

Quick Install

快速安装

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

Setup

配置

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

First, ensure canifi-env is installed:

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

canifi-env set LINKEDIN_EMAIL "your-email@example.com" canifi-env set LINKEDIN_PASSWORD "your-password"
undefined
canifi-env set LINKEDIN_EMAIL "your-email@example.com" canifi-env set LINKEDIN_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 connections
  • Compose and send InMail (Premium)
  • Respond to message requests
  • Create group conversations
  • Send connection requests with notes
  • Search message history
  • Manage message requests
  • Schedule message follow-ups
  • 向联系人发送直接消息
  • 撰写并发送InMail(需Premium权限)
  • 回复消息请求
  • 创建群组对话
  • 发送带备注的好友请求
  • 搜索消息历史
  • 管理消息请求
  • 安排消息跟进

Usage Examples

使用示例

Example 1: Send a Connection Message

示例1:发送联系人消息

User: "Message John Smith on LinkedIn about the job opportunity"
Claude: I'll send that LinkedIn message.
- Navigate to linkedin.com/messaging
- Search for John Smith in connections
- Open conversation
- Compose professional message about opportunity
- Send message
- Confirm delivery
用户:"给LinkedIn上的John Smith发送关于工作机会的消息"
Claude:我将发送这条LinkedIn消息。
- 导航至linkedin.com/messaging
- 在联系人中搜索John Smith
- 打开对话窗口
- 撰写关于工作机会的专业消息
- 发送消息
- 确认送达

Example 2: Send Connection Request with Note

示例2:发送带备注的好友请求

User: "Connect with Sarah Chen from Google with a personalized note"
Claude: I'll send that connection request.
- Search for Sarah Chen at Google
- Find correct profile
- Click Connect
- Add personalized note
- Send request
- Confirm request sent
用户:"添加Google的Sarah Chen为好友,并附上个性化备注"
Claude:我将发送这条好友请求。
- 搜索Google的Sarah Chen
- 找到正确的个人资料
- 点击「添加好友」
- 添加个性化备注
- 发送请求
- 确认请求已发送

Example 3: Respond to Message Requests

示例3:回复消息请求

User: "Check and respond to my LinkedIn message requests"
Claude: I'll review your message requests.
- Navigate to message requests folder
- Review pending messages
- Present summary of requests
- Respond to appropriate messages
- Accept or decline as instructed
用户:"查看并回复我的LinkedIn消息请求"
Claude:我将查看你的消息请求。
- 导航至消息请求文件夹
- 查看待处理消息
- 呈现请求摘要
- 回复合适的消息
- 根据指示接受或拒绝请求

Example 4: Send InMail

示例4:发送InMail

User: "Send an InMail to the CEO of TechCorp about a partnership"
Claude: I'll compose and send that InMail.
- Search for TechCorp CEO profile
- Click Message (InMail)
- Compose professional partnership inquiry
- Send InMail
- Confirm delivery and credit usage
用户:"给TechCorp的CEO发送关于合作事宜的InMail"
Claude:我将撰写并发送这条InMail。
- 搜索TechCorp CEO的个人资料
- 点击「消息(InMail)」
- 撰写关于合作咨询的专业内容
- 发送InMail
- 确认送达及信用额度使用情况

Authentication Flow

认证流程

  1. Navigate to linkedin.com/login via Playwright MCP
  2. Enter credentials from canifi-env
  3. Handle verification code if sent (check email/phone)
  4. Complete CAPTCHA if presented (notify user)
  5. Handle 2FA if enabled
  6. Verify messaging access
  7. Maintain session cookies
  1. 通过Playwright MCP导航至linkedin.com/login
  2. 从canifi-env中读取凭证并输入
  3. 处理发送的验证码(检查邮箱/手机)
  4. 若出现CAPTCHA,通知用户完成
  5. 若启用了2FA,处理相关验证
  6. 验证消息访问权限
  7. 维护会话Cookie

Error Handling

错误处理

  • Login Failed: Clear cookies, try again with fresh context
  • Session Expired: Re-authenticate with stored credentials
  • CAPTCHA Required: Notify user to complete manually
  • 2FA Required: iMessage for verification code
  • InMail Limit: Notify user of monthly credit usage
  • Connection Limit: Notify of weekly connection limits
  • Message Failed: Check if user accepts messages
  • Profile Not Found: Search with alternative terms
  • 登录失败:清除Cookie,使用新上下文重试
  • 会话过期:使用存储的凭证重新认证
  • 需要CAPTCHA:通知用户手动完成
  • 需要2FA:通过iMessage获取验证码
  • InMail额度不足:通知用户月度信用额度使用情况
  • 好友请求受限:通知用户每周好友请求上限
  • 消息发送失败:检查用户是否接受消息
  • 未找到个人资料:使用其他关键词搜索

Self-Improvement Instructions

自我改进说明

When encountering new LinkedIn features:
  1. Document new messaging UI elements
  2. Add support for new message types
  3. Log successful InMail patterns
  4. Update for new connection features
当遇到LinkedIn的新功能时:
  1. 记录新的消息UI元素
  2. 添加对新消息类型的支持
  3. 记录成功的InMail模式
  4. 更新以适配新的好友功能

Notes

注意事项

  • InMail requires LinkedIn Premium subscription
  • Connection requests limited to ~100/week
  • Some users restrict messages to connections only
  • Sales Navigator has different messaging features
  • Message character limits apply
  • Avoid spam-like behavior to prevent restrictions
  • LinkedIn may show warnings for rapid actions
  • InMail需要LinkedIn Premium订阅
  • 好友请求每周上限约为100条
  • 部分用户仅允许联系人发送消息
  • Sales Navigator具有不同的消息功能
  • 消息存在字符限制
  • 避免类似垃圾邮件的行为,防止被限制
  • 快速操作可能会触发LinkedIn的警告