Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use for anything related to Teambition tasks and projects. Triggers on: checking my todos, what tasks are due today or this week, create a task, update task status or priority or assignee or note, mark task as done, query overdue tasks, search tasks by keyword, view task details, upload file to task, check team members, query project list, add task comment with @mention, track task progress. NOT for: non-Teambition platforms or Git operations.
.claude/skills/dingtalk-teambition/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-19 | ✗→✓ | ▲ Improved | — | — |
| case-11 | ✗→✓ | ▲ Improved | — | — |
| case-21 | ✗→✓ | ▲ Improved | — | — |
| case-04 | ✗→✓ | ▲ Improved | — | — |
| case-12 | ✗→✓ | ▲ Improved | — | — |
✅ 适合使用本技能:
❌ 不适用场景:
git> 获取 User Token:Teambition 开放平台
bash# 方式 1:环境变量 export TEAMBITION_USER_TOKEN="your_token" # 方式 2:在 dingtalk-teambition/ 目录下创建 user-token.json # {"userToken": "your_token"} cd dingtalk-teambition && uv sync
me():TQL 中查询"我的"任务/项目,必须用 executorId = me(),禁止硬编码用户 IDcreate_task.py / update_task.py / manage_sprint.py 已内置东八区→UTC 转换,直接传本地时间即可;不要手动传 UTC 时间(会被再次转换导致偏差)。转换逻辑参考:python from datetime import datetime, timedelta user_date = "2026-03-15" dt = datetime.strptime(user_date, "%Y-%m-%d") - timedelta(hours=8) iso_date = dt.strftime("%Y-%m-%dT%H:%M:%S.000Z") # 结果:2026-03-14T16:00:00.000Z
| 字段 | 含义 | 转换方式 | |------|------|---------| | executorId | 执行人 | query_members.py --user-ids <ID> 批量查询 | | creatorId | 创建人 | query_members.py --user-ids <ID> 批量查询 | | involveMembers | 参与人列表 | query_members.py --user-ids <ID1,ID2,...> 批量查询 | | sprintId | 所属迭代 | query_project_detail.py <projectId> 获取迭代列表后匹配 | | stageId | 所属任务列 | 任务详情中通常包含 stageName,否则需查项目工作流 | | projectId | 所属项目 | 项目名通常已在上下文中,或用 query_project_detail.py 查询 | | parentTaskId | 父任务 | query_task_detail.py <parentTaskId> 获取父任务标题 |
query_members.py,项目/迭代/任务用各自的查询脚本)bash # 按姓名搜索成员,获取 userId uv run scripts/query_members.py --keyword "张三" # 返回结果中匹配 userId,确认后用于展示或操作
# 批量按用户ID查询成员(推荐用于ID转换) uv run scripts/query_members.py --user-ids "id1,id2,id3"
0=紧急 1=高 2=中 3=低,但企业通常会自定义优先级名称,脚本输出的 priorityLabel 仅为系统默认值,不代表该企业的真实配置。projectIduv run scripts/query_project_detail.py <projectId> --extra-fields organizationId 获取 organizationIduv run scripts/get_priority_list.py <organizationId> 获取企业真实优先级列表priority(数值)和 name(企业自定义名称),以此覆盖默认 label 后再展示priority 数值调用更新接口--restore 恢复;归档不等于删除--action create --project-id <id> --name <名> 创建迭代获取 sprint-id,再用 --action start --project-id <id> --sprint-id <id> 开始,完成后用 --action complete --project-id <id> --sprint-id <id>;start/complete 都需要同时传 --project-id 和 --sprint-idget_task_statuses.py <taskId> 直接查询该任务的工作流状态列表,无需先获取 projectId;只有创建任务需要初始状态时才用 get_taskflow_statuses.pyreferences/tql.md;进展/评论/动态/归档 → references/task-ops.md;错误处理 → references/error-handling.mdupload_file.py 上传文件获取 fileToken,再用 create_comment.py --file-tokens <token> 将文件附加到评论;两步均走脚本,无需直接调 APIhttps://www.teambition.com/task/{taskId}https://www.teambition.com/project/{projectId}content 字段就是任务的标题,向用户展示时统一使用"标题"而非"内容",避免混淆;create_task.py 和 update_task.py 都统一使用 --title 参数--customfields 更新任务自定义字段时,不同类型有不同格式:bash # 日期类型(date):value 是数组,包含带 title 的对象,日期格式为 ISO 8601 uv run scripts/update_task.py --task-id 'xxx' \ --customfields '[{"customfieldId": "字段ID", "value": [{"title": "2026-03-16T00:00:00.000Z"}]}]' # 文本类型(text):value 是数组,包含带 title 的对象 uv run scripts/update_task.py --task-id 'xxx' \ --customfields '[{"customfieldId": "字段ID", "value": [{"title": "文本内容"}]}]' # 单选类型(select):value 是数组,包含带 id 的选项对象 uv run scripts/update_task.py --task-id 'xxx' \ --customfields '[{"customfieldId": "字段ID", "value": [{"id": "选项ID"}]}]'
upload_file_to_customfield.py 一站式上传文件到自定义字段:bash uv run scripts/upload_file_to_customfield.py \ --task-id '<taskId>' \ --file-path '/path/to/file.pdf' \ --customfield-id '<字段ID>'
work(文件附件)的字段,展示时必须将文件名渲染为可点击的下载链接,使用字段值中的 downloadUrl 字段作为链接地址,格式如下:[文件名](downloadUrl)[材料.md](https://xxx.com/...)archive_task.py)、删除等不可逆或影响较大的操作前,必须先向用户确认,展示操作对象(任务标题/ID)和操作类型,获得明确同意后再执行。例如:customfields 数组中不会包含该字段。要查看任务可填写的所有自定义字段,需要:bash # 1. 从任务详情获取 sfcId(任务类型ID)和 projectId uv run scripts/query_task_detail.py <taskId> --detail-level detailed
# 2. 查询该任务类型可用的所有自定义字段 uv run scripts/get_custom_fields.py <projectId> --sfc-id <sfcId> 返回结果中 type 为 work 的字段就是文件类型字段
| 脚本 | 用途 | 关键参数 | |------|------|---------| | query_tasks.py | 查询任务列表(TQL),默认返回:标题、状态、优先级、执行人ID、截止时间、备注、迭代、任务列、开始时间、进度、父任务ID | --tql <TQL> --page-size N --page-token T --no-details --extra-fields f1,f2 | | query_task_detail.py <id1,id2> | 查询任务详情(支持批量) | --detail-level simple\|detailed --extra-fields f1,f2 | | create_task.py | 创建任务 | --title <标题>(必需)--project-id --executor-id --due-date --priority | | update_task.py | 更新任务(多字段并行) | --task-id <id>(必需)--title --executor-id --due-date --note --priority --taskflowstatus-id | | update_task_priority.py | 单独更新优先级(更新前必须先用 get_priority_list.py 查企业配置) | --task-id <id> --priority <0-3> | | create_comment.py | 创建评论 | --task-id <id> --content <内容> --mention <姓名> --mention-id <userId> --file-tokens <token> | | query_projects.py | 查询项目列表(TQL) | --tql <TQL> --page-size N --page-token T --no-details --include-template | | query_project_detail.py <id> | 查询项目详情(支持批量) | --detail-level simple\|detailed --extra-fields f1,f2 | | query_members.py | 搜索成员(支持批量ID查询) | --keyword <姓名> --user-ids <ID1,ID2,...> | | get_task_statuses.py <taskId> | 查询任务工作流状态列表(推荐) | --q <关键词> | | get_taskflow_statuses.py <projectId> | 获取项目工作流状态(创建任务时用) | --only-start --q <关键词> | | get_custom_fields.py <projectId> | 获取项目自定义字段配置 | --cf-ids <IDs> --sfc-id <ID> | | get_scenario_types.py <projectId> | 获取项目任务类型列表 | --q <关键词> --sfc-ids <IDs> | | get_priority_list.py <organizationId> | 获取企业优先级配置 | — | | get_current_user.py | 获取当前登录用户信息(userId、name、email 等) | — | | create_trace.py | 添加任务进展 | --task-id <id> --title <标题> --status <1-3> | | upload_file.py | 上传文件,返回 fileToken | --file-path <路径> --scope task:<id> --category attachment | | archive_task.py | 归档/恢复任务 | --task-id <id> [--restore] | | query_task_activity.py | 查询任务动态 | --task-id <id> --actions comment | | manage_sprint.py | 迭代管理 | --action list\|create\|start\|complete --project-id <id> --sprint-id <id> --name <名> |
| 参数 | 类型 | 必需 | 说明 | |------|------|------|------| | 任务ID | 字符串 | 是 | 任务 ID,逗号分隔支持批量 | | --detail-level | 字符串 | 否 | simple(默认)或 detailed | | --extra-fields | 字符串 | 否 | simple 模式下额外包含的字段,逗号分隔 |
simple(默认) 包含字段:
| 字段 | 说明 | |------|------| | id | 任务 ID | | content | 任务标题 | | isDone | 是否完成 | | executorId | 执行人 ID | | projectId | 项目 ID | | dueDate | 截止时间 | | priority | 优先级(0=紧急,1=高,2=中,3=低) | | created | 创建时间 | | updated | 更新时间 | | note | 备注 |
detailed 额外包含:sprintId(迭代 ID)stageId(任务列 ID)startDate(开始时间)progress(进度)parentTaskId(父任务 ID)及自定义字段等 30+ 字段
| 参数 | 类型 | 必需 | 说明 | |------|------|------|------| | 项目ID | 字符串 | 是 | 项目 ID,逗号分隔支持批量 | | --detail-level | 字符串 | 否 | simple(默认)或 detailed | | --extra-fields | 字符串 | 否 | simple 模式下额外包含的字段,逗号分隔 |
simple(默认) 包含字段:
| 字段 | 说明 | |------|------| | id | 项目 ID | | name | 项目名称 | | description | 项目描述 | | visibility | 可见性(public/private) | | isTemplate | 是否是模板项目 | | creatorId | 创建人 ID | | isArchived | 是否在回收站 | | isSuspended | 是否已归档 | | created | 创建时间 | | updated | 更新时间 |
detailed 额外包含:logo(项目 LOGO)organizationId(企业 ID)uniqueIdPrefix(任务 ID 前缀)startDate(开始时间)endDate(结束时间)等 20+ 字段
| 场景 | TQL | |------|-----| | 我的待办任务 | executorId = me() AND isDone = false | | 我的逾期任务 | executorId = me() AND isDone = false AND dueDate < startOf(d) | | 今天截止的任务 | executorId = me() AND dueDate >= startOf(d) AND dueDate <= endOf(d) | | 本周截止的任务 | executorId = me() AND dueDate >= startOf(w) AND dueDate <= endOf(w) | | 即将逾期(未来3天) | executorId = me() AND isDone = false AND dueDate >= startOf(d) AND dueDate <= endOf(d, 3d) | | 过去7天更新的任务 | executorId = me() AND updated >= startOf(d, -7d) | | 高优先级未完成 | priority = 0 AND isDone = false | | 标题模糊搜索 | title ~ '关键词' | | 全文搜索(标题+备注) | text ~ '关键词' | | 指定项目的任务 | projectId = 'xxx' |
> 完整 TQL 语法(字段、运算符、时间函数)→ references/tql.md
| 场景 | TQL | |------|-----| | 我参与的项目 | involveMembers = me() | | 我创建的项目 | creatorId = me() | | 按名称搜索 | nameText ~ '关键词' | | 已归档的项目 | isSuspended = true | | 今天更新的项目 | updated >= startOf(d) AND updated <= endOf(d) | | 今天创建的项目 | created >= startOf(d) AND created <= endOf(d) | | 本周创建的项目 | created >= startOf(w) AND created <= endOf(w) | | 本月创建的项目 | created >= startOf(M) AND created <= endOf(M) | | 过去7天创建的项目 | created >= startOf(d, -7d) | | 指定日期范围创建 | created >= '2026-03-01T00:00:00.000Z' AND created <= '2026-03-31T23:59:59.999Z' |
> ⚠️ 项目没有截止时间(dueDate)字段,只有 created 和 updated。 > > 完整项目 TQL → references/project-tql.md
bash# 我的待办任务 uv run scripts/query_tasks.py --tql "executorId = me() AND isDone = false" # 注意:返回的 executorId 是原始 ID,需批量调用 query_members.py --user-ids 转换为姓名后展示 # 我的逾期任务,按截止时间升序 uv run scripts/query_tasks.py --tql "executorId = me() AND isDone = false AND dueDate < startOf(d) ORDER BY dueDate ASC" # 返回的 executorId 需批量转换为姓名:uv run scripts/query_members.py --user-ids "<id1,id2,...>" # 本周截止的任务 uv run scripts/query_tasks.py --tql "executorId = me() AND dueDate >= startOf(w) AND dueDate <= endOf(w)" # 标题搜索 uv run scripts/query_tasks.py --tql "title ~ '需求'" # 查询任务详情(simple 默认,含 note) uv run scripts/query_task_detail.py <taskId> # 查询详细信息(含自定义字段等) uv run scripts/query_task_detail.py <taskId> --detail-level detailed # 批量查询多个任务 uv run scripts/query_task_detail.py id1,id2,id3
bash# 基本创建 uv run scripts/create_task.py --project-id 'xxx' --title '完成需求文档' # 完整参数创建 uv run scripts/create_task.py \ --project-id 'xxx' \ --title '实现登录模块' \ --executor-id 'uid' \ --due-date '2026-04-01' \ --priority 1 \ --note '参考设计稿'
bash# 更新标题和优先级(多字段并行执行) uv run scripts/update_task.py --task-id 'xxx' --title '新标题' --priority 0 # 更新截止日期和执行人 uv run scripts/update_task.py --task-id 'xxx' --due-date '2026-04-01' --executor-id 'uid' # 更新任务状态(先查询状态 ID) uv run scripts/get_task_statuses.py <taskId> uv run scripts/update_task.py --task-id 'xxx' --taskflowstatus-id '状态ID' # 单独更新优先级 uv run scripts/update_task_priority.py --task-id 'xxx' --priority 0
bash# 我参与的项目 uv run scripts/query_projects.py --tql "involveMembers = me()" # 按名称搜索 uv run scripts/query_projects.py --tql "nameText ~ '产品开发'" # 查询项目详情 uv run scripts/query_project_detail.py <projectId> # 获取 organizationId(用于查询优先级配置) uv run scripts/query_project_detail.py <projectId> --extra-fields organizationId
bash# 按姓名搜索成员 uv run scripts/query_members.py --keyword '张三' # 批量按用户ID查询成员(推荐用于ID转换) uv run scripts/query_members.py --user-ids "id1,id2,id3" # 获取当前登录用户信息(userId、name、email 等) uv run scripts/get_current_user.py
bash# 创建评论并 @张三(--mention 接受姓名,脚本自动查询 userId) uv run scripts/create_comment.py \ --task-id 'xxx' \ --content '请张三确认一下' \ --mention '张三' # @多人(逗号分隔) uv run scripts/create_comment.py \ --task-id 'xxx' \ --content '请张三和李四评审' \ --mention '张三,李四' # 已知 userId 时可直接用 --mention-id uv run scripts/create_comment.py \ --task-id 'xxx' \ --content '已更新' \ --mention-id '61cad8021deea2ac89a4cbf3'
bash# 第一步:上传文件,获取 fileToken uv run scripts/upload_file.py \ --file-path '/path/to/doc.pdf' \ --scope 'task:<taskId>' \ --category attachment # 第二步:将 fileToken 附加到评论 uv run scripts/create_comment.py \ --task-id 'xxx' \ --content '附件已上传,请查收' \ --file-tokens 'token1'
query_tasks.py 和 query_projects.py 均支持分页:
| 参数 | 说明 | |------|------| | --page-size <N> | 每页记录数(默认由 API 决定) | | --page-token <T> | 传入上次返回的 nextPageToken 获取下一页 |
bash# 第一页 uv run scripts/query_tasks.py --tql "executorId = me()" --page-size 50 # 下一页(使用上次输出中的 nextPageToken) uv run scripts/query_tasks.py --tql "executorId = me()" --page-size 50 --page-token "上次返回的TOKEN"
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +68 percentage points is the difference between those two pass rates over the 19 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.