mcpField
F
feishu-task

feishu-task

github.com/alextangsonProductivity6491 installsUpdated 31w ago
Repository

About feishu-task

feishu-task is a skill for managing Feishu tasks through the Task API. It covers task creation, retrieval, updates, completion, and deletion, and uses a shared script to obtain and refresh authentication tokens.

Key features

  1. 01Create, retrieve, and update tasks
  2. 02Complete or delete tasks
  3. 03Bearer token acquisition and refresh
  4. 04Task due dates and member roles

Use cases

  1. 01Creating tasks with descriptions and due dates
  2. 02Changing task details or assignees
  3. 03Completing or removing existing tasks

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/alextangson/feishu_skills --skill feishu-task

After installing, type/feishu-taskin Claude Code to confirm it loaded.

Details

From the project README

飞书任务

通过 Task API 管理任务。

Base URL: https://open.feishu.cn/open-apis/task/v2

认证与 Token 获取

从 feishu_skills 根目录执行共享脚本:

TOKEN="$(./scripts/get_feishu_token.sh)"

请求头统一使用 Authorization: Bearer ${TOKEN}。

如果业务接口返回 token 无效、过期或 401,强制刷新后仅重试一次原请求:

TOKEN="$(./scripts/get_feishu_token.sh --force-refresh)"

环境变量:

  • FEISHU_APP_ID
  • FEISHU_APP_SECRET

本地缓存: ./.feishu_token_cache.json(未过期直接复用,默认提前 5 分钟刷新)


任务操作

API端点说明
创建任务POST /tasks-
获取任务GET /tasks/{task_guid}-
更新任务PATCH /tasks/{task_guid}-
完成任务POST /tasks/{task_guid}/complete-
删除任务DELETE /tasks/{task_guid}-

创建任务:

{
  "summary": "任务标题",
  "description": "任务描述",
  "due": {"timestamp": "1770508800"},
  "members": [{"id": "ou_xxx", "role": "assignee"}]
}

最佳实践

  1. due 用秒级时间戳
  2. members 指定角色(assignee/follower)

Comments

Markdown supported