ClawSkills logoClawSkills

Linkedin Monitor

具有渐进自主性的可靠 LinkedIn 收件箱监控。每小时监控消息,以您的口吻起草回复,并提醒您注意新对话。支持

介绍

# LinkedIn Monitor

用于 Clawdbot 的可靠 LinkedIn 收件箱监控。

## 功能

- **每小时监控** — 每小时检查收件箱,24/7 全天候 - **确定性状态** — 绝无重复通知 - **渐进式自主** — 从监管开始,逐步过渡到自主运行 - **健康检查** — 当认证过期或出现问题时发出警报 - **你的声音** — 使用您的沟通风格起草回复

## 快速开始

```bash # 1. Setup (interactive) linkedin-monitor setup

# 2. Verify health linkedin-monitor health

# 3. Run manually (test) linkedin-monitor check

# 4. Enable cron (hourly) linkedin-monitor enable ```

## 自主级别

| 级别 | 名称 | 行为 | |-------|------|----------| | 0 | 仅监控 | 仅对新消息发出警报 | | 1 | 起草 + 审批 | 起草回复,等待审批 | | 2 | 自动简单回复 | 自动处理确认、日程安排 | | 3 | 完全自主 | 代表您回复、预订会议、建立人脉 |

**默认:级别 1** — 使用 `linkedin-monitor config autonomyLevel 2` 进行更改

## 命令

```bash linkedin-monitor setup # Interactive setup wizard linkedin-monitor health # Check auth status linkedin-monitor check # Run one check cycle linkedin-monitor enable # Enable hourly cron linkedin-monitor disable # Disable cron linkedin-monitor status # Show current state linkedin-monitor config # View/edit configuration linkedin-monitor logs # View recent activity linkedin-monitor reset # Clear state (start fresh) ```

## 配置

位置:`~/.clawdbot/linkedin-monitor/config.json`

```json { "autonomyLevel": 1, "alertChannel": "discord", "alertChannelId": "YOUR_CHANNEL_ID", "calendarLink": "cal.com/yourname", "communicationStyleFile": "USER.md", "timezone": "America/New_York", "schedule": "0 * * * *", "morningDigest": { "enabled": true, "hour": 9, "timezone": "Asia/Bangkok" }, "safetyLimits": { "maxMessagesPerDay": 50, "escalationKeywords": ["angry", "legal", "refund"], "dailyDigest": true } } ```

## 工作原理

### 监控流程

``` 1. Health Check └── Verify LinkedIn auth (lk CLI) 2. Fetch Messages └── lk message list --json 3. Compare State └── Filter: only messages not in state file 4. For Each New Message ├── Level 0: Alert only ├── Level 1: Draft reply → Alert → Wait for approval ├── Level 2: Simple = auto-reply, Complex = draft └── Level 3: Full autonomous response 5. Update State └── Record message IDs (prevents duplicates) ```

### 状态管理

状态由脚本管理,而非 LLM。这保证了: - 没有重复通知 - 会话间行为一致 - 状态可见以便调试

状态文件:`~/.clawdbot/linkedin-monitor/state/`

## 发送已批准的消息

处于级别 1 时,使用以下命令批准草稿:

``` send [name] # Send draft to [name] send all # Send all pending drafts edit [name] [text] # Edit draft before sending skip [name] # Discard draft ```

## 故障排除

### "Auth expired" (认证过期) ```bash lk auth login linkedin-monitor health ```

### "No messages found" (未找到消息) ```bash linkedin-monitor check --debug ```

### 重复通知 ```bash linkedin-monitor reset # Clear state linkedin-monitor check # Fresh start ```

## 依赖项

- `lk` CLI (LinkedIn CLI) — `npm install -g lk` - `jq` (JSON 处理器) — `brew install jq`

## 文件

``` ~/.clawdbot/linkedin-monitor/ ├── config.json # Your configuration ├── state/ │ ├── messages.json # Seen message IDs │ ├── lastrun.txt # Last check timestamp │ └── drafts.json # Pending drafts └── logs/ └── activity.log # Activity history ```

更多产品