Feishu Task Management
Overview
Use this skill to operate Feishu Task through the companion toolkit in feishu-task-management/toolkit/. Keep the core workflow in this file: decide the command, resolve members locally, and apply the write-safety rules without loading extra references unless the request falls into an edge case.
Core Workflow
- 1. Confirm the request is about Feishu task management through the local toolkit.
- Before the first API-backed operation, make sure the toolkit is configured. If not, use:
python3 feishu-task-management/toolkit/scripts/feishu_config.py guide
- 3. Treat app credentials as mandatory base config. Prefer the configured
user_access_token for task APIs when available, but keep contact and member-sync operations on app auth. - If the operation involves people, use the local member table through the toolkit. Do not perform ad hoc contact lookups.
- Choose the narrowest task command available instead of composing generic HTTP requests.
- For destructive or state-changing operations, inspect the current task first when practical.
- Stop if member resolution is ambiguous or missing.
Command Routing
Member Table Maintenance
- - Sync the authorized contact scope:
python3 feishu-task-management/toolkit/scripts/feishu_members.py sync
python3 feishu-task-management/toolkit/scripts/feishu_members.py stats
python3 feishu-task-management/toolkit/scripts/feishu_members.py resolve --query "张三"
- - Validate manual aliases:
INLINECODE6
Toolkit Configuration
- - Show configuration guidance:
python3 feishu-task-management/toolkit/scripts/feishu_config.py guide
- - Write a local runtime config:
python3 feishu-task-management/toolkit/scripts/feishu_config.py set --app-id ... --app-secret ...
- - Extend the config with existing user OAuth tokens:
python3 feishu-task-management/toolkit/scripts/feishu_config.py set --app-id ... --app-secret ... --user-access-token ...
- - Inspect effective config:
python3 feishu-task-management/toolkit/scripts/feishu_config.py show
- - Validate current config:
INLINECODE11
Read Operations
python3 feishu-task-management/toolkit/scripts/feishu_task.py get --task-guid ...
INLINECODE13
Write Operations
python3 feishu-task-management/toolkit/scripts/feishu_task.py create --summary ...
python3 feishu-task-management/toolkit/scripts/feishu_task.py update --task-guid ...
python3 feishu-task-management/toolkit/scripts/feishu_task.py complete --task-guid ...
python3 feishu-task-management/toolkit/scripts/feishu_task.py reopen --task-guid ...
python3 feishu-task-management/toolkit/scripts/feishu_task.py add-members --task-guid ... --member ...
python3 feishu-task-management/toolkit/scripts/feishu_task.py remove-members --task-guid ... --member ...
INLINECODE20
Member Resolution
Use local resolution only, in this order:
- 1. Explicit identifiers:
open_id, user_id, email, INLINECODE24 - Manual alias mapping from INLINECODE25
- Exact canonical matches on
name, en_name, nickname, and email - Limited fuzzy matching
Apply these safety rules:
- - Zero matches: stop and report that the member table or aliases need updating.
- One match: proceed.
- Multiple matches: stop and return the candidate list.
If the authorized scope only yields identifier fields without profile fields, natural-language matching depends on manual aliases. This does not change when task APIs later use a user token.
Write Safety Rules
- - Use the toolkit instead of constructing raw HTTP requests in the skill body.
- Prefer dedicated commands over generic update payloads when a command exists.
- Use dedicated completion commands instead of editing
completed_at directly. - Treat
origin as create-only. - Clear
start and due explicitly instead of relying on omission. - Require explicit confirmation before deletion.
Supported v1 Scope
- - Create task
- Get task
- List tasks
- Update summary, description, start, and due
- Delete task
- Complete task
- Reopen task
- Add members
- Remove members
The following are intentionally out of scope for v1:
- - reminders
- tasklists
- dependencies
- repeat rules
- custom complete
- attachments
Conditional References
Load extra context only when the request falls off the main path:
- - Read member-sync-troubleshooting.md only when member sync, alias validation, or authorized-scope coverage is the problem.
- Read task-edge-cases.md only when handling time-field clearing,
origin, completion semantics, or deferred task features. - Read permission-errors.md only when a task operation fails with permission-related behavior such as
1470403. - Read api-alignment.md only when changing toolkit payloads or aligning CLI defaults to newer Feishu API samples.
飞书任务管理
概述
使用此技能通过 feishu-task-management/toolkit/ 中的配套工具包操作飞书任务。核心工作流程保留在此文件中:决定命令、本地解析成员、应用写入安全规则,除非请求属于边缘情况,否则不加载额外引用。
核心工作流程
- 1. 通过本地工具包确认请求与飞书任务管理相关。
- 在首次基于API的操作前,确保工具包已配置。若未配置,请使用:
python3 feishu-task-management/toolkit/scripts/feishu_config.py guide
- 3. 将应用凭证视为强制基础配置。任务API优先使用已配置的 useraccesstoken,但联系人和成员同步操作仍使用应用认证。
- 如果操作涉及人员,通过工具包使用本地成员表。不要进行临时的联系人查询。
- 选择最精确的任务命令,而不是构建通用的HTTP请求。
- 对于破坏性或状态变更操作,在实际操作前先检查当前任务。
- 如果成员解析不明确或缺失,则停止操作。
命令路由
成员表维护
python3 feishu-task-management/toolkit/scripts/feishu_members.py sync
python3 feishu-task-management/toolkit/scripts/feishu_members.py stats
python3 feishu-task-management/toolkit/scripts/feishu_members.py resolve --query 张三
python3 feishu-task-management/toolkit/scripts/feishu_members.py validate-aliases
工具包配置
python3 feishu-task-management/toolkit/scripts/feishu_config.py guide
python3 feishu-task-management/toolkit/scripts/feishu_config.py set --app-id ... --app-secret ...
python3 feishu-task-management/toolkit/scripts/feishu_config.py set --app-id ... --app-secret ... --user-access-token ...
python3 feishu-task-management/toolkit/scripts/feishu_config.py show
python3 feishu-task-management/toolkit/scripts/feishu_config.py validate
读取操作
python3 feishu-task-management/toolkit/scripts/feishu_task.py get --task-guid ...
python3 feishu-task-management/toolkit/scripts/feishu_task.py list
写入操作
python3 feishu-task-management/toolkit/scripts/feishu_task.py create --summary ...
python3 feishu-task-management/toolkit/scripts/feishu_task.py update --task-guid ...
python3 feishu-task-management/toolkit/scripts/feishu_task.py complete --task-guid ...
python3 feishu-task-management/toolkit/scripts/feishu_task.py reopen --task-guid ...
python3 feishu-task-management/toolkit/scripts/feishu_task.py add-members --task-guid ... --member ...
python3 feishu-task-management/toolkit/scripts/feishu_task.py remove-members --task-guid ... --member ...
python3 feishu-task-management/toolkit/scripts/feishu_task.py delete --task-guid ... --yes
成员解析
仅使用本地解析,按以下顺序:
- 1. 显式标识符:openid、userid、email、mobile
- 来自 feishu-task-management/toolkit/data/memberaliases.json 的手动别名映射
- 对 name、enname、nickname 和 email 的精确规范匹配
- 有限的模糊匹配
应用以下安全规则:
- - 零匹配:停止并报告需要更新成员表或别名。
- 一个匹配:继续执行。
- 多个匹配:停止并返回候选列表。
如果授权范围仅产生标识符字段而没有个人资料字段,自然语言匹配依赖于手动别名。当任务API后续使用用户令牌时,此规则不变。
写入安全规则
- - 使用工具包,而不是在技能主体中构建原始HTTP请求。
- 当存在专用命令时,优先使用专用命令而非通用更新负载。
- 使用专用完成命令,而不是直接编辑 completed_at。
- 将 origin 视为仅创建时设置。
- 显式清除 start 和 due,而不是依赖省略。
- 删除前需要显式确认。
支持的v1范围
- - 创建任务
- 获取任务
- 列出任务
- 更新摘要、描述、开始时间和截止时间
- 删除任务
- 完成任务
- 重新打开任务
- 添加成员
- 移除成员
以下内容有意不在v1范围内:
条件引用
仅当请求偏离主路径时加载额外上下文: