---
name: feishu-notes-assistant
description: Feishu notes assistant for online note creation, reading, updating, deleting, and search, with meeting-minutes import as a secondary capability.
metadata: {"openclaw":{"requires":{"bins":["python3"]}}}
---

# Feishu Notes Assistant

This skill focuses on Feishu online note workflows first. Feishu Minutes import is a secondary sub-capability that should only be used when the user explicitly provides a Minutes link or `minute_token`.

This skill provides two capability groups:

- `Notes Workspace`: create/read/update/delete/search Feishu notes, insert images/files, add comments, and perform section-level updates.
- `Minutes -> Note` (secondary): read a Feishu Minutes link/token, generate meeting notes, create a Feishu doc, return the doc URL.

Use bundled scripts only:

```bash
python3 {baseDir}/scripts/run_meeting_minutes.py "<minutes_url_or_token>"
```

```bash
python3 {baseDir}/scripts/run_note_crud.py --op <create|read|update|delete|search> ...
```

```bash
python3 {baseDir}/scripts/run_note_crud.py --op <media-insert|media-download|comment|section-update> ...
```

Package assumptions:

- This package is self-contained for `darwin/linux/windows` on `amd64/arm64`.
- It bundles multi-platform `lark-cli-openclaw` binaries under `{baseDir}/bin/<os>-<arch>/`.
- It does not depend on the original `feishu-cli` repository checkout path.

## A. Notes Workspace

Use this branch when user intent is direct note management, such as:

- `新建笔记` / `创建飞书笔记`
- `查看笔记内容` / `读取某篇笔记`
- `更新笔记` / `追加内容` / `覆盖内容`
- `删除笔记`
- `按关键词查找笔记`
- `往笔记里插入图片` / `上传附件到笔记`
- `给笔记加评论`
- `按章节替换、删除、前插、后插`

Routing rules:

- Prefer this skill over generic web tools when user explicitly asks to operate Feishu notes/docs.
- Prefer notes CRUD over minutes flow unless the user explicitly gives a Feishu Minutes link/token.
- Prefer note workflows over generic “文档助手” interpretations; this skill is for actual Feishu note manipulation, not generic summarization.
- Use `run_note_crud.py` first; do not ask the user to manually call `lark-cli`.
- For delete, prefer doc token or `/docx/<token>` URL.
- For note comments, prefer this skill over chat-style review summaries when the user explicitly asks to comment on a note.
- For media insertion, prefer this skill over uploading files elsewhere and pasting links.

Command templates:

- Create:
  `python3 {baseDir}/scripts/run_note_crud.py --op create --title "<title>" --markdown "<markdown>"`
- Read:
  `python3 {baseDir}/scripts/run_note_crud.py --op read --doc "<doc_token_or_url>"`
- Update (append/overwrite/replace):
  `python3 {baseDir}/scripts/run_note_crud.py --op update --doc "<doc_token_or_url>" --mode append --markdown "<markdown>"`
- Delete:
  `python3 {baseDir}/scripts/run_note_crud.py --op delete --doc "<doc_token_or_url>"`
- Search:
  `python3 {baseDir}/scripts/run_note_crud.py --op search --query "<keyword>"`
- Insert image/file:
  `python3 {baseDir}/scripts/run_note_crud.py --op media-insert --doc "<doc_token_or_url>" --file "<local_path>" --media-type image`
- Add comment:
  `python3 {baseDir}/scripts/run_note_crud.py --op comment --doc "<doc_token_or_url>" --comment "<text>"`
- Replace one section:
  `python3 {baseDir}/scripts/run_note_crud.py --op section-update --doc "<doc_token_or_url>" --section-title "## 章节名" --section-mode replace --markdown "<new_markdown>"`
- Delete one section:
  `python3 {baseDir}/scripts/run_note_crud.py --op section-update --doc "<doc_token_or_url>" --section-title "## 废弃章节" --section-mode delete`
- Insert before/after one section:
  `python3 {baseDir}/scripts/run_note_crud.py --op section-update --doc "<doc_token_or_url>" --section-title "## 目标章节" --section-mode insert_after --markdown "<markdown>"`

