把飞书文档变成可控时机的 AI 阅读工作区,并用 Cursor Skills 编排知识整理、入库、索引与分享工作流。
| 能力 | 说明 |
|---|---|
| AI 辅助阅读 | 文档内切换模式,本地监听器回复评论、验证画板、生成复盘 |
| 知识管理 Skills | 整理 Wiki/云盘、资料入库、评论消化、Index 维护、播客解读、小红书发布前优化 |
| 模式 | 行为 |
|---|---|
| 自主阅读 | 监听器安静,不介入 |
| AI辅助阅读 | 自动回复每条新的用户评论追问;可选监听画板并生成验证版画板 |
| 复盘整理 | 汇总评论、AI 回复、画板,在文末追加 AI 复盘整理区 和复盘画板 |
| 停用监听 | 保存状态并退出监听器 |
flowchart LR
userDoc[FeishuDoc] -->|勾选阅读模式| watcher[reading_mode_watcher]
watcher -->|lark-cli| feishuApi[FeishuAPI]
watcher -->|stdin prompt| cursorAgent[cursor_agent_reply]
cursorAgent -->|回复文本| watcher
watcher -->|写回评论/画板| feishuApi
- 你在飞书文档顶部勾选阅读模式(checkbox 或固定文本)。
- 本地
reading_mode_watcher.py每 15 秒轮询文档状态与评论。 - 检测到新追问时,通过
cursor_agent_reply.py调用本机 Cursor Agent 生成回复。 - 回复写回同一条评论线程,前缀为
【AI阅读伙伴】,避免自我回复循环。
| 依赖 | 说明 |
|---|---|
| lark-cli | 飞书 CLI,全局安装并完成 OAuth |
| Python 3 | 仅用标准库,无需 pip 安装 |
| Cursor Agent CLI | 默认 AI 后端,本机运行 |
npm install -g @larksuite/cli
# 创建/绑定飞书应用(浏览器授权)
lark-cli config init --new --lang zh
# OAuth 登录
lark-cli auth login --recommend
# 验证
lark-cli auth status
lark-cli doctor# 安装后执行一次
agent login
agent statusgit clone https://github.com/wayphebe/feishu-reading-mode.git
cd feishu-reading-mode推荐用 Callout + checkbox,只勾选一个:
[ ] 自主阅读
[x] AI辅助阅读
[ ] 复盘整理
[ ] 停用监听
也支持固定文本:阅读模式:AI辅助阅读
避免把历史评论全部当成新回复:
python3 tools/reading_mode_watcher.py \
--doc "https://your.feishu.cn/docx/xxxxxxxx" \
--state tmp/reading-mode-my-article-state.json \
--initialize-seen \
--watch-whiteboardspython3 tools/reading_mode_watcher.py \
--doc "https://your.feishu.cn/docx/xxxxxxxx" \
--state tmp/reading-mode-my-article-state.json \
--poll-seconds 15 \
--reply-timeout 300 \
--watch-whiteboards在评论线程里写下你的问题或追问。监听器检测到新回复后,会在同一线程写入 【AI阅读伙伴】 回复。
注意:每条回复由本机 Cursor Agent 生成,通常需要 30–90 秒,不是云端即时 API。
后台运行前,确认没有重复实例:
pgrep -af reading_mode_watcherDry-run(只检测、不写回飞书):
python3 tools/reading_mode_watcher.py \
--doc "飞书文档或 Wiki URL" \
--state tmp/reading-mode-state.json \
--dry-run --once复盘整理模式:在文档勾选 复盘整理 后启动同一 watcher。
处理启动前已有的画板(一次性):
python3 tools/reading_mode_watcher.py \
--doc "飞书文档或 Wiki URL" \
--state tmp/reading-mode-state.json \
--process-existing-whiteboards \
--watch-whiteboards停止监听:
pgrep -af reading_mode_watcher
kill <PID>或在文档勾选 停用监听(watcher 已在运行时)。
仓库在 .cursor/skills/ 提供一组 Cursor Agent Skills。用 Cursor 打开本仓库即可自动加载;也可复制到其他项目或 ~/.cursor/skills/。
完整说明: .cursor/skills/README.md
| Skill | 用途 |
|---|---|
feishu-reading-mode |
AI 辅助阅读、画板验证、复盘整理 |
feishu-knowledge-organize |
云盘 / Wiki / 知识库目录整理(先方案后执行) |
feishu-knowledge-ingest |
资料入库 Sources → Concept → Index |
feishu-comment-to-insight |
评论消化 → Insight 沉淀 |
feishu-knowledge-index-maintain |
Index / Log / Atlas 维护 |
feishu-podcast-interpretation |
播客 → 实操文章 + 知识卡 |
feishu-xhs-prepublish |
小红书发布前优化闸门 |
示例说法:
帮我对这篇飞书文档开启 AI 辅助阅读
盘点这个 Wiki 知识库,按主题给整理方案
把这篇资料入库到知识引擎,我的 take 是:……
根据未解决评论给我阅读消化反馈
把这期播客做成小红书知识卡,走发布前闸门
复制到其他项目:
cp -r .cursor/skills/feishu-* /path/to/project/.cursor/skills/阅读模式详见 SKILL.md 与 examples.md。
| 参数 | 默认 | 说明 |
|---|---|---|
--doc |
(必填) | 飞书文档或 Wiki URL |
--state |
.reading-mode-watcher-state.json |
每篇文档用独立 state 文件 |
--poll-seconds |
15 |
轮询间隔 |
--reply-timeout |
180 |
AI 命令超时(秒) |
--max-replies-per-poll |
10 |
每轮最多处理回复数 |
--watch-whiteboards |
关闭 | 启用画板认知验证 |
--reply-command |
python3 tools/cursor_agent_reply.py |
可插拔 AI 命令 |
--dry-run |
关闭 | 不写回飞书 |
--once |
关闭 | 只跑一轮后退出 |
完整参数见 docs/reading-mode-watcher.md。
| 现象 | 处理 |
|---|---|
| 切换模式后无反应 | 确认文档实际勾选的是 AI辅助阅读 或 复盘整理 |
| 检测到评论但不回复 | 查看日志中的 [reply-error] |
Workspace Trust Required |
确认 cursor_agent_reply.py 使用 agent --trust |
Authentication required |
运行 agent login |
| 回复很慢 | 正常;Cursor Agent 本机运行,每条约 30–90 秒 |
| 画板变了但没动作 | 确认加了 --watch-whiteboards,且画板文字命中触发词 |
| 重复回复 | 立即停止 watcher,用 --initialize-seen 刷新基线后重启 |
- 每个使用者需自行
lark-cli auth login,仓库不包含任何凭证。 - 勿将
tmp/、state JSON、lock 文件提交到 Git。 - 同一文档不要运行两个 watcher 实例(state 文件 + lock 防重复)。
MIT — 见 LICENSE。