feishu-task

飞书任务管理工具,用于创建、查询、更新任务和清单。 **当以下情况时使用此 Skill**: (1) 需要创建、查询、更新、删除任务 (2) 需要创建、管理任务清单 (3) 需要查看任务列表或清单内的任务 (4) 用户提到"任务"、"待办"、"to-do"、"清单"、"task" (5) 需要设置任务负责人、关注人、截止时间

2,280 stars

Best use case

feishu-task is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

飞书任务管理工具,用于创建、查询、更新任务和清单。 **当以下情况时使用此 Skill**: (1) 需要创建、查询、更新、删除任务 (2) 需要创建、管理任务清单 (3) 需要查看任务列表或清单内的任务 (4) 用户提到"任务"、"待办"、"to-do"、"清单"、"task" (5) 需要设置任务负责人、关注人、截止时间

Teams using feishu-task should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/feishu-task/SKILL.md --create-dirs "https://raw.githubusercontent.com/nexu-io/nexu/main/nexu-skills/skills/feishu-task/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/feishu-task/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How feishu-task Compares

Feature / Agentfeishu-taskStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

飞书任务管理工具,用于创建、查询、更新任务和清单。 **当以下情况时使用此 Skill**: (1) 需要创建、查询、更新、删除任务 (2) 需要创建、管理任务清单 (3) 需要查看任务列表或清单内的任务 (4) 用户提到"任务"、"待办"、"to-do"、"清单"、"task" (5) 需要设置任务负责人、关注人、截止时间

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 飞书任务管理

## 🚨 执行前必读

- ✅ **时间格式**:ISO 8601 / RFC 3339(带时区),例如 `2026-02-28T17:00:00+08:00`
- ✅ **current_user_id 强烈建议**:从消息上下文的 SenderId 获取(ou_...),工具会自动添加为 follower(如不在 members 中),确保创建者可以编辑任务
- ✅ **patch/get 必须**:task_guid
- ✅ **tasklist.tasks 必须**:tasklist_guid
- ✅ **完成任务**:completed_at = "2026-02-26 15:00:00"
- ✅ **反完成(恢复未完成)**:completed_at = "0"

---

## 📋 快速索引:意图 → 工具 → 必填参数

| 用户意图 | 工具 | action | 必填参数 | 强烈建议 | 常用可选 |
|---------|------|--------|---------|---------|---------|
| 新建待办 | feishu_task_task | create | summary | current_user_id(SenderId) | members, due, description |
| 查未完成任务 | feishu_task_task | list | - | completed=false | page_size |
| 获取任务详情 | feishu_task_task | get | task_guid | - | - |
| 完成任务 | feishu_task_task | patch | task_guid, completed_at | - | - |
| 反完成任务 | feishu_task_task | patch | task_guid, completed_at="0" | - | - |
| 改截止时间 | feishu_task_task | patch | task_guid, due | - | - |
| 创建清单 | feishu_task_tasklist | create | name | - | members |
| 查看清单任务 | feishu_task_tasklist | tasks | tasklist_guid | - | completed |
| 添加清单成员 | feishu_task_tasklist | add_members | tasklist_guid, members[] | - | - |

---

## 🎯 核心约束(Schema 未透露的知识)

### 1. 当前工具使用用户身份(已内置保护)

**工具使用 `user_access_token`(用户身份)**

这意味着:
- ✅ 创建任务时可以指定任意成员(包括只分配给别人)
- ⚠️ 只能查看和编辑**自己是成员的任务**
- ⚠️ **如果创建时没把自己加入成员,后续无法编辑该任务**

**自动保护机制**:
- 传入 `current_user_id` 参数(从 SenderId 获取)
- 如果 `members` 中不包含 `current_user_id`,工具会**自动添加为 follower**
- 确保创建者始终可以编辑任务

**推荐用法**:创建任务时始终传 `current_user_id`,工具会自动处理成员关系。

### 2. 任务成员的角色说明

- **assignee(负责人)**:负责完成任务,可以编辑任务
- **follower(关注人)**:关注任务进展,接收通知

**添加成员示例**:
```json
{
  "members": [
    {"id": "ou_xxx", "role": "assignee"},  // 负责人
    {"id": "ou_yyy", "role": "follower"}   // 关注人
  ]
}
```

**说明**:`id` 使用用户的 `open_id`(从消息上下文的 SenderId 获取)

### 3. 任务清单角色冲突

**现象**:创建清单(`tasklist.create`)时传了 `members`,但返回的 `tasklist.members` 为空或缺少成员