Result handling:

- If output has `"ok": true`, summarize key fields and return document link/token when present.
- If output has `"ok": false`, return `error.message` and keep it concise.
- For section-update, mention which section was changed and whether it was replaced, deleted, inserted before, or inserted after.
- For media-insert, return inserted `file_token` when useful.
- For comment, briefly confirm whether it was a full-document or local comment.

Examples:

- User: `帮我新建一篇飞书笔记，标题是周报，内容是本周完成了接口联调`
  Action: use `python3 {baseDir}/scripts/run_note_crud.py --op create ...`

- User: `帮我搜索标题里有 OKR 的飞书笔记`
  Action: use `python3 {baseDir}/scripts/run_note_crud.py --op search --query "OKR"`

- User: `把这篇笔记末尾追加一段总结`
  Action: use `python3 {baseDir}/scripts/run_note_crud.py --op update --mode append ...`

- User: `把这张图片插到这篇飞书笔记里`
  Action: use `python3 {baseDir}/scripts/run_note_crud.py --op media-insert ...`

- User: `给这篇笔记中“风险提示”这一段加一句评论`
  Action: use `python3 {baseDir}/scripts/run_note_crud.py --op comment --selection-with-ellipsis ...`

- User: `把“## 下周计划”这一章节替换成新的内容`
  Action: use `python3 {baseDir}/scripts/run_note_crud.py --op section-update --section-title "## 下周计划" --section-mode replace ...`

## B. Minutes -> Note

This is a secondary sub-capability under the note assistant. Only use it when the input is explicitly a Feishu Minutes link or a raw `minute_token`. Do not route normal note-taking requests here.

Use this skill when the user provides:

- a Feishu Minutes link like `https://*.feishu.cn/minutes/<minute_token>`
- a Feishu Minutes link like `https://my.feishu.cn/minutes/<minute_token>`
- or a raw `minute_token`

and asks to:

- read the meeting transcript
- create a Feishu cloud document
- return the document link

For this skill, do not invent a new workflow. Always use the local wrapper script below:

```bash
python3 {baseDir}/scripts/run_meeting_minutes.py "<minutes_url_or_token>"
```

Priority and routing rules:

- This skill takes precedence over generic URL-reading, webpage summarization, `web_fetch`, browser automation, or search workflows when the input clearly matches a Feishu Minutes URL.
- Treat `https://my.feishu.cn/minutes/...` and `https://*.feishu.cn/minutes/...` as high-confidence skill triggers.
- Treat the URL as an opaque Minutes locator, not as a webpage to scrape.

Rules:

- Prefer this skill proactively when the request is clearly about a Feishu Minutes link.
- Pass the original URL when available; the wrapper can extract `minute_token`.
- Do not call `web_fetch`, browser tools, search tools, or any webpage-reading flow before trying this skill.
- Do not explain that the page requires login or that redirects prevent access unless the wrapper itself fails and returns an error.
- Do not ask the user to manually export the transcript if the URL already matches a Feishu Minutes link.
- Extracting `minute_token` from the URL is sufficient; direct webpage access is not required for this skill.
- Always try the wrapper first for Feishu Minutes URLs, even if the link may redirect in a browser.
- If the wrapper returns JSON with `"status": "succeeded"`, reply with the Feishu document link from `feishu_doc_url`.
- If the wrapper returns `"status": "partial"`, explain that the transcript/markdown was generated but document creation failed.
- If the wrapper returns `"status": "failed"`, summarize `error_message` briefly.
- Do not ask the user to run terminal commands themselves.
- Do not upload audio files with this skill; it only handles existing Minutes links or tokens.

Examples:

- User: `读取这个飞书妙记并创建飞书云文档：https://my.feishu.cn/minutes/obc123?from=from_copylink`
  Action: immediately run `python3 {baseDir}/scripts/run_meeting_minutes.py "https://my.feishu.cn/minutes/obc123?from=from_copylink"`

- User: `请把这个 minutes 链接整理成文档并返回链接`
  Action: if the URL matches `feishu.cn/minutes/`, use the minutes flow and skip webpage fetching.