**原因**:创建人自动成为清单 **owner**(所有者),如果 `members` 中包含创建人,该用户最终成为 owner 并从 `members` 中移除(同一用户只能有一个角色)

**建议**:不要在 `members` 中包含创建人,只添加其他协作成员

### 4. completed_at 的三种用法

**1) 完成任务(设置完成时间)**:
```json
{
  "action": "patch",
  "task_guid": "xxx",
  "completed_at": "2026-02-26 15:30:00"  // 北京时间字符串
}
```

**2) 反完成(恢复未完成状态)**:
```json
{
  "action": "patch",
  "task_guid": "xxx",
  "completed_at": "0"  // 特殊值 "0" 表示反完成
}
```

**3) 毫秒时间戳**(不推荐,除非上层已严格生成):
```json
{
  "completed_at": "1740545400000"  // 毫秒时间戳字符串
}
```

### 5. 清单成员的角色

| 成员类型 | 角色 | 说明 |
|---------|------|------|
| user(用户) | owner | 所有者,可转让所有权 |
| user(用户) | editor | 可编辑,可修改清单和任务 |
| user(用户) | viewer | 可查看,只读权限 |
| chat(群组) | editor/viewer | 整个群组获得权限 |

**说明**:创建清单时,创建者自动成为 owner,无需在 members 中指定。

---

## 📌 使用场景示例

### 场景 1: 创建任务并分配负责人

```json
{
  "action": "create",
  "summary": "准备周会材料",
  "description": "整理本周工作进展和下周计划",
  "current_user_id": "ou_发送者的open_id",
  "due": {
    "timestamp": "2026-02-28 17:00:00",
    "is_all_day": false
  },
  "members": [
    {"id": "ou_协作者的open_id", "role": "assignee"}
  ]
}
```

**说明**:
- `summary` 是必填字段
- `current_user_id` 强烈建议传入(从 SenderId 获取),工具会自动添加为 follower
- `members` 可以只包含其他协作者,当前用户会被自动添加
- 时间使用北京时间字符串格式

### 场景 2: 查询我负责的未完成任务

```json
{
  "action": "list",
  "completed": false,
  "page_size": 20
}
```

### 场景 3: 完成任务

```json
{
  "action": "patch",
  "task_guid": "任务的guid",
  "completed_at": "2026-02-26 15:30:00"
}
```

### 场景 4: 反完成任务(恢复未完成状态)

```json
{
  "action": "patch",
  "task_guid": "任务的guid",
  "completed_at": "0"
}
```

### 场景 5: 创建清单并添加协作者

```json
{
  "action": "create",
  "name": "产品迭代 v2.0",
  "members": [
    {"id": "ou_xxx", "role": "editor"},
    {"id": "ou_yyy", "role": "viewer"}
  ]
}
```

### 场景 6: 查看清单内的未完成任务

```json
{
  "action": "tasks",
  "tasklist_guid": "清单的guid",
  "completed": false
}
```

### 场景 7: 全天任务

```json
{
  "action": "create",
  "summary": "年度总结",
  "due": {
    "timestamp": "2026-03-01 00:00:00",
    "is_all_day": true
  }
}
```

---

## 🔍 常见错误与排查

| 错误现象 | 根本原因 | 解决方案 |
|---------|---------|---------|
| **创建后无法编辑任务** | 创建时未将自己加入 members | 创建时至少将当前用户(SenderId)加为 assignee 或 follower |
| **patch 失败提示 task_guid 缺失** | 未传 task_guid 参数 | patch/get 必须传 task_guid |
| **tasks 失败提示 tasklist_guid 缺失** | 未传 tasklist_guid 参数 | tasklist.tasks action 必须传 tasklist_guid |
| **反完成失败** | completed_at 格式错误 | 使用 `"0"` 字符串,不是数字 0 |
| **时间不对** | 使用了 Unix 时间戳 | 改用 ISO 8601 格式(带时区):`2024-01-01T00:00:00+08:00` |

---

## 📚 附录:背景知识

### A. 资源关系

```
任务清单(Tasklist)
  └─ 自定义分组(Section,可选)
      └─ 任务(Task)
          ├─ 成员:负责人(assignee)、关注人(follower)
          ├─ 子任务(Subtask)
          ├─ 截止时间(due)、开始时间(start)
          └─ 附件、评论
```

**核心概念**:
- **任务(Task)**:独立的待办事项,有唯一的 `task_guid`
- **清单(Tasklist)**:组织多个任务的容器,有唯一的 `tasklist_guid`
- **负责人(assignee)**:可以编辑任务并标记完成
- **关注人(follower)**:接收任务更新通知
- **我负责的(MyTasks)**:所有负责人为自己的任务集合

### B. 如何获取 GUID

- **task_guid**:创建任务后从返回值的 `task.guid` 获取,或通过 `list` 查询
- **tasklist_guid**:创建清单后从返回值的 `tasklist.guid` 获取,或通过 `list` 查询

### C. 如何将任务加入清单

创建任务时指定 `tasklists` 参数:
```json
{
  "action": "create",
  "summary": "任务标题",
  "tasklists": [
    {
      "tasklist_guid": "清单的guid",
      "section_guid": "分组的guid(可选)"
    }
  ]
}
```

### D. 重复任务如何创建

使用 `repeat_rule` 参数,采用 RRULE 格式:
```json
{
  "action": "create",
  "summary": "每周例会",
  "due": {"timestamp": "2026-03-03 14:00:00", "is_all_day": false},
  "repeat_rule": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO"
}
```

**说明**:只有设置了截止时间的任务才能设置重复规则。


### E. 数据权限

- 只能操作自己有权限的任务(作为成员的任务)
- 只能操作自己有权限的清单(作为成员的清单)
- 将任务加入清单需要同时拥有任务和清单的编辑权限

Related Skills

feishu-update-doc

2280
from nexu-io/nexu

更新飞书云文档。支持 7 种更新模式:追加、覆盖、定位替换、全文替换、前/后插入、删除。

feishu-troubleshoot

2280
from nexu-io/nexu

飞书插件问题排查工具。包含常见问题 FAQ 和深度诊断命令(/feishu_doctor)。 常见问题可随时查阅。诊断命令用于排查复杂问题(多次授权仍失败、自动授权无法解决等), 会检查账户配置、API 连通性、应用权限、用户授权状态,并生成详细的诊断报告和解决方案。

feishu-im-read

2280
from nexu-io/nexu

飞书 IM 消息读取工具使用指南,覆盖会话消息获取、话题回复读取、跨会话消息搜索、图片/文件资源下载。 **当以下情况时使用此 Skill**: (1) 需要获取群聊或单聊的历史消息 (2) 需要读取话题(thread)内的回复消息 (3) 需要跨会话搜索消息(按关键词、发送者、时间等条件) (4) 消息中包含图片、文件、音频、视频,需要下载 (5) 用户提到"聊天记录"、"消息"、"群里说了什么"、"话题回复"、"搜索消息"、"图片"、"文件下载" (6) 需要按时间范围过滤消息、分页获取更多消息

feishu-fetch-doc

2280
from nexu-io/nexu

获取飞书云文档内容。返回文档的 Markdown 内容,支持处理文档中的图片、文件和画板(需配合 feishu_doc_media 工具)。

feishu-create-doc

2280
from nexu-io/nexu

创建飞书云文档。从 Lark-flavored Markdown 内容创建新的飞书云文档,支持指定创建位置(文件夹/知识库/知识空间)。

feishu-calendar

2280
from nexu-io/nexu

飞书日历与日程管理工具集。包含日历管理、日程管理、参会人管理、忙闲查询。

feishu-bitable

2280
from nexu-io/nexu

飞书多维表格(Bitable)的创建、查询、编辑和管理工具。包含 27 种字段类型支持、高级筛选、批量操作和视图管理。 **当以下情况时使用此 Skill**: (1) 需要创建或管理飞书多维表格 App (2) 需要在多维表格中新增、查询、修改、删除记录(行数据) (3) 需要管理字段(列)、视图、数据表 (4) 用户提到"多维表格"、"bitable"、"数据表"、"记录"、"字段" (5) 需要批量导入数据或批量更新多维表格

static-deploy

2280
from nexu-io/nexu

Deploy static pages to nexu.space. Use when user says deploy, publish, ship, or go live with a static site/page. Uploads files from workspace to <project-slug>.nexu.space via Wrangler + Cloudflare Pages. Supports first deploy and redeploy.

nano-banana

2280
from nexu-io/nexu

Generate or edit images via Nano Banana image models. Triggers on "generate image", "image generation", "nano banana", "edit image", "nano banana pro", "nano banana 2"

feedback

2280
from nexu-io/nexu

Send feedback to the Nexu team. Use when the user says /feedback followed by their message.

sync-specs

2280
from nexu-io/nexu

Use when code changes may have made documentation outdated, when reviewing docs for consistency, or when the user asks to sync or audit documentation.

nexu-e2e-test

2280
from nexu-io/nexu

Use when verifying OpenClaw gateway fixes end-to-end, testing skill loading after restart, or running integration tests against the local Nexu+OpenClaw stack. Triggers on "e2e test", "verify fix", "test gateway", "test skills loading".